Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Armon Dadgar @armon

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

 

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

ATLAS

Slide 15

Slide 15 text

Management Collaboration Security Web Interface CLI Core Functionality Open Source The relationship between Otto and Atlas is like Git and GitHub Git Otto GitHub Atlas

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

Nomad Distributed Scheduler Easily Deploy Applications Job Specification

Slide 18

Slide 18 text

example.nomad # Define our simple redis job job "redis" { # Run only in us-east-1 datacenters = ["us-east-1"] # Define the single redis task using Docker task "redis" { driver = "docker" config { image = "redis:latest" } resources { cpu = 500 # Mhz memory = 256 # MB network { mbits = 10 dynamic_ports = ["redis"] } } } }

Slide 19

Slide 19 text

Job Specification Declares what to run

Slide 20

Slide 20 text

Job Specification Nomad determines where and manages how to run

Slide 21

Slide 21 text

Job Specification Powerful yet simple

Slide 22

Slide 22 text

example.nomad # Define our simple redis job job "redis" { # Run only in us-east-1 datacenters = ["us-east-1"] # Define the single redis task using Docker task "redis" { driver = "docker" config { image = "redis:latest" } resources { cpu = 500 # Mhz memory = 256 # MB network { mbits = 10 dynamic_ports = ["redis"] } } } }

Slide 23

Slide 23 text

Containerized Virtualized Standalone Docker Qemu / KVM Java Jar Static Binaries

Slide 24

Slide 24 text

Containerized Virtualized Standalone Docker Jetpack Windows Server Containers Qemu / KVM Hyper-V Xen Java Jar Static Binaries C#

Slide 25

Slide 25 text

Nomad Application Deployment Docker Multi-Datacenter and Multi-Region Flexible Workloads Bin Packing HCL Job Specifications

Slide 26

Slide 26 text

Nomad Easy for developers Operationally simple Built for scale

Slide 27

Slide 27 text

Easy for developers

Slide 28

Slide 28 text

Terminal $ nomad agent -dev ==> Starting Nomad agent... ==> Nomad agent configuration: Atlas: Client: true Log Level: DEBUG Region: global (DC: dc1) Server: true ==> Nomad agent started! Log data will stream in below: [INFO] serf: EventMemberJoin: nomad.global 127.0.0.1 [INFO] nomad: starting 4 scheduling worker(s) for [service batch _core] [INFO] raft: Node at 127.0.0.1:4647 [Follower] entering Follower state [INFO] nomad: adding server nomad.global (Addr: 127.0.0.1:4647) (DC: dc1) [DEBUG] client: applied fingerprints [storage arch cpu host memory] [DEBUG] client: available drivers [docker exec]

Slide 29

Slide 29 text

Operationally simple

Slide 30

Slide 30 text

Client Server

Slide 31

Slide 31 text

Built for scale

Slide 32

Slide 32 text

Built on experience gossip consensus

Slide 33

Slide 33 text

Built on research gossip consensus

Slide 34

Slide 34 text

Single Region Architecture SERVER SERVER SERVER CLIENT CLIENT CLIENT DC1 DC2 DC3 FOLLOWER LEADER FOLLOWER REPLICATION FORWARDING REPLICATION FORWARDING RPC RPC RPC

Slide 35

Slide 35 text

Multi-region Architecture SERVER SERVER SERVER FOLLOWER LEADER FOLLOWER REPLICATION FORWARDING REPLICATION REGION  B  GOSSIP REPLICATION REPLICATION FORWARDING REGION  FORWARDING  REGION  A SERVER FOLLOWER SERVER SERVER LEADER FOLLOWER

Slide 36

Slide 36 text

Thousands of regions Tens of thousands of clients per region Thousands of jobs per region

Slide 37

Slide 37 text

Optimistically Concurrent

Slide 38

Slide 38 text

Data Model

Slide 39

Slide 39 text

HASHICORP Evaluations ~= State Change Event

Slide 40

Slide 40 text

HASHICORP Create / Update / Delete Job Node Up / Node Down Allocation Failed

Slide 41

Slide 41 text

HASHICORP “Scheduler” = func(Eval) => []AllocUpdates

Slide 42

Slide 42 text

HASHICORP Scheduler func’s can specialize (Service, Batch, System, etc)

