Code Monkey home page Code Monkey logo

docker-swarm-workshop's Introduction

Swarm workshop

This is the high level plan :: for the swarm workshop

So what we are going to see here is the following flow:

  1. Setup 1 Virtual Instances { via Virtualbox } or 1 Instance on AWS
  2. Setup 3 Virtual Instances { via Virtualbox } or 3 Instances on AWS
  3. Setup all the needed packadges, services etc on each of the vms/instances
  4. Configure each node individually
  5. Deply a demo application on top of the Swarm Cluster

This project uses Ansible to automate the entire process.

Once we are done for a kickstart you will need to:

  1. Install perquisites: Vagrnat (& Virtualbox), Ansible, Git + Optional requirements: AWS account for the aws flow.
  2. Invoke Ansible for infra services such as DNS, NTP etc like so: ansible-playbook playbooks/deploy-infra.yml - if you stop here you should have a clean vm named shelleg-infra01 with a Docker daemon you can play arround with Docker ...
  3. Invoke Ansible for swarm cluster like so: ansible-playbook playbooks/deploy-swarm-cluster.yml
  4. Deploy your application by running: ansible-playbook playbooks/deploy-app.yml [ still WIP ]
  5. Test the app lets run zulip via compose -> https://github.com/galexrt/docker-zulip/blob/master/docker-compose.yml

To definitely be continued ...

QuickStart

  • git clone this repo
  • Download all dependent roles like so:
ansible-galaxy install -r requirements.yml
  • Instantiate infra machine
ansible-playbook playbooks/deploy-infra.yml
  • Instantiate swarm machine(s)
ansible-playbook playbooks/deploy-swarm-cluster.yml

Testing your swarm cluster

cd vagrant
vagrant ssh swarm-mgr01
docker node ls

Should yield something like:

ID                           HOSTNAME        STATUS  AVAILABILITY  MANAGER STATUS
5ljlrm1lp2o5zpm99056hcnhf *  swarm-mgr01     Ready   Active        Leader
5rm45jkau11ion4kcqtix1um4    swarm-worker01  Ready   Active
bfyad0lw29cf0dgonvgd5y279    swarm-worker02  Ready   Active

BTW, this same command will fail on a worker node ... execute check-swarm-cluster.yml playbook and see !

docker-swarm-workshop's People

Contributors

hagzag avatar

Stargazers

 avatar Brandon Summers avatar Rafael Bodill avatar

Watchers

Rafael Bodill avatar  avatar James Cloos avatar Dan Hirsch avatar Miron Gofer avatar Liya Katz avatar  avatar Sergei Olshanetski avatar  avatar shelleg  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.