DEPENDENCIES
-
This assumes you have flashed your raspberry pi with the Hypriot flash tool
-
You will need to add the names you used in the flash tool to the file nodenames.txt. currently it has 4 entries which are master, node1, node2, node3. Make sure you follow this name convention when using dockfather. Add nodes as you wish to scale the cluster
-
You will need to have ansible installed.
-
Mac Users
brew install ansible
- Non mac users VISIT ANSIBLE
- clone the repo and change into the new directory
git clone https://github.com/AdamOssenford/dock-father.git
cd dock-father
- OPTIONAL - install sshpass to avoid typing raspberry
brew install http://git.io/sshpass.rb
- OPTIONAL - add your public key to the file roles/common/files/public_key.txt
- bootstrap your raspberry pi2 and launch a swarm cluster
./dock-father.sh
- launch a swarm cluster only (only works after running dockfather)
./swarm-only.sh
This script was written to make it easy enough for anyone to go from fresh hypriot install on Raspberry pi2 to running a docker-swarm as easy as possible. This script should populate the Ansible inventory file based off the .local dns and then run the installation of packages, upgrade docker to 1.8.1 and start a swarm cluster.
Watch My Docker Raspberry Pi Talk on Dock-Father
The following is a list of contributors, inspirations, code examples, and developers who assisted in making this possible
- update to new versions of docker using hypriot packages
- this needs to be setup with TLS and certificates
- in the docs directory is a script that shows all commands to generate the certificates needed to run the swarm of TLS
- ports will most likely change to 2376 to reflect TLS
- the dockeropts file /etc/default/docker did not handle the docker launch with the TLS certs. The startup scripts will have to be recreated and possibly deployed via the ansible role for swarm