Skip to content

PhearNet/engine

Repository files navigation

Engine Build StatusDependency Status

Nomad + Consul + Swarm as a System

Contents:

Overview:

This project aims lets you use the best of both Docker Swarm and HashiCorp Nomad/Consul worlds. Running docker swarm and registrator containers as a "nomad system job" results in orchestration of docker swarm on every node. in the configured data centers.

Both services(Nomad/Swarm) support Consul for service discovery. Nomad handles registering "nomad jobs" and swarm handles "docker-compose up" for docker-machine environments. The docker-compose containers will automagiclly added as services via the registrator

The nodejs application gathers telemetry as well as syncs public service DNS records from Consul to CloudFlare with help from docker registrator, statsd, logstash, and node.

Getting Started

Make sure to have the following installed:

Run the swarm:

npm install
vagrant up
vagrant ssh nomad-1
nomad run run.nomad
exit

Navigate to localhost:8501

Provisioning Containers

You can find the current "Swarm Leader IP" in the consul-ui under Key/Value -> Docker -> Swarm -> Leader. You can replace with the ip address found in the kv.

docker-compose/machine:

eval "$(docker-machine env --swarm <Swarm-Leader-IP>)"
docker-compose up

nomad:

nomad run some.service.nomad -address=<Swarm-Leader-IP>

Features:

Throughput Graph

v0.1.0

  • Consul Cluster(server/client/UI)
  • Nomad Cluster(server/client) with service discovery
  • Nomad "docker-swarm/registrator" job as a system
  • Puppet 4.X integration
  • Basic Devops(vagrant, packer, test-kitchen, bats)
  • Basic Telemetry(elasticsearch, statsd, collectd?, logstash)
  • Service Sync to CloudFlare

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published