Skip to content

Latest commit

 

History

History
88 lines (56 loc) · 2.24 KB

README.md

File metadata and controls

88 lines (56 loc) · 2.24 KB

nomad-playground

Just 'vagrant up' and you'll get working infrastructure to play with containers. Feel free to contribute.

Here we have:

  • Vagrant to create VMs
  • Ansible to provision our VMs
  • Docker to run containers
  • Consul to do service discovery
  • Nomad to do scheduling and run jobs
  • Fabio to do load balancing
  • Dnsmasq to help resolving .service.consul requests

infra

This envinronment was created under the influence of the following:

I use a simple java app from here: https://github.com/hypergrid-inc/basic-docker-tomcat-example

Requirements

It seems to work on the following configuration of local machine:

  • Virtualbox 4.3.36
  • Vagrant 1.6.5
  • Ansible 2.2.1.0

Howto

  1. git, virtualbox, vagrant and ansible must be installed

  2. git clone

  3. cd nomad-playground

  4. vagrant up

  5. vagrant ssh nomad-server1

  6. cd /vagrant

  7. nomad run fabio.nomad

  8. nomad run microbot.nomad

or/and

nomad run tomcat.nomad

or/and

nomad run mongo.nomad

  1. curl microbot.service.consul:9999

or

curl tomcat.service.consul:9999/sample

or being at your host machine just point your favourite browser to http://microbot.service.consul:9999 or http://tomcat.service.consul:9999/sample (don't forget to change dns to 10.100.200.11 to be able to resolve .service.consul names).

Known bugs

Domain name fabio.service.consul points to virtualbox's ip address 10.0.2.15. That way Fabio service registers itself in Consul.

License

BSD

Author Information

Andrew Nazarov