Merge pull request 'feat: etcd remove service/user' (#25) from neoloc/etcd_binary_only into master
All checks were successful
Deploy / deploy-9 (push) Successful in 7s
Deploy / deploy-8 (push) Successful in 24s

Reviewed-on: https://git.query.consul/unkin/rpmbuilder/pulls/25
This commit is contained in:
Ben Vincent 2025-01-26 16:42:17 +11:00
commit 18da11d779
8 changed files with 1 additions and 45 deletions

View File

@ -1 +1 @@
1 2

View File

@ -14,7 +14,6 @@ ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container # Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml COPY nfpm.yaml /app/nfpm.yaml
COPY resources /app/resources
# Download the required files # Download the required files
RUN wget -O /app/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz https://github.com/etcd-io/etcd/releases/download/v${PACKAGE_VERSION}/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz && \ RUN wget -O /app/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz https://github.com/etcd-io/etcd/releases/download/v${PACKAGE_VERSION}/etcd-v${PACKAGE_VERSION}-linux-amd64.tar.gz && \

View File

@ -45,16 +45,3 @@ contents:
mode: 0755 mode: 0755
owner: root owner: root
group: root group: root
- src: /app/resources/etcd.service
dst: /usr/lib/systemd/system/etcd.service
file_info:
mode: 0644
owner: root
group: root
# Scripts to run during installation/removal (optional)
scripts:
preinstall: ./resources/scripts/preinstall.sh
postinstall: ./resources/scripts/postinstall.sh
preremove: ./resources/scripts/preremove.sh
postremove: ./resources/scripts/postremove.sh

View File

@ -1,18 +0,0 @@
[Unit]
Description=etcd key-value store
Documentation=https://github.com/etcd-io/etcd
After=network-online.target local-fs.target remote-fs.target time-sync.target
Wants=network-online.target local-fs.target remote-fs.target time-sync.target
[Service]
User=etcd
Type=notify
Environment=ETCD_DATA_DIR=/var/lib/etcd
Environment=ETCD_NAME=%m
ExecStart=/usr/bin/etcd
Restart=always
RestartSec=10s
LimitNOFILE=40000
[Install]
WantedBy=multi-user.target

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
systemctl daemon-reload

View File

@ -1,3 +0,0 @@
#!/usr/bin/env bash
rm -f /usr/lib/systemd/system/etcd.service
systemctl daemon-reload

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
groupadd --system etcd
useradd --system --shell /sbin/nologin --no-create-home --home-dir /var/lib/etcd --gid etcd etcd
mkdir -p /var/lib/etcd
chown etcd:etcd /var/lib/etcd

View File

@ -1,2 +0,0 @@
#!/usr/bin/env bash
systemctl stop etcd.service