24
OpenStack Magnum Project Container as a Service Ton Ngo 3/8/16

Bug smash day magnum

  • Upload
    ton-ngo

  • View
    328

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bug smash day magnum

OpenStack Magnum Project

Container as a Service

Ton Ngo

3/8/16

Page 2: Bug smash day magnum

How to create containers in OpenStack

Alternatives for containers

pros cons

Nova Docker driver • leverage VM asbtraction • mismatch in abstraction for server and process

Heat Docker resource • simple interface to docker client

• lags Docker advances• no longer in development

Heat Software Config • leverage existing heat feature • not a first class object

Magnum • container orchestrationengine

• container as first class object

• new service in OpenStack

2

Page 3: Bug smash day magnum

Container vs VM (source Adrian Otto)

3

Page 4: Bug smash day magnum

Why Magnum?Key Features that Simplify Container/OpenStack Integration

• Simplified Support for Multi-Tenant Containers

• Ease of Utilization/Integration with OpenStack Services

• Out of box integration with Kubernetes, Swarm, Mesos

• Security (TLS): allows secured access to Kubernetes, Swarm, Mesos

• Auto scaling support that spans Hosts/VMs and containers

Page 5: Bug smash day magnum

How Magnum fits into OpenStack (source Adrian Otto)

Layer 4: Consumption Services

Layer 3: Optional Enhancements

Layer 2: Extended Infrastructure

Layer 1: Base Compute Infrastructure

5

Heat Magnum Marconi Murano Trove Sahara Solum

Ceilometer

Cinder

Nova

Barbican Horizon

Swift

Glance Keystone

Neutron Designate Ironic

Page 6: Bug smash day magnum

Integration with OpenStack

• Container Orchestration Engines leverage OpenStack services:– nova: vm, bare metal

– heat: orchestration

– glance: image

– cinder: storage for containers, persistent storage

– keystone: authentication

– barbican: certificate, stored secret for TLS

– neutron: network, subnet, router, load balancer

– senlin: clustering for autoscaling

• Magnum interfaces:– Rest API

– Client

– Native client from container orchestrator

6

Page 7: Bug smash day magnum

Magnum Operation

• Create/manage container orchestration engines (baymodel/bay)

– Docker Swarm

– Kubernetes

– Mesos

• Create/manage containers

• Use Heat templates

• Host cluster on VM’s or bare metal

7

Page 8: Bug smash day magnum

Architecture

8

Page 9: Bug smash day magnum

Swarm bay

9

Master

Node Node Node

swarm daemon

Docker daemon

Docker daemon

Docker daemon

etcd discovery

client

Page 10: Bug smash day magnum

Kubernetes bay

10

Master

Node

kube-apiserver

Docker daemon

kubectl

kubelet kube-proxy

kube-scheduler

kube-controllermanager

Node

Docker daemon

kubelet kube-proxy

Node

Docker daemon

kubelet kube-proxy

etcd discovery

flannel overlay

Page 11: Bug smash day magnum

Mesos bay

11

Master

Node

leader

MarathonFramework

zookeeperstandby

standby

Executor

tasktask

NodeMarathon

Framework

Executor

tasktask

NodeMarathon

Framework

Executor

tasktask

Page 12: Bug smash day magnum

Networking for Kubernetes bay

12

router

private network

nodenova instance

nodenova instance

masternova instance

floating IP

public network

eth0

floating IP

eth0 eth0

router interface

private subnet dns

load balancerload balancer

Page 13: Bug smash day magnum

New Features in Liberty Release (11/2015)

Mesos Bay Type (Multi-Tenancy)

Secure Bays (TLS) External Load Balancer Multi-MasterKubernetes

• Apache Mesos• Marathon Framework• REST API

• TLS Between Magnum Client and Magnum API

• TLS Between BayMaster and Minion/Slave/Worker

• Certificategeneration/signing

• docker / kubectl TLSinteroperability

• Neutron LBaaSIntegration

• Automatically add orremove nodes fromNeutron LB whenKubernetes bay is scaled

• Easy setup ofmultimasterconfiguration for Kubernetes

• Suitable for HAconfigurations

Page 14: Bug smash day magnum

Key new developments

Scalingapplication + infrastructure

Container as a Service API

Persistent storage

Kubernetes,Swarm on Mesos

Advanced networking

• Coordination between containers and hosts

• Policy driven (Senlin)

• Intersection between Kubernetes, Swarm API

• Hideinfrastructure

• Volume drivers• Backed by Cinder

• Multiple workloads on Mesos

• Fine grain resource sharing

• Docker libnetwork(Kuryr)

Page 15: Bug smash day magnum

OpenStack Client/API: model, bay

baymodel-create baymodel-delete baymodel-list baymodel-show bay-create bay-delete bay-list bay-show bay-update

Create a baymodel.Delete specified baymodel.Print a list of bay models.Show details about the given baymodel. Create a bay.Delete specified bay.Print a list of available bays.Show details about the given bay.Update information about the given bay.

15

Page 16: Bug smash day magnum

OpenStack Client/API: Swarm cluster

container-create container-delete container-exec container-list container-logs container-pause container-reboot container-show container-start container-stop container-unpause

Create a container.Delete specified containers.Execute command in a container.Print a list of available containers. Get logs of a container.Pause specified containers.Reboot specified containers.Show details of a container.Start specified containers.Stop specified containers.Unpause specified containers.

16

Page 17: Bug smash day magnum

Magnum Services

• Conductor: m-cond

– drive heat templates to create/update cluster

– interface with native client to create/update containers

– periodic synch

• Rest API: m-api

– publish API to client and other services

– interface with conductor, database

• Client:

– magnum command line

17

Page 18: Bug smash day magnum

Horizon/UI

• Plugin for Magnum under development:

– https://github.com/openstack/magnum-ui

– README.rst: installation instruction

• Features:

– Create bay model, bay

– Deploy Kubernetes pods, services, replication controllers

– Deploy Swarm containers

18

Page 19: Bug smash day magnum

Magnum Demo

• Live demo

– Create baymodel

– Create Kubernetes bay

– Deploy pod

– devstack screen logs

– Horizon plugin

• See recorded demo at:https://vimeo.com/128538940

19

Page 20: Bug smash day magnum

Installing Magnum

• Devstack:https://github.com/openstack/magnum/blob/master/doc/source/dev/dev-quickstart.rst

– Configure local.conf:enable_plugin magnum https://git.openstack.org/openstack/magnumenable_plugin barbican https://git.openstack.org/openstack/barbicanPUBLIC_INTERFACE=eth0VOLUME_BACKING_FILE_SIZE=20G

– run stack.sh

• Manual:https://github.com/openstack/magnum/blob/master/doc/source/dev/dev-manual-devstack.rst

– Based on devstack (in progress: instruction for standard OpenStack installation)

– Configure OpenStack services required

– Set up networking, images, database

– Configure Magnum

20

Page 21: Bug smash day magnum

Contributing to Magnum

• All bugs:https://bugs.launchpad.net/magnum/+bugs

• Easy bugs:https://bugs.launchpad.net/magnum/+bugs?field.tag=low-hanging-fruit

• Blueprints:https://blueprints.launchpad.net/magnum

• Patches under review:https://review.openstack.org/#/q/status:open+openstack/magnum,n,z

https://review.openstack.org/#/q/status:open+openstack/python-magnum

• OpenStack Summit, Austin 4/25-29:

– Talks

– 10 design sessions

21

Page 22: Bug smash day magnum

Magnum development (source Adrian Otto)

22

6,039 patch sets

1,589 commits

275,601lines of code

1year

133engineers

34 affiliations

2015-01-20released

Page 23: Bug smash day magnum

Companies contribution (source stackalytics.com)

23

Page 24: Bug smash day magnum

24