Skip to content

Instantly share code, notes, and snippets.

@rexey3s
Created March 22, 2016 10:15
Show Gist options
  • Save rexey3s/f746f09235502e9f51d5 to your computer and use it in GitHub Desktop.
Save rexey3s/f746f09235502e9f51d5 to your computer and use it in GitHub Desktop.
docker-machine create -d generic \
--engine-storage-driver=overlay --swarm --swarm-master \
--swarm-image hypriot/rpi-swarm:latest \
--swarm-discovery="consul://10.31.57.70:8500" \
--engine-opt="cluster-store=consul://10.31.57.70:8500" \
--engine-opt="cluster-advertise=eth0:2376" \
--generic-ip-address=$(getip swarm-dc1-pi01.local) \
swarm-master
docker-machine create -d generic \
--engine-storage-driver=overlay --swarm \
--swarm-image hypriot/rpi-swarm:latest \
--swarm-discovery="consul://10.31.57.70:8500" \
--engine-opt="cluster-store=consul://10.31.57.70:8500" \
--engine-opt="cluster-advertise=eth0:2376" \
--generic-ip-address=$(getip swarm-dc1-pi02.local) \
node-01
-- Get IP of Hostname ---
function getip() { (traceroute $1 2>&1 | head -n 1 | cut -d\( -f 2 | cut -d\) -f 1) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment