intro to rancher and rancheros

25
© 2015 Rancher Labs, Inc. © 2015 Rancher Labs, Inc. Intro to Rancher and RancherOS Infracoders Meetup April 22, 2015

Upload: dinhkhuong

Post on 14-Feb-2017

244 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc. © 2015 Rancher Labs, Inc.

Intro to Rancher and RancherOS Infracoders Meetup April 22, 2015

Page 2: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Introduction •  Will Chan – VP, Engineering/Co-founder •  Github: https://github.com/will-chan •  Twitter: @willchan00 •  Email: [email protected]

2

Page 3: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Agenda •  Rancher - how it can help manage Docker containers at

scale •  RancherOS - why a micro OS for Docker makes sense •  Demo •  Q&A

3

Page 4: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Docker adoption has exploded because developers love the user experience

4

Page 5: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

<50 ms

Docker provides significant benefits for IT operations

5

Consistent image and configuration from laptop to production

Nearly instant deployment

(average for a VM is 30-45 seconds)

Ideal for production upgrades Enables microservices

Page 6: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

However, most ops are hesitant to put Docker into production

1.  Lack of orchestration and management tools 2.  Lack of monitoring tools 3.  Lack of log management capabilities 4.  Lack of networking 5.  Lack of storage management 6.  Lack of multi-user management

6

Page 7: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

An orchestration platform designed to manage Docker environments and infrastructure at scale.

7 #ranchermeetup

Page 8: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Rancher addresses these issues and provides a platform for running Docker in production

8

Bare metal servers

Linux Linux Linux Linux

Container Orchestration & Monitoring

User Management Service Discovery Resource Management

Networking & Storage Services

#ranchermeetup

Page 9: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Implementing and deploying Rancher

9

Register Machines

•  Supports Docker Machine •  Support DigitalOcean, EC2, and

others

Manage Containers

•  Deploy and manage Docker containers across multiple hosts

•  Monitor container performance •  Monitor container utilization

Install Rancher •  Installs as a container on any

connected host •  Connect to Docker Repositories •  Connect to GitHub for User Mgmt

#ranchermeetup

Page 10: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Managing Infrastructure Services

10

Deploy Load Balancers

•  Container-based HAProxy service •  Allow for up and downscaling as

needed •  Integrated with service discovery

Manage Storage

•  Manage Docker volumes •  Supports incremental snapshots to

object storage •  Snapshots are crash consistent

Dynamically Create Networks

•  Create private overlay network for each user environment based on IPSec tunneling

•  Network spans across hosts & clouds

#ranchermeetup

Page 11: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Container orchestration enables powerful application blueprinting

11

docker-­‐compose.yml      lb:      image:  rancher/load-­‐balancer      ports:          -­‐  "80:80"      links:          -­‐  web  web:      image:  php      links:          -­‐  db          -­‐  zookeeper  zookeeper:      image:  zookeeper      links:          -­‐  zookeeper  db:      image:  mysql  

As developers test their code, they create a docker-compose.yml to describe the application environment

#ranchermeetup

Page 12: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Container orchestration enables powerful application blueprinting

12

LB

Web

DB Zookeeper

Developers can run their docker-compose.yml directly on their laptop to test application functionality

#ranchermeetup

Page 13: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Container orchestration enables powerful application blueprinting

13

When an application is ready to move to scale testing or production, the developer creates a rancher.yml file

Test/Staging/Production #ranchermeetup

Page 14: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Container orchestration enables powerful application blueprinting

14

rancher.yml      lb:      scale:          min:  2          max:  5      healthcheck:          interval:  5          target:  "http:5000/healthcheck"  zookeeper:      scale:          min:  5          max:  5  web:      scale:          min:  5          max:  100  db:      external:  myinstance.rds.amazon.com  

Test/Staging/Production

When an application is ready to move to scale testing or production, the developer creates a rancher.yml file

#ranchermeetup

Page 15: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Container orchestration enables powerful application blueprinting

15

LB

Web

Zookeeper DB

Test/Staging/Production

Rancher then implements the complete environment, including networking, service discovery, service health checks, and storage

#ranchermeetup

Page 16: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc. 16

Demo

#ranchermeetup

Page 17: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Features on horizon 1.  Native Docker Interface 2.  Snapshots 3.  Service Discovery (HA, Autoscaling, Heath

Monitoring, and Upgrades) 4.  Host Tag/Label for container orchestration 5.  Swarm/Clustering 6.  Support additional cloud providers

17

Page 18: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

A tiny Linux distribution designed for the sole purpose of running Docker containers.

18

Page 19: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Wait a minute…

1. Doesn’t Docker run on any Linux? Yes. Docker runs on all modern Linux distribution. 2. Isn’t CoreOS the popular OS for running Docker? Yes, CoreOS has become popular for running Docker, because it removes lots of Linux packages that aren’t necessary for running containers.

19

4GB 200 MB

Page 20: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Then why a new Linux distro for Docker? If we could “Dockerize” the OS: -  It would be very small (20mb), with just the services necessary to

run containers. -  Upgrades would be Docker -  It would make modifying the OS as easy as issuing a “docker

run” command -  We could swap kernels, consoles, and just about anything. -  We could use Docker Compose context to define the OS

20

Page 21: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

RancherOS is “Dockerized” Linux

21

Linux Kernel

PID 1 System Docker

udev dhcp console

User-level containers

… System containers

User Docker initrd

… etcd

>sudo  rancherctl  service  enable  etcd  

#ranchermeetup

Page 22: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc. 22

Demo

#ranchermeetup

Page 23: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Getting Started Rancher and RancherOS live in GitHub – Get Involved

23 #ranchermeetup

Page 24: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc.

Support Join us at our Google Groups: https://groups.google.com/forum/#!forum/rancherio Join us at our IRC channel: #rancher

24 #ranchermeetup

Page 25: Intro to Rancher and RancherOS

© 2015 Rancher Labs, Inc. © 2015 Rancher Labs, Inc.

Thank You www.rancher.com @rancher_labs