Create a AWS HA Cluster with ansible, terraform , mesos, zk, consul, marathon , chronos and docker in CentOS 7
To Launch this cluster:
Pre Launch: Install terraform and ansible
- Create a terraform.tfvars file with the following attributes and save.
access_key = ""
secret_key = ""
ssh_key_name = ""
ssh_key = ""
- call
terraform apply
to launch the cluster . python tf-to-inventory.py
will creare a host file for ansible to use.ansible-playbook -i hosts init.yml --private-key privatekeyfile
This will launch your cluster in AWS EC2. You could then browse the mesos, marathon, chronos url in the following port
https://ec2-xx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com:5050
https://ec2-xx-xxx-xxx-xxx.us-west-1.compute.amazonaws.com:8080
For viewing the consul url you would have to create a tunnel to one of the masters:
ssh -i pathtoprivatekey -N -f -L 8500:localhost:8500 [email protected]
Once the tunnel is created you could view the consul ui from your laptop at localhost
You can now test adding a docker container to marathon using the information provided below. launch-docker-container-on-mesosphere
You can now check the status of the container from the consul UI.
##Component Installed:## ** Control Nodes ** ( Default 3 )
- Mesos Master
- Zookeeper
- Consul Server
- Consul UI
- Marathon
- Chronos
** Worker Nodes ** (Default 3)
- Mesos Slave
- Consul agent (client)
- Docker engine
- Add ngnix or haproxy for load balancing
- Add consul template to update load balancers
- Add ELK stack for docker aggregation logs
- Add security to harden the system