Giter Site home page Giter Site logo

kong / aws-docker-swarm-cluster-deployer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ulucaydin/aws-docker-swarm-cluster-deployer

3.0 25.0 4.0 179 KB

Ansible automation to create highly-available Docker Swarm clusters on AWS ecosystem (via AWS CloudFormation).

License: MIT License

Makefile 19.83% Shell 80.17%

aws-docker-swarm-cluster-deployer's Introduction

License

Ansible & Cloud Formation automation for creating Highly-Available Docker Swarm clusters on AWS

Scalable Docker Swarm cluster deployment using the combination of AWS CloudFormation to create resources (such as EC2, VPC, AutoScaling etc..) and Ansible to automate the process with a single command. Deployment EC2 instances use CoreOS as it's ideal for this scenario.

If a Stack already exist with the given stack name, it will update. Otherwise creates a new stack from scratch.

Topology of Deployment

Topology

Highlights

  • CoreOS as the host OS for all instances.
  • Self provisioning of instances using cloud-config of CoreOS
  • Two launch configurations, auto scaling groups and elastic load balancers are created: Masters and Minions
  • Minions auto scaling group depends on the creation of the Master auto scaling group to prevent race condition.
  • Etcd enabled for Masters and disabled for minions.
  • Etcds run on master nodes which automatically create a ring cluster by using the discovery url, hence highly-available.
  • Docker Swarm managers on master nodes join the Swarm cluster by using their local Etcd configuration.
  • Docker Swarm minions join the cluster using Master ELB DNS to ensure high-availability.

Quickstart Guide:

  1. Install Docker and Ansible on your local and clone this repo.

  2. Edit group_vars/all/credentials.yml.example and change it as group_vars/all/credentials.yml

  3. Edit group_vars/all/common.yml as it fits your needs.

  4. Make sure to create a keypair in AWS IAM.

  5. Create the CloudFront Stack using Ansible

make create_docker_swarm"
  1. Once the Stack creation is complete, Ansible will out provide the output of Swarm Master as related information and swarm node http load balancer

  2. From your local, connecto Swarm Master and see info: docker -H tcp://<MasterElbDns>:4000 info

  3. An example deployment to all nodes from your local: docker -H tcp://<MasterElbDns>:4000 run -d -p 80:80 nginx

aws-docker-swarm-cluster-deployer's People

Contributors

halfa avatar hutchic avatar shashiranjan84 avatar ulucaydin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.