Dockerized Local Clouds

Avdhoot, Faisal & Prince

Or..

Transmogrifying our pet clouds into sheep...

Aims

  • Only need cloud name
  • Uses script to create terraform templates
  • Single command create/destroy cloud
  • Manage software versions etc using saltstack
  • Run on local VM infrastructure

Quick Glossary

Terraform

  • Infrastructure resource management
  • Resource = VM, DNS etc.
  • Works with AWS, OpenStack etc
  • Explicitly calls out all resources
  • Very verbose
  • Will cleanly create/destroy resources
  • Can minimally provision
  • Can plan a change

Example

 

resource "openstack_compute_instance_v2" "cm0" {

    name = "${format("%v-%v","cm0", var.cloudid)}"

    image_name = "${var.image_name}"

    flavor_name = "m1.small"

    region = "${var.region}"

    connection {

            user = "root"

            key_file = "${var.key_file}"

        }

 

Salt Stack

  • Configuration Manager + Orchestrator
  • Master-minion model
  • salt-minion runs on each machine
  • Very powerful & fast
  • Massively parallel
  • State-based configuration

Workflow

Workflow..

  • User provides cloud-name
  • Script creates folder with terraform templates
  • User checks using 'terraform plan'
  • User does 'terraform apply' to create resources
  • New VM automatically added to salt
  • Docker and related tools deployed using salt
  • Server configuration generated using predefined data
  • Cloudmaster/node deployed using salt-events
  • Almost completely automatic deployment

Running Cloud

Questions ?

DockerLocalCloud

By faisyl

DockerLocalCloud

  • 454