Compare commits

...
Sign in to create a new pull request.

8 commits

Author SHA1 Message Date
Mohan Boddu
7c69418522 "Bump RELEASE for automatic rebuild" 2018-03-15 14:38:52 +00:00
Adam Miller
78650bcc11 Bump RELEASE for automatic rebuild 2017-11-14 14:16:43 -06:00
Adam Miller
51e6ea6b1a Bump RELEASE for automatic rebuild 2017-09-21 14:01:17 -05:00
yuqi-zhang
c4a384c876 Update f26 to upstream
Signed-off-by: Yu Qi Zhang <jzehrarnyg@gmail.com>
2017-09-06 15:13:58 -04:00
Adam Miller
e16d6368b5 Bump RELEASE for automatic rebuild 2017-08-24 16:53:23 -05:00
Adam Miller
77d4299a72 Bump RELEASE for automatic rebuild 2017-07-25 16:18:50 -05:00
yuqi-zhang
cb2e9f716e Update dockerfile and runc config
Adds the following updates:

  - change labels to lowercase
  - update config to ociVersion 1.0.0
  - bind resolv.conf
  - update capabilites format
2017-05-10 15:41:51 -04:00
yuqi-zhang
fa5e979d58 Pin to stable tag for f26 2017-03-08 15:47:17 -05:00
4 changed files with 90 additions and 32 deletions

View file

@ -1,12 +1,12 @@
FROM fedora:rawhide
FROM registry.fedoraproject.org/fedora:26
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 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 <gscrivan@redhat.com>"
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"]

View file

@ -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": ""
}
}

View file

@ -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 "$@"

View file

@ -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"
}
}