38
Created by: Kevin Carter & Curtis Collicutt OS-Ansible- Deployment Deploying OpenStack with Ansible presentation > osad <<EOP 1

Deploying OpenStack with Ansible

Embed Size (px)

Citation preview

Page 1: Deploying OpenStack with Ansible

Created by: Kevin Carter & Curtis Collicutt

OS-Ansible-Deployment

Deploying OpenStack with Ansible

presentation > osad <<EOP

1

Page 2: Deploying OpenStack with Ansible

www.rackspace.com 2

Who am I?

Kevin Carter● Developer at the Rackspace Private Cloud● Open source activist● Cloud operations junkie● Python aficionado● Recovering rubyist● Beer lover● Soccer fanatic

Page 3: Deploying OpenStack with Ansible

www.rackspace.com 3

Who am I?

Curtis Collicutt● Lead OpenStack Engineer @ AURO● Information Security● Storage systems● How do computers even?● Films

Page 4: Deploying OpenStack with Ansible

4www.rackspace.com

@robertcathey

Cloud infra is hard. OpenStack is cloud infra. OpenStack is hard. This is news, apparently.

“”

Page 5: Deploying OpenStack with Ansible

www.rackspace.com 5

OSAD and what we’re about

● Deployer Experience● Vanilla OpenStack● Scalability● Stability

Page 6: Deploying OpenStack with Ansible

www.rackspace.com 6

Why are we here?

In late 2013, the Rackspace Private Cloud team set out to solve our common deployment, maintenance, scalability, and stability problems.

Page 7: Deploying OpenStack with Ansible

www.rackspace.com 7

Distribution packaging of OpenStack

● Out of date packages ● Out of band configuration● Packages include proprietary patches● Time to bug resolution is longer than it

should● Broken dependencies

Page 8: Deploying OpenStack with Ansible

www.rackspace.com 8

Available deployment tooling

● Maybe, sometimes, sorta, eventually “consistent”, kinda?● Upgrades difficult or impossible● Steep learning curve

Page 9: Deploying OpenStack with Ansible

www.rackspace.com 9

Legacy architecture does not scale

● Almost all deployment systems reference an architecture that suffers from the “controller 1 controller 2” model

● VIP failover for OpenStack supporting services bound to break and when it does it’ll break spectacularly!

Page 10: Deploying OpenStack with Ansible

www.rackspace.com 10

What we devised

A source-based installation of OpenStack, built within LXC containers, using a multi-master architecture orchestrated and deployed via Ansible.

Page 11: Deploying OpenStack with Ansible

www.rackspace.com 11

Why Ansible?

● Community engagement

● Orchestration

● Almost no code

● Low barrier to entry

● Crazy powerful, stupid simple

Page 12: Deploying OpenStack with Ansible

www.rackspace.com 12

Why containers?

● LXC ≈ More bare metal

● Compatible with many networking architectures

● Supports an LVM backend

● Stable

Page 13: Deploying OpenStack with Ansible

www.rackspace.com 13

What is OSAD?

OSAD == OpenStack Ansible Deployment

● Uses LXC containers to isolate components and services

● Deploys OpenStack from upstream sources

● Runs on Ubuntu 14.04

● Built for production

● No proprietary secrete sauce

○ But you could bolt on as much as you want

● Created following the KISS principle

Page 14: Deploying OpenStack with Ansible

www.rackspace.com 14

● All Ansible tasks and roles target multiple nodes, even if that number is

a multiple of one (1)

○ EVERYTHING is tagged!

● Process separation on infrastructure components (controller nodes)

○ Microservice-like, where it makes sense

OSAD architecture

Page 15: Deploying OpenStack with Ansible

www.rackspace.com 15

● Galera multi-master cluster

● RabbitMQ with mirrored queues and deterministic sorting of the master

queues

● “Cheese shop” index build for your environment stored within your

environment

OSAD infrastructure components

Page 16: Deploying OpenStack with Ansible

www.rackspace.com 16

● OSAD does not know about the “all in one” deployment

○ LXC enables the base system to deploy a multi-node cloud even

with only one physical node

○ An AIO in our gate job emulates a 32 node cloud

● Neutron with the Linux Bridge agent offer stability and supportability

○ Open vSwitch is feature-full but Linux Bridge “just works”™

OSAD scale

Page 17: Deploying OpenStack with Ansible

www.rackspace.com 17

Community project

● We support Juno and Icehouse but the code contains

Rackspace-isms

● Kilo is our first “community” release of OSAD

● 41 contributors presently in the project

○ Not all Rackers

Page 18: Deploying OpenStack with Ansible

www.rackspace.com 18

Community project

We take our role within the community seriously!

# Lines of change between Juno and Kilogit diff --stat juno kilo 1158 files changed, 39061 insertions(+), 81368 deletions(-)

Page 19: Deploying OpenStack with Ansible

www.rackspace.com 19

● Deployer experience: Ansible● Vanilla OpenStack: Source-based installation● Scalability: Built within LXC containers● Stability: Obviously!

OSAD and what we’re about

Page 20: Deploying OpenStack with Ansible

www.rackspace.com 20

OSAD configuration

● OSAD configuration is your window into inventory

○ lives in /etc/openstack_deploy

● Dynamic inventory generated via config

● Compatible with Ansible static inventory

● Execution made simple using the openstack-ansible wrapper.

Page 21: Deploying OpenStack with Ansible

www.rackspace.com 21

OSAD deployment

# Change to the playbooks directory

cd /opt/os-ansible-deployment/playbooks

# Open your favorite terminal multiplexer

tmux new -s osad-deployment

# Do all the things!

