/google-cloud-swarm

Scripts to create and manage a Docker Swarm cluster on Google Cloud Platform

Primary LanguageShellApache License 2.0Apache-2.0

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 ID
  • NUM_MANAGERS= Number of Managers for the Cluster - default: 1
  • NUM_WORKERS= Number of Workers for the Cluster - default: 2
  • SWARM_SECRET= The secret required to join the Cluster
  • PREFIX= 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-1
  • WORKER_ZONE= Google Cloud Zone for the Worker nodes - default: us-central1-f
  • WORKER_DISK= Disk size in GB for the Worker nodes - default: 100
  • MANAGER_MACHINE_TYPE= Google Cloud Machine Type for the Manager nodes - default: n1-standard-1
  • MANAGER_ZONE= Google Cloud Zone for the Manager nodes - default: us-central1-f
  • MANAGER_DISK= Disk size in GB for the Manager nodes - default: 100
  • ENGINE_INSTALL_URL= The Docker Engine Download URL - default: experimental.docker.com
  • TAGS= 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