SlideShare a Scribd company logo
1 of 27
Openstack Magnum: Containers-as-a-Service
Chhavi Agarwal (IBM)
Ravi Gummadi (IBM)
1
Agenda
What is Magnum
Terminology
Why Magnum
Magnum Overview and Architecture
Supported COEs and OSes combinations
Setup Magnum with Devstack
Magnum Demo
2
What is Magnum
• Magnum is an OpenStack API service developed by the OpenStack
Containers Team making container orchestration engines such as
Docker Swarm, Kubernetes, and Apache Mesos available as first class
resources in OpenStack (from openstack wiki)
3
Terminology
• COE: Container Orchestration Engine to manage containers.
Examples: Kubernetes, Docker Swarm, Apache Mesos
• Cluster/Bay: A construct in which Magnum launches COE.
Cluster
COE
Nova
Instance
Nova
Instance
Nova
Instance
4
Terminology
• ClusterTemplate/BayModel: Template for creating clusters.
Includes image, COE.
• Native Client: Use native clients at COE level or at container
level to interact with clusters. Ex: kubectl, docker.
ClusterTemplate
Cluster ClusterCluster
5
Why Magnum
• Multi-tenancy for containers
• Reusing OpenStack Components like Keystone, Heat, Glance,
Neutron
• Multiple COEs side by side
• Server Type: VM, Bare Metal
6
Magnum Overview
7
Magnum Architecture
8
Magnum Support
9
Magnum Cluster Template LifeCycle Operations
• Create, List, Show, Delete
• magnum cluster-template-create –name my-cluster-template --image-id ubuntu-
mesos 
--keypair-id testkey 
--external-network-id public 
--dns-nameserver 8.8.8.8 
--flavor-id m1.small 
--coe mesos
• magnum cluster-template-list
• magnum cluster-template-show my-cluster-template
• magnum cluster-template-delete my-cluster-template
• magnum cluster-template-update my-cluster-template
10
Magnum Cluster LifeCycle Operations
• Create, List, Show, Update/Scale, Delete
• magnum cluster-create --name mycluster 
--cluster-template mytemplate 
--node-count 8 
--master-count 3
• magnum cluster-list
• Magnum cluster-show mycluster
• magnum cluster-update mycluster replace node_count=2 # (See below table)
• magnum cluster-delete mycluster
11
Scaling
• Scaling containers is through COEs
• Scaling Nodes:
magnum cluster-update mycluster replace node_count=4
• Scale up
• Scale down
12
Demo
13
Setup Devstack including Magnum
• Configure devstack by enabling magnum:
• Clone devstack:
• # Create a root directory for devstack if needed
• sudo mkdir -p /opt/stack
• sudo chown $USER /opt/stack
• # clone
• git clone https://git.openstack.org/openstack-dev/devstack /opt/stack/devstack
• Configure to enable enable magnum, heat, and neutron
• Configure to enable ceilometer, swift if required
14
Setup Devstack including Magnum
• Configure to enable enable magnum, heat, and neutron in /opt/stack/devstack/local.conf :
• [[local|localrc]]
• DATABASE_PASSWORD=password
• RABBIT_PASSWORD=password
• SERVICE_TOKEN=password
• SERVICE_PASSWORD=password
• ADMIN_PASSWORD=password
• # magnum requires the following to be set correctly
• PUBLIC_INTERFACE=eth1
• # Enable barbican service and use it to store TLS certificates
• # For details http://docs.openstack.org/developer/magnum/dev/tls.html
• enable_plugin barbican https://git.openstack.org/openstack/barbican
• enable_plugin heat https://git.openstack.org/openstack/heat
• enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
• enable_plugin octavia https://git.openstack.org/openstack/octavia
• # Enable magnum plugin after dependent plugins
• enable_plugin magnum https://git.openstack.org/openstack/magnum
• # Optional: uncomment to enable the Magnum UI plugin in Horizon
• #enable_plugin magnum-ui https://github.com/openstack/magnum-ui
• # Disable LBaaS(v1) service
• disable_service q-lbaas
• # Enable LBaaS(v2) services
• enable_service q-lbaasv2
• enable_service octavia
• enable_service o-cw
• enable_service o-hk
• enable_service o-hm
• enable_service o-api
• VOLUME_BACKING_FILE_SIZE=20G 15
Setup Devstack including Magnum
• Run devstack:
• cd /opt/stack/devstack
• ./stack.sh
• magnum-api and magnum-conductor processes would come up
• Prepare for openstack clients:
• source /opt/stack/devstack/openrc admin admin
• Commands to start with:
• magnum help
• magnum service-list
• Create a keypair for use with the ClusterTemplate:
• test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa
• nova keypair-add --pub-key ~/.ssh/id_rsa.pub testkey
16
Building and Using a Mesos Cluster
• Download Ubuntu image which includes mesos related packages and add to glance
• wget https://fedorapeople.org/groups/magnum/ubuntu-mesos-latest.qcow2
• glance image-create --name ubuntu-mesos --visibility public 
--disk-format=qcow2 --container-format=bare 
--os-distro=ubuntu --file=ubuntu-mesos-latest.qcow2
• Create a ClusterTemplate
• magnum cluster-template-create --name mesos-cluster-template --image-id ubuntu-mesos 
--keypair-id testkey 
--external-network-id public 
--dns-nameserver 8.8.8.8 
--flavor-id m1.small 
--coe mesos
• Create Cluster
• magnum cluster-create --name mesos-cluster 
--cluster-template mesos-cluster-template 
--node-count 1
17
Building and Using a Mesos Cluster
• Make sure that the cluster status is CREATE_COMPLETE
18
Building and Using a Mesos Cluster
• Create Container through marathon REST API
$ cat > mesos.json << END
{
"container": {
"type": "DOCKER",
"docker": {
"image": "cirros"
}
},
"id": "ubuntu",
"instances": 1,
"cpus": 0.5,
"mem": 512,
"uris": [],
"cmd": "ping 8.8.8.8"
}
END
$ MASTER_IP=$(magnum cluster-show mesos-cluster | awk '/ api_address /{print $4}')
$ curl -X POST -H "Content-Type: application/json" 
http://${MASTER_IP}:8080/v2/apps -d@mesos.json 19
Accessing Mesos Cluster
• Check application and task status:
$ curl http://${MASTER_IP}:8080/v2/apps
$ curl http://${MASTER_IP}:8080/v2/tasks
• Mesos web page at http://<master>:5050/
• Marathon web console at http://<master>:8080/
20
References
• https://docs.openstack.org/developer/magnum/userguide.html
• http://docs.openstack.org/developer/magnum/dev/quickstart.html#
exercising-the-services-using-devstack
• http://superuser.openstack.org/articles/a-primer-on-magnum-
openstack-containers-as-a-service
• Videos from OpenStack Summits
21
THANK YOU
22
BackUp
23
Multi-node Setup of OpenStack using OpenStack-Ansible
• On all nodes,
• Install prerequisite packages:
apt-get -y install bridge-utils debootstrap ifenslave ifenslave-2.6 lsof lvm2 ntp ntpdate
openssh-server sudo tcpdump vlan aptitude build-essential git ntp ntpdate openssh-server
python-dev
• Configure networking
• On the deployer node,
• git clone https://github.com/openstack/openstack-ansible.git /opt/openstack-ansible
• scripts/bootstrap-ansible.sh
• Configure things in /etc/openstack_deploy/*.yml and /etc/openstack_deploy/*/*.yml
• Make sure to configure magnum-infra_hosts in
/etc/openstack_deploy/conf.d/magnum.yml
• Run setup-hosts.yml
• Run setup-infrastructure.yml
• Run setup-openstack.yml to complete the deployment of OpenStack
24
Horizon UI – Magnum Cluster Templates
25
Horizon UI – Magnum – Create Cluster
26
Horizon UI – Magnum Cluster Template Details
27

