Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 2.12 KB

README.md

File metadata and controls

40 lines (31 loc) · 2.12 KB

ansible-dcos-aws-playbook

Ansible Playbooks for setting up DC/OS on AWS. Default configuration of three masters, three slaves and two public slaves behing an AWS elastic load-balancer on a three subnet VPC, two public subnets on different availiability zones and one private subnet.

To try it out do:

  1. Configure ~/.boto as described in Boto Config:

    [Credentials]
    aws_access_key_id = <your_access_key_here>
    aws_secret_access_key = <your_secret_key_here>
    
  2. Add your *.pem file to the ssh-agent:

    $ ssh-agent bash 
    $ ssh-add ~/.ssh/<amazon key file> 
    
  3. Define the environment variables (see below). The AWS variables are mandatory.

  4. Run the playbook as ansible-playbook -i ec2.py main.yml to set up the EC2 instances, VPC, subnets, ELB etc.

  5. boto3 must be installed.

  6. Run the playbook as ansible-playbook -i ec2.py provision_cluster.yml to provision the instances with DC/OS nodes.

Environment variables

The following environment varibles can be configured for Ansible lookup

AWS

  • EC2_TARGET_OS: the target OS for the cluster nodes and can be any of [Ubuntu (default), CentOS]. Defines the AMI and SSH user for the provisioning.
  • EC2_TARGET_OS_VERSION: the version of the target e.g. Xenial for Ubuntu, 7 for CentOS.
  • AWS_EC2_KEY_PAIR: the name of the key pair to use when provisioning the cluster (EC2 instances etc.).
  • AWS_EC2_LB_CERT: the arn resource for the AWS ELB certificate.
  • AWS_S3_ELB_LOGS_BUCKET_NAME: the name of the S3 bucket where to store the ELB logs.

DC/OS

  • DCOS_CONTROLLER_INSTALL_DEMOS: true - install demo(s) (default), false - skip demo installation.

Demos