Skip to content

eyal-lupu/vagrant-docker-swarm-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vagrant-docker-swarm-mode

This project sets up a Docker Swarm Mode cluster. It will create X managers (defaults to 1) and Y workers (defaults to 1).

Usage

Just start your cluster with vagrant up to kick in with the default setup. To modify the number of managers and workers edit the Vagrant file and modify the appropriate constants in the beginning of the file:

NUM_OF_MANAGERS=1
NUM_OF_WORKERS=1

Adding Managers and Workers

If additional managers and/or workers need to be added to an existing swarm just update the same variables as shown above and run vagrant up again. The new nodes will be added to the swarm.

Cleanup

To start from scratch make sure to remove the 'swarm-token' folder which will be created by the first manager started. Something like the following would make sense:

vagrant destroy --force
rm -rf swarm-token

This folder is used to store the tokens (managers and workers) for joining the swarm.

About

A Vagrant file to kick a Swarm Mode cluster

Resources

License

Stars

Watchers

Forks

Packages

No packages published