Skip to content

feat: add rpm to goreleaser build#320

Open
jason-lynch wants to merge 1 commit intofeat/PLAT-417/systemdfrom
feat/PLAT-459/rpm-packaging
Open

feat: add rpm to goreleaser build#320
jason-lynch wants to merge 1 commit intofeat/PLAT-417/systemdfrom
feat/PLAT-459/rpm-packaging

Conversation

@jason-lynch
Copy link
Copy Markdown
Member

Summary

Adds an RPM output to our goreleaser build.

Testing

To create a test build of the RPM, run:

goreleaser-test-release

This will create a dist directory with release artifacts, including RPMs for both amd64 and arm64.

To install and use the RPM:

sudo su -

dnf install -y epel-release dnf
dnf config-manager --set-enabled crb
dnf update -y --allowerasing
dnf install -y https://dnf.pgedge.com/reporpm/pgedge-release-latest.noarch.rpm
dnf install -y \
      pgedge-postgresql18 \
      pgedge-spock50_18 \
      pgedge-snowflake_18 \
      pgedge-lolor_18 \
      pgedge-postgresql18-contrib \
      pgedge-pgbackrest \
      pgedge-python3-psycopg2 \
      python3-pip
pip install 'patroni[etcd,jsonlogger]==4.1.0'

rpm -i <path to rpm file>

systemctl start pgedge-control-plane.service

From there, you can interact with it as normal, e.g.:

curl http://localhost:3000/v1/cluster/init

Keep in mind that the host ID will default to the machine's short hostname.

To tail the control-plane logs, do:

journalctl -u pgedge-control-plane.service --follow

PLAT-459

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 56581be5-450e-4d74-be11-7fad8d9e0841

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

RPM packaging configuration added to the build system, including nfpms metadata in goreleaser configuration and new systemd service unit file with associated configuration for managing the pgedge-control-plane process at runtime.

Changes

Cohort / File(s) Summary
Build and Release Packaging
.goreleaser.yaml
Added nfpms RPM packaging configuration with vendor metadata and installation mappings for systemd service file and configuration file.
Service Package Contents
packaging/config.json, packaging/pgedge-control-plane.service
New systemd unit file defining service startup, restart behavior, and state/configuration directories; accompanying config file with orchestrator and data directory settings.

Poem

🐰 A package bundled up so neat,
With systemd service to keep it running sweet,
From config files to RPM delight,
The Control Plane now starts just right! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides a summary and comprehensive testing instructions, but is missing several required template sections including Changes, Checklist items, and Notes for Reviewers. Add the missing sections: a bulleted Changes list, complete the Checklist with specific status updates, and add Notes for Reviewers section. Ensure Testing section includes unit/e2e test commands in addition to manual steps.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding RPM packaging support to the goreleaser build configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/PLAT-459/rpm-packaging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jason-lynch jason-lynch requested a review from moizpgedge March 30, 2026 15:38
@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from d41571c to 26c6108 Compare March 31, 2026 16:43
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from 1e4673e to 9b54d96 Compare March 31, 2026 16:43
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Mar 31, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from 26c6108 to 88440d0 Compare March 31, 2026 16:51
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from 9b54d96 to 43254b8 Compare March 31, 2026 16:51
@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from 88440d0 to 09d6b52 Compare March 31, 2026 17:35
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from 43254b8 to 3426d14 Compare March 31, 2026 17:35
@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from 09d6b52 to 2d1d84c Compare March 31, 2026 20:10
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from 3426d14 to 12cb3b8 Compare March 31, 2026 20:10
@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from 2d1d84c to cd7c876 Compare April 1, 2026 14:47
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from 12cb3b8 to 9095732 Compare April 1, 2026 14:47
@jason-lynch
Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from cd7c876 to a574a99 Compare April 1, 2026 16:13
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from 9095732 to e81f943 Compare April 1, 2026 16:13
@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from a574a99 to 940cc99 Compare April 2, 2026 13:29
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from e81f943 to e8b57e4 Compare April 2, 2026 13:29
Copy link
Copy Markdown
Contributor

@moizpgedge moizpgedge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, the SELinux part from the ticket is missing no policy file, and no %post/%postun scripts to load/remove it.

Before we add it, is this actually needed?

@jason-lynch
Copy link
Copy Markdown
Member Author

Hey, the SELinux part from the ticket is missing no policy file, and no %post/%postun scripts to load/remove it.
Before we add it, is this actually needed?

Good call out! No, this is not needed. I was able to make a code change to make everything work with SELinux enabled and with the default policies.

Adds an RPM output to our goreleaser build.

To create a test build of the RPM, run:

```sh
goreleaser-test-release
```

This will create a `dist` directory with release artifacts, including
RPMs for both amd64 and arm64.

To install and use the RPM:

```sh
sudo su -

dnf install -y epel-release dnf
dnf config-manager --set-enabled crb
dnf update -y --allowerasing
dnf install -y https://dnf.pgedge.com/reporpm/pgedge-release-latest.noarch.rpm
dnf install -y \
      pgedge-postgresql18 \
      pgedge-spock50_18 \
      pgedge-snowflake_18 \
      pgedge-lolor_18 \
      pgedge-postgresql18-contrib \
      pgedge-pgbackrest \
      pgedge-python3-psycopg2 \
      python3-pip
pip install 'patroni[etcd,jsonlogger]==4.1.0'

rpm -i <path to rpm file>

systemctl start pgedge-control-plane.service
```

From there, you can interact with it as normal, e.g.:

```sh
curl http://localhost:3000/v1/cluster/init
```

Keep in mind that the host ID will default to the machine's short
hostname.

To tail the control-plane logs, do:

```
journalctl -u pgedge-control-plane.service --follow
```

PLAT-459
@jason-lynch jason-lynch force-pushed the feat/PLAT-417/systemd branch from 940cc99 to 490d89c Compare April 2, 2026 17:04
@jason-lynch jason-lynch force-pushed the feat/PLAT-459/rpm-packaging branch from e8b57e4 to 7512dc8 Compare April 2, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants