Add Swarm cluster to mcp11-k8s-calico model
The change also fixes the network configuration of the infra node and
adds scripts to deploy Kubnernetes environments.
Change-Id: Ib8b3f01210be9180d9c8eaf8dfe885a4475fd82b
diff --git a/scripts/docker_swarm.sh b/scripts/docker_swarm.sh
new file mode 100755
index 0000000..8037590
--- /dev/null
+++ b/scripts/docker_swarm.sh
@@ -0,0 +1,9 @@
+#!/bin/bash -x
+exec > >(tee -i /tmp/"$(basename "$0" .sh)"_"$(date '+%Y-%m-%d_%H-%M-%S')".log) 2>&1
+
+salt -C 'I@docker:swarm' state.sls docker.host
+salt -C 'I@docker:swarm:role:master' state.sls docker.swarm
+salt -C 'I@docker:swarm' state.sls salt.minion.grains
+salt -C 'I@docker:swarm' mine.update
+salt -C 'I@docker:swarm:role:manager' state.sls docker.swarm -b 1
+salt -C 'I@docker:swarm:role:master' cmd.run 'docker node ls'