diff --git a/projects/demo/etcd/README.md b/projects/demo/etcd/README.md index 0d759d824..c40c6d19f 100644 --- a/projects/demo/etcd/README.md +++ b/projects/demo/etcd/README.md @@ -10,13 +10,13 @@ restarts. ## Preparation -- Build the `etcd` image and then moby image: +- Build the `etcd` image and then moby image inside the `pkg` directory: ``` ./build-pkg.sh moby build etcd ``` -## InfraKit cluster setup (OUTDATED) +## InfraKit cluster setup This should create a HyperKit based, InfraKit managed `etcd` cluster with 5 `etcd` instances. @@ -53,14 +53,12 @@ Build the image and upload it: moby build etcd ``` -Start the infrakit components in separate windows: +Start infrakit as above: ``` -infrakit-group-default -infrakit-flavor-vanilla -infrakit-instance-gcp +./start-infrakit ``` Commit the configuration: ``` -infrakit group commit infrakit-gce.json +infrakit group commit infrakit-gcp.json ``` diff --git a/projects/demo/etcd/dfm-setup.sh b/projects/demo/etcd/dfm-setup.sh deleted file mode 100755 index e238d7d34..000000000 --- a/projects/demo/etcd/dfm-setup.sh +++ /dev/null @@ -1,46 +0,0 @@ -#! /bin/sh -## -## This script starts a etcd container which is used to bootstrap a -## local etcd cluster. The etcd container is started on a non-standard -## port to keep the standard port free for the cluster. -## -## If you have a local etcd installed (brew install etcd) you can -## point the cli at it as well: -## -## etcdctl --debug --endpoints http://0.0.0.0:2381 member list -## - -# debug -set -x -set -v - -# Change depending on the cluster size -NUMPEERS=5 - -# Start a local etcd for bootstrapping -NAME=etcd-bootstrap -PORT=2381 - -#UUID=$(uuidgen) -UUID=6c007a14875d53d9bf0ef5a6fc0257c817f0fb83 - -ID=$(docker run -d --rm --name ${NAME} \ - -p ${PORT}:${PORT} \ - quay.io/coreos/etcd:v3.1.5 /usr/local/bin/etcd \ - --debug \ - --name ${NAME} \ - --listen-client-urls http://0.0.0.0:${PORT} \ - --advertise-client-urls http://0.0.0.0:$PORT,http://192.168.65.2:$PORT \ - --initial-cluster-token ${NAME} \ - --initial-cluster-state new \ - --auto-compaction-retention 0) - -trap "docker kill ${ID}" 2 - -# Could poll until returns without error, but sleep for 2s for now -sleep 2 -docker exec -t ${ID} etcdctl --endpoints http://0.0.0.0:${PORT} mk discovery/${UUID}/_config/size ${NUMPEERS} - -echo "KEY: ${UUID}" - -docker logs -f ${ID} diff --git a/projects/demo/etcd/infrakit.json b/projects/demo/etcd/infrakit.json index c562fc5ef..263d070e3 100644 --- a/projects/demo/etcd/infrakit.json +++ b/projects/demo/etcd/infrakit.json @@ -16,7 +16,7 @@ "kernel+initrd": "etcd", "Disk" : 1024, "CPUs" : 1, - "Memory" : 1024 + "Memory" : 512 } }, "Flavor": { diff --git a/projects/demo/etcd/Dockerfile b/projects/demo/etcd/pkg/Dockerfile similarity index 100% rename from projects/demo/etcd/Dockerfile rename to projects/demo/etcd/pkg/Dockerfile diff --git a/projects/demo/etcd/Dockerfile.local b/projects/demo/etcd/pkg/Dockerfile.local similarity index 100% rename from projects/demo/etcd/Dockerfile.local rename to projects/demo/etcd/pkg/Dockerfile.local diff --git a/projects/demo/etcd/build-pkg.sh b/projects/demo/etcd/pkg/build-pkg.sh similarity index 100% rename from projects/demo/etcd/build-pkg.sh rename to projects/demo/etcd/pkg/build-pkg.sh diff --git a/projects/demo/etcd/etcd.sh b/projects/demo/etcd/pkg/etcd.sh similarity index 100% rename from projects/demo/etcd/etcd.sh rename to projects/demo/etcd/pkg/etcd.sh diff --git a/projects/demo/intro/intro.yml b/projects/demo/intro/intro.yml index d8bebaafb..92b41edba 100644 --- a/projects/demo/intro/intro.yml +++ b/projects/demo/intro/intro.yml @@ -27,7 +27,7 @@ services: net: host oomScoreAdj: -800 - name: nginx - image: "nginx:alpine" + image: "nginx:1.11.12-alpine" capabilities: - CAP_NET_BIND_SERVICE - CAP_CHOWN