ContainerSolutions / dcos-ansible-packet

Ansible playbook for installing DC/OS on Packet cloud
4 stars 3 forks source link
ansible dcos packet

DC/OS Ansible Packet

Ansible playbook for setting up a single master DC/OS cluster on Packet Cloud. The cluster will consists of nodes with bootstrap, master, public agent and agent roles.

Contact

Frank Scholten @Frank_Scholten

Prerequisites

Example inventory file

Use the example inventory file and set the IP addresses.

[bootstrap]

bootstrap ansible_ssh_host=1.1.1.1 ansible_user=root

[masters]

master ansible_ssh_host=2.2.2.2 ansible_user=root

[agents]

agent1 ansible_ssh_host=3.3.3.3 ansible_user=root
agent2 ansible_ssh_host=4.4.4.4 ansible_user=root

[pubagents]

agent3 ansible_ssh_host=5.5.5.5 ansible_user=root

How to deploy

$ ansible-playbook -i inventory playbook.yml

After the cluster is installed the bootstrap node can be removed to save costs.

How to update the firewall

Add an IP to local_ips list in vars.yaml.example and run

$ ansible-playbook -i inventory playbook.yml -t firewall

This will update the ipset rules. To learn more about the firewall read this blog post

Testing

A Vagrant environment is available for local testing of setups.

Requirements:

A sample vars file is available under tests/vars.yaml.sample, which should be copied to the project root folder as vars.yaml and adapted as necessary (particularly local_ips).

VM hosts (and respective static IP addresses) are defined in the tests/vagrant-hosts.yml YAML file.

To provision the testing environment execute $ vagrant up in the project root.