From 02964e8ecc1c230e85f83f0208c92751214ef204 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Tue, 19 Dec 2017 16:47:34 +0100 Subject: [PATCH] Fix permissions of etcd binaries (#47) and make it possible to specify ScalyrRegion and ScalyrAccountKey --- Dockerfile | 10 ++++++++-- etcd-cluster.yaml | 9 ++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 308a66a..cd51616 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,11 +22,17 @@ RUN export DEBIAN_FRONTEND=noninteractive \ ## Install etcd ARG ETCDVERSION_PREV=3.0.17 -RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION_PREV}/etcd-v${ETCDVERSION_PREV}-linux-amd64.tar.gz | tar xz -C /bin --xform='s/$/.old/x' --strip=1 --wildcards --no-anchored etcd +RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION_PREV}/etcd-v${ETCDVERSION_PREV}-linux-amd64.tar.gz \ + | tar xz -C /bin --xform='s/$/.old/x' --strip=1 --wildcards --no-anchored etcd \ + && chown root:root /bin/etcd.old \ + && chmod +x /bin/etcd.old ARG ETCDVERSION=3.1.10 ENV ETCDVERSION=$ETCDVERSION -RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION}/etcd-v${ETCDVERSION}-linux-amd64.tar.gz | tar xz -C /bin --strip=1 --wildcards --no-anchored etcd etcdctl +RUN curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION}/etcd-v${ETCDVERSION}-linux-amd64.tar.gz \ + | tar xz -C /bin --strip=1 --wildcards --no-anchored etcd etcdctl \ + && chown root:root /bin/etcd /bin/etcdctl \ + && chmod +x /bin/etcd /bin/etcdctl COPY etcd.py /bin/etcd.py COPY scm-source.json /scm-source.json diff --git a/etcd-cluster.yaml b/etcd-cluster.yaml index 7821d40..7b83a37 100644 --- a/etcd-cluster.yaml +++ b/etcd-cluster.yaml @@ -23,7 +23,8 @@ SenzaComponents: filesystem: tmpfs erase_on_boot: false options: size=1024m - appdynamics_application: 'etcd-cluster-{{Arguments.version}}' + scalyr_region: '{{Arguments.ScalyrRegion}}' + scalyr_account_key: '{{Arguments.ScalyrAccountKey}}' Type: Senza::TaupageAutoScalingGroup AutoScaling: Minimum: 5 @@ -35,6 +36,12 @@ SenzaInfo: Description: AWS Hosted Zone to work with - DockerImage: Description: Docker image of etcd-cluster. + - ScalyrAccountKey: + Description: Key for writing logs to scalyr + Default: '' + - ScalyrRegion: + Description: Scalyr region + Default: 'eu' StackName: etcd-cluster Resources: EtcdSecurityGroup: