Git Product home page Git Product logo

ansible-aws's Introduction

Setup Environment to Use Ansible

sudo apt-get install python-dev
sudo pip install boto virtualenvwrapper
mkvirtualenv databus
pip install ansible
pip install awscli

Create Infrastructure

workon databus
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i localhost, create-infra.yml --extra-vars "vpc_name=ubp-lab4 env_name=dev ansible_python_interpreter=python"

Note: public subnets will not have auto-assign public IP set since Ansible module ec2_vpc_subnet does not support it.

Install Docker Engine and docker-py

EC2_INI_PATH=./inventory/ec2-inventory.ini ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ./inventory/ec2-inventory.py install-docker.yml

Deploy Services

EC2_INI_PATH=./inventory/ec2-inventory.ini ansible-playbook -i ./inventory/ec2-inventory.py deploy-services.yml

Cleanup AWS infrastructure

  • Delete instances (filter by project name)
  • Delete security groups (filter by project name)
  • Delete VPC (filter by project name)

Code Organization

.
├── build_env.yml -> an individual play
├── group_vars
│   └── all.yml -> default values global for all groups and roles
├── roles
│   └── create-vpc
│       ├── tasks
│       │   └── main.yml -> tasks for this role
│       └── vars
│           └── main.yml -> role specific variables
└── site.yml -> playbook including all individual plays

ansible-aws's People

Contributors

luafran avatar

Watchers

James Cloos 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.