Files
linuxkit/projects/demo/etcd/etcd.sh
Rolf Neugebauer 4b3422f76c demo: WIP for a local etcd setup
- Script to set up a DfM etcd for bootstrapping a cluser
- Custom/local etcd package for moby
  derived from the official image with script to start etcd
- YAML file to create a etcd moby image
- README with current instructions

This has a bunch of stuff, including the discovery URL hard coded.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-04 13:46:19 +01:00

23 lines
632 B
Bash
Executable File

#! /bin/sh
# debug
set -x
set -v
# Needs to come from metadata
UUID=6c007a14875d53d9bf0ef5a6fc0257c817f0fb83
DISCOVER_URL=http://192.168.65.2:2381/v2/keys/discovery/${UUID}
IP=$(ifconfig eth0 2>/dev/null|awk '/inet addr:/ {print $2}'|sed 's/addr://')
NAME=$(hostname)
/usr/local/bin/etcd \
--name ${NAME} \
--debug \
--log-package-levels etcdmain=DEBUG,etcdserver=DEBUG \
--initial-advertise-peer-urls http://${IP}:2380 \
--listen-peer-urls http://${IP}:2380 \
--listen-client-urls http://${IP}:2379,http://127.0.0.1:2379 \
--advertise-client-urls http://${IP}:2379 \
--discovery ${DISCOVER_URL}