feat: etcd remove service/user
- change etcd to bin only, bump revision
This commit is contained in:
parent
7f18247e00
commit
3767107729
@ -1 +1 @@
|
||||
1
|
||||
2
|
||||
|
||||
@ -14,7 +14,6 @@ ENV PACKAGE_VERSION=${PACKAGE_VERSION}
|
||||
|
||||
# Copy nfpm.yaml from the context into the container
|
||||
COPY nfpm.yaml /app/nfpm.yaml
|
||||
COPY resources /app/resources
|
||||
|
||||
# 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 && \
|
||||
|
||||
@ -45,16 +45,3 @@ contents:
|
||||
mode: 0755
|
||||
owner: 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
|
||||
|
||||
@ -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
|
||||
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
systemctl daemon-reload
|
||||
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
rm -f /usr/lib/systemd/system/etcd.service
|
||||
systemctl daemon-reload
|
||||
@ -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
|
||||
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
systemctl stop etcd.service
|
||||
Loading…
Reference in New Issue
Block a user