This vagrantfile will create a docker swarm cluster for a self training environment. The swarm will be initialized, and will join worker nodes to the swarm.
12 GB Ram, 4 CPU threads.
-
Download and install Git, Vagrant, and Virtualbox. https://git-scm.com/downloads https://www.vagrantup.com/downloads.html https://www.virtualbox.org/wiki/Downloads
-
Open a Git-Bash prompt from the program manager.
-
Install plugin to allow shared Filesystem: vagrant plugin install vagrant-vbguest
-
git clone https://github.com/dswan2/InstantDockerSwarmCluster
-
cd InstantDockerSwarmCluster
-
Vagrant up
-
Vagrant ssh docker0
-
Edit vagrantfile to customize:
Absolute minimum (Needs 4vcpus/12GB): WORKER_NODES = 1 MANAGERMEM = 3000 MANAGERCPUS = 1 WORKERMEM = 2000 WORKERCPUS = 1
Recommended (Needs 8vcpus/16GB): WORKER_NODES = 3 MANAGERMEM = 3000 MANAGERCPUS = 2 WORKERMEM = 2500 WORKERCPUS = 2