Skip to content

axelspringer/vagrant-kombinat

Repository files navigation

vagrant-kombinat

What we provide here, is Kombinat (our flavor of Mesos) in a box. We use CoreOS and Docker Swarm to run Apache Mesos with some additions on top.

😏 Sounds crazy? Because, that it is. Though, Docker Swarm provides us with many of the needed underlying technologies to use Apache Mesos. E.g. overlay networking, service orchestration and declarative infrastructure.

Provisioning may take a while, because the images are pulled in the background

We use the kombinat.yml to provision the Swarm with our Mesos stack.

Setup

Please, do a vagrant plugin update before you continue, as to make sure that you do not rely on some old versions of the Vagrant Ignition Plugin

Please, change the DISCOVERY_URL in config.ign to a working token for etcd, by executing curl -w "\n" 'https://discovery.etcd.io/new?size=3'

vagrant up
sudo echo "172.17.8.2   portainer.kombinat.lan" >> /etc/hosts
sudo echo "172.17.8.2   master.kombinat.lan" >> /etc/hosts
sudo echo "172.17.8.2   marathon.kombinat.lan" >> /etc/hosts
sudo echo "172.17.8.2   chronos.kombinat.lan" >> /etc/hosts

Play with it

Marathon http://marathon.kombinat.lan, Portainer http://portainer.kombinat.lan, Master http://master.kombinat.lan

Run the Swarm manager

vagrant ssh manager
docker info
docker node ls

Run the Swarm worker

vagrant ssh worker-1

Container in Overlay Network with Marathon

{
  "id": "/nginx",
  "cmd": null,
  "cpus": 1,
  "mem": 128,
  "disk": 0,
  "instances": 0,
  "acceptedResourceRoles": [
    "*"
  ],
  "container": {
    "type": "DOCKER",
    "volumes": [],
    "docker": {
      "image": "nginx",
      "network": "USER",
      "privileged": false,
      "forcePullImage": false
    }
  },
  "ipAddress": {
    "networkName": "proxy"
  },
  "healthChecks": [
    {
      "gracePeriodSeconds": 300,
      "intervalSeconds": 60,
      "timeoutSeconds": 20,
      "maxConsecutiveFailures": 3,
      "port": 80,
      "path": "/",
      "protocol": "HTTP",
      "ignoreHttp1xx": false
    }
  ]
}

License

MIT

Releases

No releases published

Packages

No packages published