Kontena Ansible
This Ansible configs automatically installing Kontena Server
(on master), Kontena Agent
(per node) and Kontena CLI
.
- Ansible >= 2.3
- Clone repo
git clone git@github.com:roquie/kontena-ansible.git
- Install dependencies:
ansible-galaxy install -r requirements.yml
- Create your own inventory folder inside a
inventory
directory. Don't forget write down servers IP's insidehosts
file. - Run it.
kontena master login --code secret https://domain_or_ip:8443
# kontena master login --code secret http://domain_or_ip:8080
- Don't forget to write own public key in the server and create
development
directory based onvagrant
. - Install
kontena-server
on Master server first
$ ansible-playbook -i inventory/development playbooks/start.yml --limit=master
- Login to the Master server, using secret code (
ks_initial_code
inside ainventory/development/master.yml
):
$ ansible-playbook -i inventory/development playbooks/start.yml --limit=master
- Create a development grid and then receive grid token
$ kontena grid create development && kontena grid env
- Copy-paste token and URI to the variables (
ka_master_uri
,ka_token
) inside ainventory/development/nodes.yml
- Install
kontena-agent
on the Nodes servers, like as:
$ ansible-playbook -i inventory/development playbooks/start.yml --limit=nodes
If u want install agent on same host where installed kontena-server
package, use this command:
$ ansible-playbook -i inventory/development playbooks/start.yml --limit=nodes --tags=kontena_agent
After installation and 1-3 minutes, node will be shown at list kontena node ls
.
ansible-playbook -i inventory/your playbooks/start.yml --tags=base_configure
ansible-playbook -i inventory/your playbooks/start.yml --tags=kontena_agent
ansible-playbook -i inventory/your playbooks/start.yml --tags=kontena_server
ansible-playbook -i inventory/your playbooks/start.yml --limit=master
ansible-playbook -i inventory/your playbooks/start.yml --limit=nodes
ansible-playbook -i inventory/your playbooks/start.yml --limit=cli
- create separate repo for
kontena-server
role & register her to the ansible-galaxy - create separate repo for
kontena-agent
role & register her to the ansible-galaxy - create separate repo for
kontena-cli
role & register her to the ansible-galaxy - write role for installing
kontena-cli
on GNU/Linux (yes, I'm so lazy for lift my fingers above the keyboard...) - automatically uninstall all installed packages:
docker
,kontena-master
,kontena-node
andkontena-cli
- write tests (for
kontena-server
andkontena-agent
they are ready)
- Ubuntu 16.04 LTS
- Ubuntu 14.04 LTS
cd /path/to/project
ansible-galaxy install -r requirements.yml
vagrant up
MIT