Skip to content

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

License

Notifications You must be signed in to change notification settings

thesandlord/google-cloud-swarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • You need to enable Google Cloud Deployment Manager V2 API using this link.

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.yaml file.

Delete a Cluster

./swarm-down.sh

Resize a Cluster

./swarm-resize.sh <NUM_WORKERS>

Options

Edit the options.yaml file to specify your options.

Cluster Config

  • Cluster Configuration Options
    • prefix = All nodes in the Swarm will start with this Prefix. This allows you to have multiple Swarms in the same project.
    • zone = Google Cloud Zone for the nodes - default: us-central1-f
  • Manager Options
    • manager_machine_type = Google Cloud Machine Type for the Manager nodes - default: n1-standard-1
    • manager_disk = Disk size in GB for the Manager nodes - default: 100
  • Worker Options
    • num = Number of Workers for the Cluster - default: 2
    • worker_machine_type = Google Cloud Machine Type for the Worker nodes - default: n1-standard-1
    • worker_disk = Disk size in GB for the Worker nodes - default: 100

How it works

These scripts are simple wrappers around a set of Deployment Manager templates.

It launches a VM for the Swarm Manager, and a Managed Instance Group for the workers.

This allows you to dynamically scale the number of workers as well as easily create Network Load Balancers that target the worker nodes.

Docker-Machine is used to connect to the Manager node over a secure TLS connection

Notes:
  • This is not an official Google product
  • This is not an official Docker product
  • Only tested on OSX

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •