google-cloud-swarm
Scripts to create and manage a Docker Swarm cluster on Google Cloud Platform
Prerequisites
Before you start
Make sure you create a Google Cloud Project
Login: gcloud init
Create a Cluster
./swarm-up.sh
By default, this will create a cluster with one manager and two workers. You can edit this and more options in the options.sh file.
Delete a Cluster
./swarm-down.sh
Options
Edit the options.sh file to specify your options.
PROJECT_ID
= REQUIRED - The Google Cloud Project IDNUM_MANAGERS
= Number of Managers for the Cluster - default: 1NUM_WORKERS
= Number of Workers for the Cluster - default: 2SWARM_SECRET
= The secret required to join the ClusterPREFIX
= All nodes in the Swarm will start with this Prefix. This allows you to have multiple Swarms in the same project.WORKER_MACHINE_TYPE
= Google Cloud Machine Type for the Worker nodes - default: n1-standard-1WORKER_ZONE
= Google Cloud Zone for the Worker nodes - default: us-central1-fWORKER_DISK
= Disk size in GB for the Worker nodes - default: 100MANAGER_MACHINE_TYPE
= Google Cloud Machine Type for the Manager nodes - default: n1-standard-1MANAGER_ZONE
= Google Cloud Zone for the Manager nodes - default: us-central1-fMANAGER_DISK
= Disk size in GB for the Manager nodes - default: 100ENGINE_INSTALL_URL
= The Docker Engine Download URL - default: experimental.docker.comTAGS
= Google Cloud Instance Tags for the nodes in the cluster - default: swarm-cluster
Notes:
- This is not an official Google product
- This is not an official Docker product
- Only tested on OSX