Slide 43

Slide 43 text

HASHICORP Evaluation Enqueue

Slide 44

Slide 44 text

HASHICORP Evaluation Dequeue

Slide 45

Slide 45 text

HASHICORP Plan Generation

Slide 46

Slide 46 text

HASHICORP Plan Execution

Slide 47

Slide 47 text

HASHICORP External  Event Evalua?on  Crea?on Evalua?on  Queuing Evalua?on  Processing Op?mis?c  Coordina?on State  Updates

Slide 48

Slide 48 text

Case study

Slide 49

Slide 49 text

Case study 3 servers in NYC3 100 clients in NYC3, SFO1, AMS2/3 1000 Containers

Slide 50

Slide 50 text

Case study <1s to schedule 1s to first start 6s to 95% 8s to 99%

Slide 51

Slide 51 text

Nomad Easy for developers Operationally simple Built for scale

Slide 52

Slide 52 text

HASHICORP Nomad 0.1 Released in October Service and Batch Scheduler Docker, Qemu, Exec, Java Drivers

Slide 53

Slide 53 text

HASHICORP Nomad 0.2 - Service Workloads Service Discovery System Scheduler Restart Policies Enhanced Constraints

Slide 54

Slide 54 text

HASHICORP Nomad 0.3 - Batch Workloads Cron Job Queuing Latency-Aware Scheduling

Slide 55

Slide 55 text

nomadproject.io

Slide 56

Slide 56 text

Nomad

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Otto The Successor 
 to Vagrant

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

Vagrant Our biggest OSS project Built in 2010 Re-imagined for 2015

Slide 61

Slide 61 text

Vagrant What have we learned?

Slide 62

Slide 62 text

Vagrant Development environment deviation is minimal

Slide 63

Slide 63 text

Vagrant Developers want to deploy

Slide 64

Slide 64 text

Vagrant Microservices are the future

Slide 65

Slide 65 text

Otto The Successor 
 to Vagrant

Slide 66

Slide 66 text

Otto Development Deployment Microservices Appfile

Slide 67

Slide 67 text

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis ex nec lectus auctor semper at eu nunc. Nulla lorem mi, interdum eget libero eleifend, euismod laoreet neque. Donec nec enim rhoncus, varius nisi ut, hendrerit sem. Cras nec vestibulum nunc, blandit cursus eros. Etiam tincidunt cursus turpis, sit amet lacinia nunc consectetur at. Vestibulum nec faucibus neque, a dapibus elit. Cras aliquam, enim ut tincidunt aliquam, enim nunc hendrerit leo, ac fringilla lectus lacus quis arcu. Appfile

Slide 68

Slide 68 text

Appfile

Slide 69

Slide 69 text

THIS FILE INTENTIONALLY LEFT BLANK Appfile

Slide 70

Slide 70 text

application { name = "my-store" type = "ruby" dependency { source = "github.com/hashicorp/otto/examples/postgresql" } } customization "ruby" { ruby_version = "2.1" } Appfile

Slide 71

Slide 71 text

Codification vs. Fossilization

Slide 72

Slide 72 text

Otto is smart. Otto will get smarter.

Slide 73

Slide 73 text

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quis ex nec lectus auctor semper at eu nunc. Nulla lorem mi, interdum eget libero eleifend, euismod laoreet neque. Donec nec enim rhoncus, varius nisi ut, hendrerit sem. Cras nec vestibulum nunc, blandit cursus eros. Etiam tincidunt cursus turpis, sit amet lacinia nunc consectetur at. Vestibulum nec faucibus neque, a dapibus elit. Cras aliquam, enim ut tincidunt aliquam, enim nunc hendrerit leo, ac fringilla lectus lacus quis arcu. Appfile Compilation 

Slide 74

Slide 74 text

$ otto compile ==> Loading Appfile... ==> Fetching all Appfile dependencies... ==> Compiling... Application: vault (go) Project: vault Infrastructure: aws (simple) Compiling infra... Compiling foundation: consul ==> Compiling main application… ==> Compilation success! This means that Otto is now ready to start a development 
 environment, deploy this application, build the 
 supporting infrastructure, and more. See the help for 
 more information.

Slide 75

Slide 75 text