More Related Content

What's hot

MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)Lucas Jellema
 
Kubernetes Deployment Strategies
Kubernetes Deployment StrategiesKubernetes Deployment Strategies
Kubernetes Deployment StrategiesAbdennour TM
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesRishabh Indoria
 
Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets Janakiram MSV
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionEric Gustafson
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting startedMunish Mehta
 
Prometheus
PrometheusPrometheus
Prometheuswyukawa
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptxwonyong hwang
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 
Monitoring with prometheus
Monitoring with prometheusMonitoring with prometheus
Monitoring with prometheusKasper Nissen
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusMarco Pas
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewJames Falkner
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demoOpsta
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with PrometheusShiao-An Yuan
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법Open Source Consulting
 

What's hot (20)

MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)MeetUp Monitoring with Prometheus and Grafana (September 2018)
MeetUp Monitoring with Prometheus and Grafana (September 2018)
 
Kubernetes Deployment Strategies
Kubernetes Deployment StrategiesKubernetes Deployment Strategies
Kubernetes Deployment Strategies
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Prometheus monitoring
Prometheus monitoringPrometheus monitoring
Prometheus monitoring
 
Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets Kubernetes Webinar - Using ConfigMaps & Secrets
Kubernetes Webinar - Using ConfigMaps & Secrets
 
