35
Kolla - the new way to deploy OpenStack Kuo-tung Kao

Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

  • Upload
    dangdat

  • View
    246

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - the new way to

deploy OpenStackKuo-tung Kao

Page 2: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

簡介

任職於 inwinstack過去的迎廣科技雲端應用研發中心

OpenStack contributor

kjellytw at gmail dot com

http://www.blackwhite.tw/

Page 3: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Outline

What’s the Immutable Iinfrastructure?

Docker and Ansible

What’s Kolla?

How to deploy OpenStack using Kolla?

Page 4: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Projects to Deploy OpenStack

Deploy on machinepuppet-openstack

Deploy on lxcopenstack-ansible

Deploy on dockerKolla

OpenStack on OpenStackTripleO

Page 5: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

What’s the Immutable Infrastructure

Don’t modify image manually

Create new image when something changes

Page 6: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

System Infrastructure is divided into "data" and

"other".

Package “other” usingContainer

Hypervisor

"Other" include “config”, “program”,

“environment”.

"Other" are replaced at every deployment.

Page 7: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Running

Container V1

volume

Running

Container V2

volume

Stopped

Container V1

Running

Container V1

volume

Stopped

Container V2

upgrade downgrade

Data stored

in volume

Page 8: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Immutable Infrastructure Advantage

Atomic deploymentsEasy to upgrade

Easy to downgrade

Fault recovery

Easy to track change

Page 9: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Immutable Infrastructure Downside

Create new image when something changes

Waste space

Page 10: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Docker

Container

Llighter, fast than hypervistor

Build envirenment from DockerfileVersion Controll

Support named volume

Based on libcontainer(runc)

Page 11: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Image

Docker

file

Running

Container

Stopped

ContainerCommit

Page 12: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Dockerfile Demo

Page 13: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Docker - run container

docker run -e MYSQL_ROOT_PASSWORD=pass \

-d mysql:5.7.12

Page 14: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Ansible

Deployment tool

Interpret

Yaml

Jinja2

Easy to write your own module in Python

Aagentless

Page 15: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Aansible Demo Sscript

variable

Page 16: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

What’s Kolla?

A official OpenStack project to deploy

OpenStack

Immutable infrastructure

Deploy/upgrade quickly

Community support

Page 17: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla uses

Dockerprovide environments

Ansiblegenerate config

run image

Page 18: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Image

Docker

file

Running

Container

Reconfigrestart

container

Page 19: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Running

Container V1

volume

Running

Container V2

volume

Stopped

Container V1

Running

Container V1

volume

Stopped

Container V2

upgrade downgrade

Page 20: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla Support

Ceph

HA

elasticsearch+kibana

kubernetes(coming soon)

Page 21: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Deploy OpenStack

Build image

Deploy image

Page 22: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Build image

Image type:source: install from code

binary: install from package manager

Base image:Ubuntu

CentOS

Install openstack in docker imageYou can build image anywhere in anytime.

Page 23: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Build image

Host OS Docker Image OS Kolla Install Type

Ubuntu CentOS

Debian Ubuntu

CentOS Debian

Source

Binary

Ubuntu-source CentOS-source CentOS-binary

I prefer to

Page 24: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Deploy(Run) Image

Run container using ansible

Kolla uses Ansible togenerate openstack config

run container

Support “pull image” to accelerate deploying

Page 25: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

tox -e genconfig

globals.yml

password.yml

kolla-build.conf

Page 26: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

sudo cp -rf etc/kolla /etc

Page 27: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

tools/build.py -base ubuntu -type source --tag 1.2.3 --registry

192.168.1.3 --push

tag => openstack_release(in globals.yml)

registriy => docker_registry(in globals.yml)

base => kolla_base_distro(in globals.yml)

type => kolla_install_type(in globals.yml)

About 20 mins for my computer

Page 28: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

modify /etc/kolla/globals.yml

kolla_base_distro

kolla_install_type

openstack_release

kolla_internal_vip_address

network_interface

neutron_external_interface

enable_XXX

Page 29: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

modify docker config

allow insecure-registry

mount flags = shared

Page 30: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

sudo mount --make-shared /run

Page 31: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

sudo tool/kolla-ansible prechecks

Page 32: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

sudo tool/kolla-ansible deploy

About 3 mins for my computer (All in one)

Page 33: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

/etc/kolla/config/nova/myhost/nova.conf

/etc/kolla/config/glance.conf

optional

customize your openstackh

Page 34: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Kolla - step by step

sudo tool/kolla-ansible reconfigure

Page 35: Kolla - the new way to deploy OpenStack · Projects to Deploy OpenStack Deploy on machine puppet-openstack Deploy on lxc openstack-ansible Deploy on docker Kolla OpenStack on OpenStack

Summary

Kolla Immutable infrastructure

Deploy / upgrade quickly

Community support

support Ceph

HA