openstack-ansible setup-everything.yml

Go get coffee|food|beer, this will take a minute.

Page 22: Deploying OpenStack with Ansible

www.rackspace.com 22

What an OpenStack deployment looks like with OSAD

Diagram not built to scale.Derived from an All in One Installation.

Page 23: Deploying OpenStack with Ansible

www.rackspace.com 23

OSAD adding a compute node

# Execute run limited to the nova_compute group

openstack-ansible setup-everything.yml \

--limit nova_compute

compute_hosts: compute1: ip: 172.29.236.201 compute2: ip: 172.29.236.202 compute3: ip: 172.29.236.203 compute4: ip: 172.29.236.204 compute5: ip: 172.29.236.205

EDIT: /etc/openstack_deploy/openstack_user_config.yml

Page 24: Deploying OpenStack with Ansible

www.rackspace.com 24

OSAD adding an infrastructure node

# Execute the setup with a limit on the infra groups we’re adding

openstack-ansible setup-everything.yml \

--limit os-infra_all,\

shared-infra_all,\

identity_all

shared-infra_hosts: infra1: ip: 172.29.236.101

os-infra_hosts: infra1: ip: 172.29.236.101

identity_hosts: infra1: ip: 172.29.236.101

EDIT: /etc/openstack_deploy/openstack_user_config.yml

Page 25: Deploying OpenStack with Ansible

www.rackspace.com 25

OSAD reconfiguring all of neutron

# Execute a run limited to neutron_all

openstack-ansible setup-everything.yml \

--limit neutron_all

global_overrides: provider_networks:

- network:

container_bridge: "br-

vxlan"

container_type: "veth"

container_interface:

"eth10"

ip_from_q: "tunnel"

type: "vxlan"

range: "1:1000"

net_name: "vxlan"

group_binds:

-

neutron_linuxbridge_agent

EDIT: /etc/openstack_deploy/conf.d/neutron_networks.yml

Page 26: Deploying OpenStack with Ansible

www.rackspace.com 26

● AURO - Public OpenStack Cloud● Compute, Volume, Swift, Heat, Neutron● Canadian data residency, ownership● Vancouver region, Toronto up next

AURO - OpenStack

Page 27: Deploying OpenStack with Ansible

www.rackspace.com 27

● Not using as much as we’d like● Mostly the infrastructure components

○ Rabbit, Galera, Memcached, etc● Absolutely invaluable as an example● Will continue to bring in more OSAD components as we operate over

time● Team somewhat new to config mgmt

AURO & OSAD - What we are using

Page 28: Deploying OpenStack with Ansible

www.rackspace.com 28

● Great example of:o Using Ansibleo Deploying OpenStacko Testing - All in one, use of OpenStack infra

● Already supports Kilo● Packaging and deploying OpenStack (ie. not using OS packages -

Python Wheels very cool)● Segregation of services

AURO & OSAD - What we like

Page 29: Deploying OpenStack with Ansible

www.rackspace.com 29

● Public cloud● Midonet● Different HA Model● Billing● Support Model

○ Multiple tiers of internal support

AURO - Differences from OSAD

Page 30: Deploying OpenStack with Ansible

www.rackspace.com 30

● Not to restart services in same run as changeso Need to control restarts in HA manner, rolling

● Every task tagged● Continuously run (from Ansible Tower and/or Jenkins)● Installing once is easy, operating forever is hard● Ansible to help manage many small changes faster● People don’t ssh into servers, only Ansible

AURO - Ansible Guiding Principles

Page 31: Deploying OpenStack with Ansible

www.rackspace.com 31

● Easy to use mostly idempotent modules then run a command or shell

task and make a mess of it● changed_when: False is too easy to stumble with● Multiple environments● Being able to run one-time commands across all systems is as powerful

as it is dangerous

$ ansible -a reboot all

AURO - Ansible Struggles

Page 32: Deploying OpenStack with Ansible

www.rackspace.com 32

● Deploy OpenStack from source

● Segregation of services● More monitoring● Ansible callback plugins are useful● Learn more from OpenStack testing infra● Need a couple modules

o Midoneto Swift

AURO - Near term improvements

Page 33: Deploying OpenStack with Ansible

www.rackspace.com 33

● Be “Pluggable?” (What does that even mean?)o Neutron network - eg. Midoneto HA model - eg. ECMP/BGP load balancing

● Balancing community roles and playbooks with custom

requirements● Learn how to consume OSAD properly

AURO - OSAD Comments/Ideas/Questions

Page 34: Deploying OpenStack with Ansible

www.rackspace.com

● Secrets (eg. Hashicorp Vault, KeyWhiz)● Continuous integration...err integration● Caching (Ansible has Redis, other ideas?)● What is the “future” of config mgmt? Must be more than just

pkg/config/start/bootstrap● Change request workflow

34

AURO - Configuration Management Future

Page 35: Deploying OpenStack with Ansible

www.rackspace.com 35

● Increase community participation in OSAD

○ Community members wanted!

○ Pull requests welcome :)

● Build out the operational modules found within the upstream

● Modular Dynamic inventory

● etc . . .

Where does Ansible and OpenStack go from here?

Page 36: Deploying OpenStack with Ansible

www.rackspace.com 36

Q & A

Twitter: @cloudnullIRC: cloudnull

Email: [email protected]

Twitter: @ccollicuttIRC: serverascode

Email: [email protected]

Page 37: Deploying OpenStack with Ansible

37www.rackspace.com

OSAD makes OpenStack™ NOSAD“”

Page 38: Deploying OpenStack with Ansible

www.rackspace.com

Thank You!

EOP

38