Prometheus and Grafana
Prometheus and GrafanaPrometheus and Grafana
Prometheus and Grafana
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Prometheus
PrometheusPrometheus
Prometheus
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptx
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Monitoring with prometheus
Monitoring with prometheusMonitoring with prometheus
Monitoring with prometheus
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Infrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using PrometheusInfrastructure & System Monitoring using Prometheus
Infrastructure & System Monitoring using Prometheus
 
Red Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform OverviewRed Hat OpenShift Container Platform Overview
Red Hat OpenShift Container Platform Overview
 
Introduction to Kubernetes with demo
Introduction to Kubernetes with demoIntroduction to Kubernetes with demo
Introduction to Kubernetes with demo
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with Prometheus
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 

Viewers also liked

OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04Adrian Otto
 
Introduction to Magnum (JP)
Introduction to Magnum (JP)Introduction to Magnum (JP)
Introduction to Magnum (JP)Motohiro OTSUKA
 
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...Daniel Krook
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack MagnumAdrian Otto
 
Optimising nfv service chains on open stack using docker
Optimising nfv service chains on open stack using dockerOptimising nfv service chains on open stack using docker
Optimising nfv service chains on open stack using dockerAnanth Padmanabhan
 
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
Networking For Nested Containers: Magnum, Kuryr, Neutron IntegrationNetworking For Nested Containers: Magnum, Kuryr, Neutron Integration
Networking For Nested Containers: Magnum, Kuryr, Neutron IntegrationPLUMgrid
 
An Introduction to the Kubernetes API
An Introduction to the Kubernetes APIAn Introduction to the Kubernetes API
An Introduction to the Kubernetes APIStefan Schimanski
 
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source TriumvirateCloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source TriumvirateAnimesh Singh
 
【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた
【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた
【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみたYasuhiro Yoshimura
 
OpenStack networking
OpenStack networkingOpenStack networking
OpenStack networkingSim Janghoon
 
Deploying your apps in the cloud - the options: an overview
Deploying your apps in the cloud - the options: an overviewDeploying your apps in the cloud - the options: an overview
Deploying your apps in the cloud - the options: an overviewCisco DevNet
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesSreenivas Makam
 
Docker on RHEL & Project Atomic 入門 - #Dockerjp 4
Docker on RHEL & Project Atomic 入門 - #Dockerjp 4Docker on RHEL & Project Atomic 入門 - #Dockerjp 4
Docker on RHEL & Project Atomic 入門 - #Dockerjp 4Emma Haruka Iwao
 
OpenStack Tutorial
OpenStack TutorialOpenStack Tutorial
OpenStack TutorialBret Piatt
 
Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Patrick Chanezon
 
Introducing OpenStack for Beginners
Introducing OpenStack for Beginners Introducing OpenStack for Beginners
Introducing OpenStack for Beginners openstackindia
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack ArchitectureMirantis
 

Viewers also liked (18)

OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04OpenStack Magnum 2016-08-04
OpenStack Magnum 2016-08-04
 
