terraform + mesos

Post on 16-Jul-2015

272 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Terraform + MesosHow to run a Mesos cluster using Terraform

What is Terraforming

Process of modifying planet’s atmosphere,

topography and ecology to make it

habitable by life.

What is Terraforming

Process of modifying infrastructure to make it

habitable by software.

What is Terraform

Open Source Tool

Infrastructure as Code

New Layer of Abstraction

Terraform Concepts

Command Line Tool

$ terraform get$ terraform plan -out master.plan$ terraform apply master.plan$ terraform destroy

Terraform Concepts

Configuration Files

resource "google_compute_instance" "mybox" {name = "mybox"machine_type = "n1-standard-2"zone = "europe-west1-d"

...}

Terraform Concepts

Execution Plan

resource "google_compute_instance" "mybox" {

name = "mybox"

machine_type = "n1-standard-2"

zone = "europe-west1-d"

...

}

+ module.mesos.google_compute_instance.mesos-master.0can_ip_forward: "" => "0"disk.#: "" => "1"disk.0.auto_delete: "" => "1"disk.0.image: "" => "ubuntu-os-cloud/ubuntu-1404-trusty-

v20150128"disk.0.type: "" => "pd-ssd"machine_type: "" => "n1-standard-2"metadata.#: "" => "1"metadata.0.#: "" => "4"metadata.0.clustername: "" => "presentation1"metadata.0.domain: "" => "example.com"metadata.0.mastercount: "" => "3"metadata.0.myid: "" => "0"metadata_fingerprint: "" => "<computed>"name: "" => "presentation1-mesos-master-0"...

Terraform Concepts

Providers

Terraform Concepts

Modules

Encapsulation of TF Functionality

Code Reusability

Terraform Workflow

Configure Cloud Provider Define Infrastructure

Generate Plan Apply Plan

Update Infrastructure Definition

Terraform Example

provider.tf (Google)server.tf (3x Debian Instance)network.tffirewall.tf

00m35s

Mesos

Purpose

Structure

Workflow

Traditional Data Center

Resource usage

Traditional Data Centre

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Mesos

Master

Slave Slave Slave

Master

Slave Slave Slave

Mesos - final setup

Terraform a Mesos cluster

Provider

Network

Firewall

Master nodes

Slave nodes

Demo time

What’s next?

● Open issues in GitHub

● Feature requests

● Blog posts http://container-

solutions.com/blog/

● Beer!

top related