$ tree .otto .otto "## appfile $ "## Appfile.compiled $ # version "## compiled $ "## app $ $ "## dev $ $ $ # Vagrantfile $ $ "## dev-dep $ $ $ "## Vagrantfile $ $ $ "## Vagrantfile.fragment $ $ $ "## build.sh $ $ $ # upstart.conf $ $ # foundation-consul $ $ "## app-build $ $ $ "## main.sh $ $ $ # upstart.con … 27 directories, 49 files

Slide 76

Slide 76 text

No content

Slide 77

Slide 77 text

Fossilization

Slide 78

Slide 78 text

Development  

Slide 79

Slide 79 text

otto dev

Slide 80

Slide 80 text

$ otto dev … ==> Caching SSH credentials from Vagrant... ==> Development environment successfully created! IP address: 172.16.1.154 A development environment has been created for writing a generic Ruby-based app. Ruby is pre-installed. To work on your project, edit files locally on your own machine. The file changes will be synced to the development environment. When you're ready to build your project, run 'otto dev ssh' to enter the development environment. You'll be placed directly into the working directory where you can run 'bundle' and 'ruby' as you normally would. You can access any running web application using the IP above.

Slide 81

Slide 81 text

$ otto dev ssh ==> Executing SSH. This may take a few seconds... Welcome to Ubuntu 12.04.1 LTS * Documentation: https://help.ubuntu.com/ Last login: Sun Sep 27 17:20:30 2015 from 172.16.1.1 vagrant@precise64:/vagrant$

Slide 82

Slide 82 text

$ otto dev address 172.16.1.154

Slide 83

Slide 83 text

$ otto dev destroy ==> Destroying the local development environment... ==> default: Stopping the VMware VM... ==> default: Deleting the VM... ==> default: Running cleanup tasks for 'shell' provisioner... ==> default: Running cleanup tasks for 'shell' provisioner... ==> Deleting development environment metadata... ==> Development environment has been destroyed!

Slide 84

Slide 84 text

A wonderfully simple development experience

Slide 85

Slide 85 text

Development  

Slide 86

Slide 86 text

Deployment  

Slide 87

Slide 87 text

No content

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

Today's Best Practices WEB DB MICRO SERVICES PRIVATE  SUBNET  PUBLIC  SUBNET  INTERNAL  NETWORK LB BASTION NAT

Slide 90

Slide 90 text

WEB DB MICRO SERVICES PRIVATE  SUBNET  PUBLIC  SUBNET  INTERNAL  NETWORK LB BASTION NAT Today's Best Practices COMPLEXITY

Slide 91

Slide 91 text

No content

Slide 92

Slide 92 text

$ otto infra $ otto build $ otto deploy

Slide 93

Slide 93 text

Microservices Monolithic Microservices

Slide 94

Slide 94 text

Microservices

Slide 95

Slide 95 text

Microservices

Slide 96

Slide 96 text

Otto

Slide 97

Slide 97 text

application { name = "my-store" type = "ruby" dependency { source = "github.com/hashicorp/otto/examples/postgresql" } } customization "ruby" { ruby_version = "2.1" } Appfile

Slide 98

Slide 98 text

$ otto dev … [otto] Installing dependency: postgresql [otto] Configuring Consul service: postgresql ==> Development environment successfully created! IP address: 172.16.1.154 A development environment has been created for writing a generic Ruby-based app. Ruby is pre-installed. To work on your project, edit files locally on your own machine. The file changes will be synced to the development environment. When you're ready to build your project, run 'otto dev ssh' to enter the development environment. You'll be placed directly into the working directory where you can run 'bundle' and 'ruby' as you normally would. You can access any running web application using the IP above.

Slide 99

Slide 99 text

$ otto dev ssh vagrant@precise64:/otto$ nslookup postgresql.service.consul. Server: 127.0.0.1 Address: 127.0.0.1#53 Name: postgresql.service.consul Address: 192.168.139.214

Slide 100

Slide 100 text

$ otto deploy … ==> Application deployed! Address: ec2-10-1-2-3.us-east-1.compute.amazonaws.com

Slide 101

Slide 101 text

Otto Development Deployment Microservices Appfile

Slide 102

Slide 102 text

ottoproject.io

Slide 103

Slide 103 text

Otto

Slide 104

Slide 104 text

QUESTIONS? THANK  YOU!