Introduction to Magnum (JP)
Introduction to Magnum (JP)Introduction to Magnum (JP)
Introduction to Magnum (JP)
 
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack Magnum
 
Optimising nfv service chains on open stack using docker
Optimising nfv service chains on open stack using dockerOptimising nfv service chains on open stack using docker
Optimising nfv service chains on open stack using docker
 
GKE vs OpenStack Magnum
GKE vs OpenStack MagnumGKE vs OpenStack Magnum
GKE vs OpenStack Magnum
 
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
Networking For Nested Containers: Magnum, Kuryr, Neutron IntegrationNetworking For Nested Containers: Magnum, Kuryr, Neutron Integration
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
 
An Introduction to the Kubernetes API
An Introduction to the Kubernetes APIAn Introduction to the Kubernetes API
An Introduction to the Kubernetes API
 
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source TriumvirateCloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
 
【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた
【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた
【第33回コンピュータビジョン勉強会@関東】OpenVX、 NVIDIA VisionWorks使ってみた
 
OpenStack networking
OpenStack networkingOpenStack networking
OpenStack networking
 
Deploying your apps in the cloud - the options: an overview
Deploying your apps in the cloud - the options: an overviewDeploying your apps in the cloud - the options: an overview
Deploying your apps in the cloud - the options: an overview
 
Service Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and KubernetesService Discovery using etcd, Consul and Kubernetes
Service Discovery using etcd, Consul and Kubernetes
 
Docker on RHEL & Project Atomic 入門 - #Dockerjp 4
Docker on RHEL & Project Atomic 入門 - #Dockerjp 4Docker on RHEL & Project Atomic 入門 - #Dockerjp 4
Docker on RHEL & Project Atomic 入門 - #Dockerjp 4
 
OpenStack Tutorial
OpenStack TutorialOpenStack Tutorial
OpenStack Tutorial
 
Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016
 
Introducing OpenStack for Beginners
Introducing OpenStack for Beginners Introducing OpenStack for Beginners
Introducing OpenStack for Beginners
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack Architecture
 

Similar to Openstack Magnum: Container-as-a-Service

Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnumTon Ngo
 
Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnumTon Ngo
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Patrick Chanezon
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-finalMichel Schildmeijer
 
Bdc from bare metal to k8s
Bdc   from bare metal to k8sBdc   from bare metal to k8s
Bdc from bare metal to k8sChris Adkin
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Patrick Chanezon
 
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 PresentationSreenivas Makam
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPivotalOpenSourceHub
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux ContainersJignesh Shah
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introductionJason Hu
 
Toward 10,000 Containers on OpenStack
Toward 10,000 Containers on OpenStackToward 10,000 Containers on OpenStack
Toward 10,000 Containers on OpenStackTon Ngo
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyVikram G Hosakote
 
Kubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesKubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesMike Splain
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container SecuritySuraj Khetani
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java DevelopersAnthony Dahanne
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Anthony Dahanne
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila
 

Similar to Openstack Magnum: Container-as-a-Service (20)

Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnum
 
Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnum
 
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
Docker San Francisco Meetup April 2015 - The Docker Orchestration Ecosystem o...
 
Docker in OpenStack
Docker in OpenStackDocker in OpenStack
Docker in OpenStack
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
Bdc from bare metal to k8s
Bdc   from bare metal to k8sBdc   from bare metal to k8s
Bdc from bare metal to k8s
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
 
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on AzureDevoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
 
Docker 1.11 Presentation
Docker 1.11 PresentationDocker 1.11 Presentation
Docker 1.11 Presentation
 
Postgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh ShahPostgre sql linuxcontainers by Jignesh Shah
Postgre sql linuxcontainers by Jignesh Shah
 
PostgreSQL and Linux Containers
PostgreSQL and Linux ContainersPostgreSQL and Linux Containers
PostgreSQL and Linux Containers
 
Docker and kubernetes_introduction
Docker and kubernetes_introductionDocker and kubernetes_introduction
Docker and kubernetes_introduction
 
Toward 10,000 Containers on OpenStack
Toward 10,000 Containers on OpenStackToward 10,000 Containers on OpenStack
Toward 10,000 Containers on OpenStack
 
Kolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in SydneyKolla talk at OpenStack Summit 2017 in Sydney
Kolla talk at OpenStack Summit 2017 in Sydney
 
Kubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of KubernetesKubernetes Boston — Custom High Availability of Kubernetes
Kubernetes Boston — Custom High Availability of Kubernetes
 
Docker Container Security
Docker Container SecurityDocker Container Security
Docker Container Security
 
Kubernetes for Java Developers
Kubernetes for Java DevelopersKubernetes for Java Developers
Kubernetes for Java Developers
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 

Openstack Magnum: Container-as-a-Service

  • 1. Openstack Magnum: Containers-as-a-Service Chhavi Agarwal (IBM) Ravi Gummadi (IBM) 1
  • 2. Agenda What is Magnum Terminology Why Magnum Magnum Overview and Architecture Supported COEs and OSes combinations Setup Magnum with Devstack Magnum Demo 2
  • 3. What is Magnum • Magnum is an OpenStack API service developed by the OpenStack Containers Team making container orchestration engines such as Docker Swarm, Kubernetes, and Apache Mesos available as first class resources in OpenStack (from openstack wiki) 3
  • 4. Terminology • COE: Container Orchestration Engine to manage containers. Examples: Kubernetes, Docker Swarm, Apache Mesos • Cluster/Bay: A construct in which Magnum launches COE. Cluster COE Nova Instance Nova Instance Nova Instance 4
  • 5. Terminology • ClusterTemplate/BayModel: Template for creating clusters. Includes image, COE. • Native Client: Use native clients at COE level or at container level to interact with clusters. Ex: kubectl, docker. ClusterTemplate Cluster ClusterCluster 5
  • 6. Why Magnum • Multi-tenancy for containers • Reusing OpenStack Components like Keystone, Heat, Glance, Neutron • Multiple COEs side by side • Server Type: VM, Bare Metal 6
  • 10. Magnum Cluster Template LifeCycle Operations • Create, List, Show, Delete • magnum cluster-template-create –name my-cluster-template --image-id ubuntu- mesos --keypair-id testkey --external-network-id public --dns-nameserver 8.8.8.8 --flavor-id m1.small --coe mesos • magnum cluster-template-list • magnum cluster-template-show my-cluster-template • magnum cluster-template-delete my-cluster-template • magnum cluster-template-update my-cluster-template 10
  • 11. Magnum Cluster LifeCycle Operations • Create, List, Show, Update/Scale, Delete • magnum cluster-create --name mycluster --cluster-template mytemplate --node-count 8 --master-count 3 • magnum cluster-list • Magnum cluster-show mycluster • magnum cluster-update mycluster replace node_count=2 # (See below table) • magnum cluster-delete mycluster 11
  • 12. Scaling • Scaling containers is through COEs • Scaling Nodes: magnum cluster-update mycluster replace node_count=4 • Scale up • Scale down 12
  • 14. Setup Devstack including Magnum • Configure devstack by enabling magnum: • Clone devstack: • # Create a root directory for devstack if needed • sudo mkdir -p /opt/stack • sudo chown $USER /opt/stack • # clone • git clone https://git.openstack.org/openstack-dev/devstack /opt/stack/devstack • Configure to enable enable magnum, heat, and neutron • Configure to enable ceilometer, swift if required 14
  • 15. Setup Devstack including Magnum • Configure to enable enable magnum, heat, and neutron in /opt/stack/devstack/local.conf : • [[local|localrc]] • DATABASE_PASSWORD=password • RABBIT_PASSWORD=password • SERVICE_TOKEN=password • SERVICE_PASSWORD=password • ADMIN_PASSWORD=password • # magnum requires the following to be set correctly • PUBLIC_INTERFACE=eth1 • # Enable barbican service and use it to store TLS certificates • # For details http://docs.openstack.org/developer/magnum/dev/tls.html • enable_plugin barbican https://git.openstack.org/openstack/barbican • enable_plugin heat https://git.openstack.org/openstack/heat • enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas • enable_plugin octavia https://git.openstack.org/openstack/octavia • # Enable magnum plugin after dependent plugins • enable_plugin magnum https://git.openstack.org/openstack/magnum • # Optional: uncomment to enable the Magnum UI plugin in Horizon • #enable_plugin magnum-ui https://github.com/openstack/magnum-ui • # Disable LBaaS(v1) service • disable_service q-lbaas • # Enable LBaaS(v2) services • enable_service q-lbaasv2 • enable_service octavia • enable_service o-cw • enable_service o-hk • enable_service o-hm • enable_service o-api • VOLUME_BACKING_FILE_SIZE=20G 15
  • 16. Setup Devstack including Magnum • Run devstack: • cd /opt/stack/devstack • ./stack.sh • magnum-api and magnum-conductor processes would come up • Prepare for openstack clients: • source /opt/stack/devstack/openrc admin admin • Commands to start with: • magnum help • magnum service-list • Create a keypair for use with the ClusterTemplate: • test -f ~/.ssh/id_rsa.pub || ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa • nova keypair-add --pub-key ~/.ssh/id_rsa.pub testkey 16
  • 17. Building and Using a Mesos Cluster • Download Ubuntu image which includes mesos related packages and add to glance • wget https://fedorapeople.org/groups/magnum/ubuntu-mesos-latest.qcow2 • glance image-create --name ubuntu-mesos --visibility public --disk-format=qcow2 --container-format=bare --os-distro=ubuntu --file=ubuntu-mesos-latest.qcow2 • Create a ClusterTemplate • magnum cluster-template-create --name mesos-cluster-template --image-id ubuntu-mesos --keypair-id testkey --external-network-id public --dns-nameserver 8.8.8.8 --flavor-id m1.small --coe mesos • Create Cluster • magnum cluster-create --name mesos-cluster --cluster-template mesos-cluster-template --node-count 1 17
  • 18. Building and Using a Mesos Cluster • Make sure that the cluster status is CREATE_COMPLETE 18
  • 19. Building and Using a Mesos Cluster • Create Container through marathon REST API $ cat > mesos.json << END { "container": { "type": "DOCKER", "docker": { "image": "cirros" } }, "id": "ubuntu", "instances": 1, "cpus": 0.5, "mem": 512, "uris": [], "cmd": "ping 8.8.8.8" } END $ MASTER_IP=$(magnum cluster-show mesos-cluster | awk '/ api_address /{print $4}') $ curl -X POST -H "Content-Type: application/json" http://${MASTER_IP}:8080/v2/apps -d@mesos.json 19
  • 20. Accessing Mesos Cluster • Check application and task status: $ curl http://${MASTER_IP}:8080/v2/apps $ curl http://${MASTER_IP}:8080/v2/tasks • Mesos web page at http://<master>:5050/ • Marathon web console at http://<master>:8080/ 20
  • 21. References • https://docs.openstack.org/developer/magnum/userguide.html • http://docs.openstack.org/developer/magnum/dev/quickstart.html# exercising-the-services-using-devstack • http://superuser.openstack.org/articles/a-primer-on-magnum- openstack-containers-as-a-service • Videos from OpenStack Summits 21
  • 24. Multi-node Setup of OpenStack using OpenStack-Ansible • On all nodes, • Install prerequisite packages: apt-get -y install bridge-utils debootstrap ifenslave ifenslave-2.6 lsof lvm2 ntp ntpdate openssh-server sudo tcpdump vlan aptitude build-essential git ntp ntpdate openssh-server python-dev • Configure networking • On the deployer node, • git clone https://github.com/openstack/openstack-ansible.git /opt/openstack-ansible • scripts/bootstrap-ansible.sh • Configure things in /etc/openstack_deploy/*.yml and /etc/openstack_deploy/*/*.yml • Make sure to configure magnum-infra_hosts in /etc/openstack_deploy/conf.d/magnum.yml • Run setup-hosts.yml • Run setup-infrastructure.yml • Run setup-openstack.yml to complete the deployment of OpenStack 24
  • 25. Horizon UI – Magnum Cluster Templates 25
  • 26. Horizon UI – Magnum – Create Cluster 26
  • 27. Horizon UI – Magnum Cluster Template Details 27