HOWTO build microservices infrastructure with Mantl


I’ve been watching ciscocloud/microservices-infrastructure for awhile, an ambitious project designed to get a microservices infrastructure setup with a reasonable set of defaults. Now they seem to be getting more serious about the project and have renamed it mantl, which they define as, “A container orchestrator, docker, a network stack, something to pool your logs, something to monitor health, a sprinkle of service discovery and some automation”. This sounds amazing, and certainly similar to something I did/try to do with my stax project… but just like with stax, there’s lots to do up front. Let’s give it a go. Will run it on AWS, but note that it can also be run on Vagrant, Openstack, Google Compute Engine, as well as bare metal, via Terraform. As usual I’m working from Debian, so if you’re in something else, or OSX, your initial setup will vary.


Getting started

Installing required software

apt-get update; apt-get install -y git curl unzip python-pip python-crypto-dbg
pip install ansible markupsafe

Installing and configuring mantl

git clone
cd mantl
pip install -r requirements.txt
cp terraform/
provider "aws" {
  access_key = "***REMOVED***"
  secret_key = "***REMOVED***"
  region = "us-east-1"

module "aws-dc" {
  source = "./terraform/aws"
  availability_zone = "us-east-1e"
  control_type = "t2.small"
  worker_type = "t2.small"
  ssh_username = "centos"
  source_ami = "ami-96a818fe"
  control_count = 3
  worker_count = 3

In AWS setup permssions and access control

  "Version": "2012-10-17",
  "Statement": [
      "Sid": "Stmt1433450536000",
      "Effect": "Allow",
      "Action": [
      "Resource": [

NOTE provide new admin password when prompted

ssh-keygen -b 2048 -f ~/.ssh/id_rsa -P ''
terraform get
terraform apply
ansible all -i plugins/inventory/ -m ping
cp terraform.sample.yml terraform.yml
vi terraform.yml
ansible-playbook -i plugins/inventory/ -e @security.yml terraform.yml

NOTE this things take time (about 30 minutes in my tests)

Login to Marathon


The Mantl project feels very well thought out, and once you have it up and running you can start to understand how all the bits work together. I think this is a far better way than trying to reinvent the wheel youself and have to deal with the new shinny apps out there that just don’t seem ready for primetime, or at least not mature enough to play well with others. I’m going to try and get this running within Vagrant and will report back if that’s successful on my laptop.