Git Product home page Git Product logo

dcos-up's Introduction

DCOS terraform infrastructure

Sets up DCOS infrastructure on AWS.

Install terraform

Download terraform for your operating system from Terraform Download page.

For OSX, it will be:

OS_DIST=darwin

For Linux

OS_DIST=linux

Now, assuming you're on a amd64 arch, you can install by running the following:

    cd $HOME
    TF_VERSION=0.6.14
    wget https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_${OS_DIST}_amd64.zip
    unzip terraform_${TF_VERSION}_${OS_DIST}_amd64.zip
    ln -s $HOME/terraform_${TF_VERSION}_${OS_DIST}_amd64 /usr/local/terraform
    export PATH=/usr/local/terraform:$PATH

Get this project

mkdir -p $HOME/dcos-terraform
cd $HOME/dcos-terraform
git clone https://github.com/data-fellas/dcos-up.git .

Create terraform credentials file

mkdir -p $HOME/.aws
cat > $HOME/.aws/terraform <<EOF
#!/bin/bash
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
export AWS_DEFAULT_REGION="us-east-1"
EOF

See the plan

cd $HOME/dcos-terraform
source $HOME/.aws/terraform
terraform plan

Create infrastructure

cd $HOME/dcos-terraform
source $HOME/.aws/terraform
terraform apply

This will create all AWS resources and start the process of setting up DCOS masters, agents and the bootstrap node.

Infrastructure name

The template defines infrastructure name using the infra_name variable. The default name is test_infra, to change the name, for any Terraform operation:

cd $HOME/dcos-terraform
source $HOME/.aws/terraform
export TF_VAR_infra_name=myinfra
terraform apply
...

How does this work

The terraform apply command makes sure that all machines come up on the cloud provider and that all of them are set up for DCOS + have consul installed. From here, consul takes over. The consul-watch-nodes.py watcher awaits for all master and agent nodes. Once these are up, the watcher triggers the bootstrap node bootstrap process: https://docs.mesosphere.com/concepts/installing/installing-enterprise-edition/manual-installation/. When the bootstrap process finishes, the bootstrap node has the bootstrap docker container running. This container is what master and agents use to download dcos_install.sh program. The final step on the bootstrap node is registering bootstrap container service.
This service is then detected by the consul-service-watch.py, this watch triggers setup-dcos-node.sh run on master and agent nodes.
Once setup-dcos-node.sh finishes on all nodes, DCOS installation is complete.

Operating system

This setup uses CentOS 7. AMI IDs:

  • US East (N. Virginia): ami-6d1c2007
  • US West (Oregon): ami-d2c924b2
  • US West (N. California): ami-af4333cf
  • EU (Frankfurt): ami-9bf712f4
  • EU (Ireland): ami-7abd0209
  • Asia Pacific (Singapore): ami-f068a193
  • Asia Pacific (Sydney): ami-fedafc9d
  • Asia Pacific (Tokyo): ami-eec1c380
  • Asia Pacific (Seoul): ami-c74789a9
  • South America (Sao Paulo): ami-26b93b4a

License

Copyright 2016 Data Fellas SPRL

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

dcos-up's People

Contributors

guydavis avatar frbayart avatar radekg avatar petervandenabeele avatar ryanmaclean avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.