From 311503c5b315b970417aa7f63ee36910abdde526 Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Thu, 23 Feb 2017 11:43:06 -0500 Subject: [PATCH 01/22] Change master branch to rawhide --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3c321fd..683460e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM fedora:25 +FROM fedora:rawhide -ENV VERSION=0.1 RELEASE=1 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=2 ARCH=x86_64 LABEL BZComponent="etcd-docker" \ Name="$FGC/etcd" \ Version="$VERSION" \ From 48acbf06dab64debeb7f5e77253dec3f57a7507a Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Thu, 23 Feb 2017 12:02:48 -0500 Subject: [PATCH 02/22] Bump version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3c321fd..051798d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=1 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=2 ARCH=x86_64 LABEL BZComponent="etcd-docker" \ Name="$FGC/etcd" \ Version="$VERSION" \ From fc15d8f472b471971dc93e1c262476b5405e0ae2 Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Thu, 23 Feb 2017 12:06:57 -0500 Subject: [PATCH 03/22] Bump version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 051798d..ac64a1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=2 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=3 ARCH=x86_64 LABEL BZComponent="etcd-docker" \ Name="$FGC/etcd" \ Version="$VERSION" \ From c8b9e32c7d6d0fe282090fdca8ae2fb9dce27141 Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Thu, 23 Feb 2017 14:15:12 -0500 Subject: [PATCH 04/22] Fix BZComponent and Release labels --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index ac64a1f..af0347f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=3 ARCH=x86_64 -LABEL BZComponent="etcd-docker" \ +ENV VERSION=0.1 RELEASE=4 ARCH=x86_64 +LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ - Release="$RELEASE" \ + Release="$RELEASE.$DISTTAG" \ Architecture="$ARCH" \ Summary="A key-value store for shared configuration and service discovery." \ maintainer="Giuseppe Scrivano " From ba508378f47dd97197adcce76edd40693216b552 Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Thu, 23 Feb 2017 15:33:34 -0500 Subject: [PATCH 05/22] Fix BZComponent and Release labels --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 683460e..f81f543 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM fedora:rawhide -ENV VERSION=0.1 RELEASE=2 ARCH=x86_64 -LABEL BZComponent="etcd-docker" \ +ENV VERSION=0.1 RELEASE=3 ARCH=x86_64 +LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ - Release="$RELEASE" \ + Release="$RELEASE.$DISTTAG" \ Architecture="$ARCH" \ Summary="A key-value store for shared configuration and service discovery." \ maintainer="Giuseppe Scrivano " From 28a6d721f83dc6866d3850cb2456b8b45c175f2c Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 2 Mar 2017 20:22:19 -0600 Subject: [PATCH 06/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index af0347f..80e16cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=4 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=5 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From 246a46a395388e0d7dc38c1beed46ee4b0fb3129 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 15 Mar 2017 16:50:54 -0500 Subject: [PATCH 07/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 80e16cd..4500512 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=5 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=6 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From 8f169dd99eb127c413c72f5652dd68979d2ceb05 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 15 Mar 2017 17:25:37 -0500 Subject: [PATCH 08/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4500512..ad88795 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=6 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=7 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From fbde328c0015be7ebab8897e21ae371ae4537dcc Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 29 Mar 2017 15:18:28 -0500 Subject: [PATCH 09/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ad88795..12628ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=7 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=8 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From 42c55bad6294e4e756bb411bd96523ace95743cb Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 29 Mar 2017 22:39:49 -0500 Subject: [PATCH 10/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 12628ac..2ad139f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=8 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=9 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From fd480ea91bb2cc6eaccffb8aed5a526b0a35c7d5 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 20 Apr 2017 21:34:40 -0500 Subject: [PATCH 11/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ad139f..0e2168d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=9 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=10 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From d4336d049f502cbb266a8830ada1ee4a68042cae Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 23 May 2017 15:31:42 -0500 Subject: [PATCH 12/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0e2168d..1794b98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM fedora:25 -ENV VERSION=0.1 RELEASE=10 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=11 ARCH=x86_64 LABEL BZComponent="etcd" \ Name="$FGC/etcd" \ Version="$VERSION" \ From 96877a0e6e41d20c81f4a5bed513384316f2e0fa Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Tue, 6 Jun 2017 15:54:58 -0400 Subject: [PATCH 13/22] Update Dockerfile and Config Update Dockerfile to correspond to new requirements. Update runc config.json for new version of runc, and bind /etc/resolv.conf --- Dockerfile | 16 ++++++------ config.json.template | 62 +++++++++++++++++++++++++++++++++----------- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1794b98..ff0b142 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM fedora:25 +FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=11 ARCH=x86_64 -LABEL BZComponent="etcd" \ - Name="$FGC/etcd" \ - Version="$VERSION" \ - Release="$RELEASE.$DISTTAG" \ - Architecture="$ARCH" \ - Summary="A key-value store for shared configuration and service discovery." \ +ENV VERSION=0.1 RELEASE=12 ARCH=x86_64 +LABEL com.redhat.component="etcd" \ + name="$FGC/etcd" \ + version="$VERSION" \ + release="$RELEASE.$DISTTAG" \ + architecture="$ARCH" \ + summary="A key-value store for shared configuration and service discovery." \ maintainer="Giuseppe Scrivano " RUN dnf -y --setopt=tsflags=nodocs install etcd hostname && \ diff --git a/config.json.template b/config.json.template index 7fd0657..73cfa73 100644 --- a/config.json.template +++ b/config.json.template @@ -1,5 +1,5 @@ { - "ociVersion": "0.3.0", + "ociVersion": "1.0.0", "platform": { "os": "linux", "arch": "amd64" @@ -56,7 +56,41 @@ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm" ], - "cwd": "/" + "cwd": "/", + "capabilities": { + "bounding": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "permitted": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "inheritable": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "effective": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "ambient": [ + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ] + }, + "rlimits": [ + { + "type": "RLIMIT_NOFILE", + "hard": 1024, + "soft": 1024 + } + ] }, "root": { "path": "rootfs", @@ -155,21 +189,19 @@ "rw", "mode=755" ] - } + }, + { + "destination": "/etc/resolv.conf", + "type": "bind", + "source": "/etc/resolv.conf", + "options": [ + "ro", + "rbind", + "rprivate" + ] + } ], "linux": { - "capabilities": [ - "CAP_AUDIT_WRITE", - "CAP_KILL", - "CAP_NET_BIND_SERVICE" - ], - "rlimits": [ - { - "type": "RLIMIT_NOFILE", - "hard": 1024, - "soft": 1024 - } - ], "resources": { "devices": [ { From 0773fcf8a634ca20c62cfec1d4f5f951a982dbea Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 8 Jun 2017 22:18:36 -0500 Subject: [PATCH 14/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ff0b142..af3635e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=12 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=13 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From 9aa8cdb3ad7f410bbf936e93f7c5a5abb1395763 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Wed, 14 Jun 2017 16:25:05 -0500 Subject: [PATCH 15/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index af3635e..5050512 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=13 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=14 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From f06469b008b67cfa24e696ce2e7c17f164645462 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 27 Jun 2017 10:45:09 -0500 Subject: [PATCH 16/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 5050512..10e2d0b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=14 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=15 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From eaa1594894ad67303874c8eee91284b334762f6e Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 6 Jul 2017 14:04:23 -0500 Subject: [PATCH 17/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 10e2d0b..df1fb6e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=15 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=16 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From 490759033a4f532ca9122ee37d6309f51e908fe0 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 25 Jul 2017 12:53:16 -0500 Subject: [PATCH 18/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index df1fb6e..ce31b2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=16 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=17 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From 84420deea6815f233288c46effbda0065a060040 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 24 Aug 2017 15:38:15 -0500 Subject: [PATCH 19/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ce31b2d..24311fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=17 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=18 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From 13e76aa75289c9f84e8c19b71bcf05128954d152 Mon Sep 17 00:00:00 2001 From: yuqi-zhang Date: Wed, 6 Sep 2017 15:08:03 -0400 Subject: [PATCH 20/22] Update master branch to upstream Signed-off-by: Yu Qi Zhang --- Dockerfile | 20 ++++++----- config.json.template | 82 +++++++++++++++++++++++++++++++++++--------- etcd-env.sh | 9 +++-- manifest.json | 9 ++++- 4 files changed, 89 insertions(+), 31 deletions(-) diff --git a/Dockerfile b/Dockerfile index f81f543..004a94b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ -FROM fedora:rawhide +FROM registry.fedoraproject.org/fedora:rawhide -ENV VERSION=0.1 RELEASE=3 ARCH=x86_64 -LABEL BZComponent="etcd" \ - Name="$FGC/etcd" \ - Version="$VERSION" \ - Release="$RELEASE.$DISTTAG" \ - Architecture="$ARCH" \ - Summary="A key-value store for shared configuration and service discovery." \ +ENV VERSION=0.1 RELEASE=10 ARCH=x86_64 +LABEL com.redhat.component="etcd" \ + name="$FGC/etcd" \ + version="$VERSION" \ + release="$RELEASE.$DISTTAG" \ + architecture="$ARCH" \ + summary="A key-value store for shared configuration and service discovery." \ maintainer="Giuseppe Scrivano " RUN dnf -y --setopt=tsflags=nodocs install etcd hostname && \ @@ -22,6 +22,10 @@ COPY uninstall.sh /usr/bin/uninstall.sh COPY tmpfiles.template config.json.template service.template manifest.json /exports/ +RUN mkdir -p /exports/hostfs/usr/local/bin/ && cp /usr/bin/etcdctl /exports/hostfs/usr/local/bin/etcdctl + +RUN mkdir -p /exports/hostfs/etc/etcd && sed -e "/^ETCD_DATA_DIR/d" -e s"|^ETCD_NAME=|#ETCD_NAME=|" < /etc/etcd/etcd.conf > /exports/hostfs/etc/etcd/etcd.conf + EXPOSE 4001 7001 2379 2380 CMD ["/usr/bin/etcd-env.sh", "/usr/bin/etcd"] diff --git a/config.json.template b/config.json.template index 7fd0657..e542c85 100644 --- a/config.json.template +++ b/config.json.template @@ -1,5 +1,5 @@ { - "ociVersion": "0.3.0", + "ociVersion": "1.0.0", "platform": { "os": "linux", "arch": "amd64" @@ -17,6 +17,7 @@ "env": [ "NAME=$NAME", "ETCD_NAME=$ETCD_NAME", + "ETCD_DATA_DIR=$ETCD_DATA_DIR", "ETCD_ADVERTISE_CLIENT_URLS=$ETCD_ADVERTISE_CLIENT_URLS", "ETCD_LISTEN_CLIENT_URLS=$ETCD_LISTEN_CLIENT_URLS", "ETCD_INITIAL_ADVERTISE_PEER_URLS=$ETCD_INITIAL_ADVERTISE_PEER_URLS", @@ -56,7 +57,46 @@ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm" ], - "cwd": "/" + "cwd": "/", + "capabilities": { + "bounding": [ + "CAP_DAC_READ_SEARCH", + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "permitted": [ + "CAP_DAC_READ_SEARCH", + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "inheritable": [ + "CAP_DAC_READ_SEARCH", + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "effective": [ + "CAP_DAC_READ_SEARCH", + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ], + "ambient": [ + "CAP_DAC_READ_SEARCH", + "CAP_AUDIT_WRITE", + "CAP_KILL", + "CAP_NET_BIND_SERVICE" + ] + }, + "rlimits": [ + { + "type": "RLIMIT_NOFILE", + "hard": 1024, + "soft": 1024 + } + ] }, "root": { "path": "rootfs", @@ -155,21 +195,30 @@ "rw", "mode=755" ] - } + }, + { + "destination": "/etc/resolv.conf", + "type": "bind", + "source": "/etc/resolv.conf", + "options": [ + "ro", + "rbind", + "rprivate" + ] + }, + { + "type": "bind", + "source": "$CONF_DIRECTORY/$NAME", + "destination": "/etc/etcd/", + "options": [ + "rbind", + "ro", + "rprivate" + ] + } + $ADDTL_MOUNTS ], "linux": { - "capabilities": [ - "CAP_AUDIT_WRITE", - "CAP_KILL", - "CAP_NET_BIND_SERVICE" - ], - "rlimits": [ - { - "type": "RLIMIT_NOFILE", - "hard": 1024, - "soft": 1024 - } - ], "resources": { "devices": [ { @@ -190,7 +239,6 @@ } ], "devices": null, - "apparmorProfile": "", - "selinuxProcessLabel": "" + "apparmorProfile": "" } } diff --git a/etcd-env.sh b/etcd-env.sh index 5b81a6b..90dd8bf 100755 --- a/etcd-env.sh +++ b/etcd-env.sh @@ -6,11 +6,10 @@ if test x$NAME == x; then fi export ETCD_NAME=${ETCD_NAME:-$HOSTNAME} export ETCD_DATA_DIR=/var/lib/etcd/${NAME}.etcd -export ETCD_ADVERTISE_CLIENT_URLS=${ETCD_ADVERTISE_CLIENT_URLS:-http://${ipaddress}:2379,http://${ipaddress}:4001} -export ETCD_LISTEN_CLIENT_URLS=${ETCD_LISTEN_CLIENT_URLS:-http://0.0.0.0:2379,http://0.0.0.0:4001} -export ETCD_INITIAL_ADVERTISE_PEER_URLS=${ETCD_INITIAL_ADVERTISE_PEER_URLS:-http://${ipaddress}:2380,http://${ipaddress}:7001} -export ETCD_LISTEN_PEER_URLS=${ETCD_LISTEN_PEER_URLS:-http://0.0.0.0:2380,http://0.0.0.0:7001} -export ETCD_INITIAL_CLUSTER=${ETCD_INITIAL_CLUSTER:-$HOSTNAME=http://${ipaddress}:2380,$HOSTNAME=http://${ipaddress}:7001} + +if test -e /etc/etcd/etcd.conf; then + source /etc/etcd/etcd.conf +fi # Execute the commands passed to this script exec "$@" diff --git a/manifest.json b/manifest.json index 28aa414..2fedbfb 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,9 @@ { "version": "1.0", "defaultValues": { + "CONF_DIRECTORY" : "/etc", "ETCD_NAME" : "", + "ETCD_DATA_DIR" : "", "ETCD_ADVERTISE_CLIENT_URLS" : "", "ETCD_LISTEN_CLIENT_URLS" : "", "ETCD_INITIAL_ADVERTISE_PEER_URLS" : "", @@ -37,7 +39,12 @@ "ETCD_DEBUG" : "false", "ETCD_LOG_PACKAGE_LEVELS" : "", "ETCD_STRICT_RECONFIG_CHECK" : "false", - "ETCD_ENABLE_PPROF" : "false" + "ETCD_ENABLE_PPROF" : "false", + "ADDTL_MOUNTS": "" + }, + "renameFiles" : { + "/etc/etcd/etcd.conf" : "$CONF_DIRECTORY/$NAME/etcd.conf", + "/usr/local/bin/etcdctl" : "/usr/local/bin/${NAME}ctl" } } From 57c61deb5ebb1ed4bf2a19527e2c400f9176004d Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Thu, 21 Sep 2017 10:24:03 -0500 Subject: [PATCH 21/22] Bump RELEASE for automatic rebuild --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 24311fa..56026fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM registry.fedoraproject.org/fedora:25 -ENV VERSION=0.1 RELEASE=18 ARCH=x86_64 +ENV VERSION=0.1 RELEASE=19 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ From 4853917726c203108ea75291de755a650f3502e5 Mon Sep 17 00:00:00 2001 From: Clement Verna Date: Mon, 20 Aug 2018 17:58:48 +0200 Subject: [PATCH 22/22] Drop Release label in favor of OSBS release_bump plugin. OSBS can automatically bump the release number, for that we just need to drop the label from the Dockerfile See https://pagure.io/ContainerSIG/container-sig/issue/1 Signed-off-by: Clement Verna --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 004a94b..0d30616 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,9 @@ FROM registry.fedoraproject.org/fedora:rawhide -ENV VERSION=0.1 RELEASE=10 ARCH=x86_64 +ENV VERSION=0.1 ARCH=x86_64 LABEL com.redhat.component="etcd" \ name="$FGC/etcd" \ version="$VERSION" \ - release="$RELEASE.$DISTTAG" \ architecture="$ARCH" \ summary="A key-value store for shared configuration and service discovery." \ maintainer="Giuseppe Scrivano "