Infrastructure as code

resource "aws_instance" "mesos-master" {
  ami = "${atlas_artifact.ubuntu_docker.metadata_full.region-ap-northeast-1}"
  count = 3
  subnet_id = "${element(split(",", module.network.private_subnet_ids), count.index)}"
  instance_type = "m3.large"
  key_name = "${var.key_name}"
  tags {
    Name    = "mesos-aws-${var.name}-master-${count.index}"
    cluster = "aws-${var.name}"
    role    = "mesos-masters"
  }
  vpc_security_group_ids = [
    "${module.sg_ssh.sg_id}", 
    "${module.sg_web.sg_id}", 
    "${module.sg_default.sg_id}"
  ]
}

PaaS

terraform – infrastructure allocation

  • multiple providers
  • simple dsl
  • state per region

 

packer – ami baking

  • reduce launch time
  • use current ansible roles

PaaS

ansible – deployment tool?

  • prepare marathon json before launch

ansible – platform configuration

  • zookeeper, mesos, consul, weave...
  • get state dynamically from ec2

PaaS

missing parts

mesos

  • scale up/down
  • share dev/production agent instances?

vault – secretes management

  • secret storaga
  • key rolling
  • audit backend

Terraform

By Mikhail Shirkov

Terraform

  • 880