-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add README. Comment on ansible prereqs on targets.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# README - Setup docker swarm # | ||
|
||
## 0. Prerequisites ## | ||
|
||
You must install `Ansible` on the control machine, preferably in a virtual Python environment: | ||
|
||
virtualenv pyenv | ||
. pyenv/bin/activate | ||
pip install ansible==2.2 netaddr | ||
|
||
## 1. Prepare your inventory ## | ||
|
||
An single inventory file should be created at `hosts.yml`. Both `vagrant` and `ansible` will use this. An example inventory file can be found [here](hosts.yml.example). | ||
|
||
## 2.1 Setup with Vagrant and Ansible ## | ||
|
||
If we want a full Vagrant environment (of course we will also need `vagrant` installed), then: | ||
|
||
vagrant up | ||
|
||
In this case, `vagrant` will provide the virtual machines (via virtualbox) and setup the private network, | ||
and then will delegate to an `ansible` playbook to actually setup the swarm nodes. | ||
|
||
## 2.2 Setup with Ansible only ## | ||
|
||
If the target machines (either virtual or physical) are already setup and networked (usually in a private network), | ||
then we can directly play the Ansible playbook: | ||
|
||
ansible-playbook play.yml | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters