Skip to content

Commit 1e4673e

Browse files
committed
feat: add rpm to goreleaser build
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
1 parent d41571c commit 1e4673e

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

.goreleaser.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ sboms:
2626
documents:
2727
- '${artifact}.spdx.json'
2828

29+
nfpms:
30+
- package_name: pgedge-control-plane
31+
vendor: pgEdge
32+
homepage: https://www.pgedge.com
33+
maintainer: pgEdge Support <support@pgedge.com>
34+
description: pgEdge Control Plane
35+
license: PostgreSQL License
36+
formats:
37+
- rpm
38+
bindir: /usr/sbin
39+
contents:
40+
- src: packaging/pgedge-control-plane.service
41+
dst: /usr/lib/systemd/system/pgedge-control-plane.service
42+
type: config
43+
- src: packaging/config.json
44+
dst: /etc/pgedge-control-plane/config.json
45+
type: config|noreplace
46+
2947
release:
3048
github:
3149
owner: pgEdge

packaging/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"orchestrator": "systemd",
3+
"data_dir": "/var/lib/pgedge-control-plane"
4+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[Unit]
2+
Description=pgEdge Control Plane
3+
Documentation=https://docs.pgedge.com
4+
After=network-online.target
5+
Wants=network-online.target
6+
7+
[Service]
8+
Type=simple
9+
ExecStart=/usr/sbin/pgedge-control-plane run --config-path /etc/pgedge-control-plane/config.json
10+
Restart=on-failure
11+
RestartSec=5s
12+
StateDirectory=pgedge-control-plane
13+
ConfigurationDirectory=pgedge-control-plane
14+
15+
[Install]
16+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)