Skip to content

Commit 95f5621

Browse files
Stefan WaltherStefan Walther
Stefan Walther
authored and
Stefan Walther
committed
docs(local-vagrant): some clarifications
1 parent 8cb1721 commit 95f5621

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

local-bash/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Summary
44

5-
- Create a few machines in the local VirtualBox environment
5+
- Create a few machines on your local VirtualBox
66
- Init a swarm (manager + worker nodes)
7-
- Deploy a docker-compose (v3) file
7+
- Deploy a Docker stack (Docker compose v3; swarm mode)
88

99
## Prerequisites
1010

local-vagrant/README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Deploy a swarm cluster on your local machine (using Vagrant)
2+
3+
## Summary
4+
5+
The following tasks will be performed:
6+
7+
- Create a few machines on your local VirtualBox
8+
- Init a Docker swarm (manager + worker nodes)
9+
- Deploy a Docker stack (Docker compose v3; swarm mode)
10+
111

212
## Prerequisites
313

@@ -17,17 +27,17 @@ $ vagrant up
1727

1828
This will
1929

20-
- provision 1 manager,
21-
- 3 workers and
30+
- provision 3 managers,
31+
- 2 workers and
2232
- deploy, initialize a docker swarm and
23-
- deploy the services as defined in `.docker-stack.yml`.
33+
- deploy the services as defined in `./../lib/docker-stack.yml`.
2434

2535
## Configuration
2636

2737
Open the `config.yml` file to change the configuration options:
2838

29-
- `NUM_OF_MANAGERS` - Number of managers to create (defaults to `1`).
30-
- `NUM_OF_WORKERS` - Number of workers to create (defaults to `3`).
39+
- `NUM_OF_MANAGERS` - Number of managers to create (defaults to `3`).
40+
- `NUM_OF_WORKERS` - Number of workers to create (defaults to `2`).
3141
- `MEMORY` - Allocated memory for each of the machines (defaults to `1024`)
3242
- `NUM_CPUS` - Allocated number of CPUs for each of the machines (defaults to `2`)
3343

local-vagrant/Vagrantfile

+5
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
116116
node.vm.provision "shell", inline: @initWorker
117117

118118
# Todo: Not really nice, but couldn't find any better way to provision one of the managers at "the end" of the process
119+
# Todo: This ugly hack is actually the main reason why this solution is not really nice and a combination of
120+
# - vagrant & bash
121+
# - vagrant & ansible
122+
# might be the better and more stable approach.
123+
119124
# Any hint welcome how to improve this ...
120125
if NUM_OF_WORKERS == workerNumber
121126
node.vm.provision :host_shell do |host_shell|

local-vagrant/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NUM_OF_MANAGERS: 1
2-
NUM_OF_WORKERS: 3
1+
NUM_OF_MANAGERS: 3
2+
NUM_OF_WORKERS: 2
33
MEMORY: 1024
44
NUM_CPUS: 2

0 commit comments

Comments
 (0)