From acbde35503387166539e2f33e5b6af7f17001bc5 Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 1 Oct 2015 19:09:30 +0800 Subject: [PATCH] update --- etcd-arm/README.md | 2 ++ etcd-arm/bin/shadowsocks.sh | 2 +- etcd-arm/docker-compose.yml | 18 ++++++++++++++++++ etcd-arm/etc/confd/conf.d/shadowsocks.toml | 2 +- etcd-arm/etc/default/etcd | 6 +++--- 5 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 etcd-arm/docker-compose.yml diff --git a/etcd-arm/README.md b/etcd-arm/README.md index 0c11c5a..602198a 100644 --- a/etcd-arm/README.md +++ b/etcd-arm/README.md @@ -1,6 +1,8 @@ etcd-arm ======== +![](https://badge.imagelayers.io/vimagick/etcd-arm:latest.svg) + ![](https://coreos.com/assets/images/media/Fleet-Scheduling.png) ## Cross compilation for Raspberry Pi diff --git a/etcd-arm/bin/shadowsocks.sh b/etcd-arm/bin/shadowsocks.sh index 9af532f..6d824bc 100755 --- a/etcd-arm/bin/shadowsocks.sh +++ b/etcd-arm/bin/shadowsocks.sh @@ -10,7 +10,7 @@ grep -oP '(?<=

).*(?=

)' | cut -d : -f 2 | sed -e 'N;N;N;s/\n/,/g' \ - -e 's/$/,127.0.0.1/' \ + -e 's/$/,0.0.0.0/' \ -e 's/$/,1080/' \ -e 's/$/,300/' } | diff --git a/etcd-arm/docker-compose.yml b/etcd-arm/docker-compose.yml new file mode 100644 index 0000000..cfdbd72 --- /dev/null +++ b/etcd-arm/docker-compose.yml @@ -0,0 +1,18 @@ +etcd: + image: vimagick/etcd-arm + command: | + -name pi2 + -data-dir=/var/lib/etcd + -listen-client-urls http://0.0.0.0:2379 + -advertise-client-urls http://192.168.1.229:2379 + -listen-peer-urls http://0.0.0.0:2380 + -initial-advertise-peer-urls http://192.168.1.229:2380 + -initial-cluster-token pi-cluster + -initial-cluster pi0=http://192.168.1.228:2380,pi1=http://192.168.1.207:2380,pi2=http://192.168.1.229:2380 + -initial-cluster-state new + ports: + - "2379:2379" + - "2380:2380" + volumes: + - /var/lib/etcd + restart: always diff --git a/etcd-arm/etc/confd/conf.d/shadowsocks.toml b/etcd-arm/etc/confd/conf.d/shadowsocks.toml index 4d6b23c..c32c99e 100644 --- a/etcd-arm/etc/confd/conf.d/shadowsocks.toml +++ b/etcd-arm/etc/confd/conf.d/shadowsocks.toml @@ -5,4 +5,4 @@ keys = [ "/services/shadowsocks" ] check_cmd = "jq . {{.src}}" -#reload_cmd = "supervisorctl update" +reload_cmd = "systemctl restart shadowsocks-libev@client" diff --git a/etcd-arm/etc/default/etcd b/etcd-arm/etc/default/etcd index abcd95b..6fa35a6 100644 --- a/etcd-arm/etc/default/etcd +++ b/etcd-arm/etc/default/etcd @@ -1,9 +1,9 @@ ETCD_NAME=pi2 ETCD_DATA_DIR=/var/lib/etcd -ETCD_INITIAL_ADVERTISE_PEER_URLS=http://192.168.1.229:2380 -ETCD_LISTEN_PEER_URLS=http://192.168.1.229:2380 -ETCD_LISTEN_CLIENT_URLS=http://192.168.1.229:2379,http://127.0.0.1:2379 +ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 ETCD_ADVERTISE_CLIENT_URLS=http://192.168.1.229:2379 +ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380 +ETCD_INITIAL_ADVERTISE_PEER_URLS=http://192.168.1.229:2380 ETCD_INITIAL_CLUSTER_TOKEN=pi-cluster ETCD_INITIAL_CLUSTER=pi0=http://192.168.1.228:2380,pi1=http://192.168.1.207:2380,pi2=http://192.168.1.229:2380 ETCD_INITIAL_CLUSTER_STATE=new