openstack in 10 minutes with devstack
DESCRIPTION
The best way to understand the cloud, is to have one of your own to kick around, poke, break, fix, and see what it looks like when it's running. In OpenStack we've got a whole project called Devstack which is designed to quickly bootstrap the latest git versions of all the OpenStack components and create an experimentation friendly OpenStack environment. This talk will introduce Devstack, how to get a running OpenStack with it, and how one might begin making changes and seeing them in action. We'll explore a few of the major OpenStack services, see what's going on, all with the intent to explain what OpenStack is by seeing not only the interface, but the internals at work. Presented at LinuxCon NA 2014TRANSCRIPT
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
OpenStack in 10 minuteswith DevStackSean Dague / Aug 20th, 2014Twitter: @sdagueBlog: dague.net
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.2
OpenStack – A Constellation of IaaS Services
Nova
GlanceSwift CinderCinder Neutron
Horizon
KeystoneCeilometer
Heat
Sahara
Trove
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.3
Installing OpenStack from Source
● Project Git Trees: 30 - 40● Python Dependencies: 50 – 100● Linux Distro Dependencies: > 100● Databases: 5 – 10● Configuration Changes to System: … a lot
Not a Journey for the faint of heart
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.4
● Written in Bash● Prompts for 5 passwords● Sane defaults for all else● Supports latest master +
supported stable branches● Core part of OpenStack's
testing infrastructure● Core part of OpenStack
developer workflow
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.5 Let's kick off a DevStack run...
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.6
What DevStack Does
● Installing all prereq software via packages or pip● Installing all OpenStack software via git to latest master● Configuring and installing working database schema● Configuring hypervisor, storage backends, networks● Creating service ids and service catalog entries to connect all components● Starting all OpenStack services under screen (for easy hot fix)● Creating Apache configuration for web dashboard available at 127.0.0.1● Creates working Tempest config in /opt/stack/tempest
WARNING: DevStack will massively modify your OS. Do not run on a laptop.
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.7
OpenStack as Layers (Compute Centric View)
Layer 1: Base Compute Infrastructure
Layer 2: Extended Infrastructure
Layer 3: Optional Enhancements
Layer 4: Consumption Services
Nova Glance Keystone
Ceilometer Horizon
Heat Trove Sahara
Ironic
Barbican
Marconi
Compute Image
Bare Metal
Neutron DesignateNetworking DNS
Cinder SwiftObjectBlock
Storage Services Compute ServicesNetwork Services
Identity
Telemetry Dashboard Key Management
Orchestration Database Hadoop Queues
Integrated
Incubated
http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.8
Alternate Compositions
Layer 1: Base Compute Infrastructure
Layer 2: Extended Infrastructure
Layer 3: Optional Enhancements
Layer 4: Consumption Services
Nova Glance
Ceilometer Horizon
Heat Trove Sahara
Ironic
Barbican
Marconi
Compute Image
Bare Metal
Neutron DesignateNetworking DNS
SwiftObject
Storage Services Compute ServicesNetwork Services
Telemetry Dashboard Key Management
Orchestration Database Hadoop Queues
KeystoneIdentity
CinderBlock
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.9
OpenStack Services – Management Glue
● OpenStack Services as Management Plane● Example: Keystone – Identity Services
– Provides REST API over existing auth systems
– Generates Tokens (with expiration) for User + Action in OpenStack Cloud
– Additional Metadata / Grouping for cloud operations
– Service Catalog to be able to discover all OpenStack end points beyond Keystone
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.10
Queue Pattern in OpenStack (Creating a Compute Server)
Nova API Keystone Nova Sched Nova ComputeGlance Nova Conductor
Database interactionREST interactionRPC (AMQP) interaction
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.11
Watching it in Real Time
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.12
Hacking with DevStack
● Edit code in /opt/stack– Be careful about devstack overwriting things, safer to use local branches
● Connect to screen: screen -rd stack● Find service you want restarted
– Ctrl-C
– Up Arrow
– Enter
● Voila! Your changes are now running.
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.13
Customizing DevStack further – when the defaults aren't enough
ADMIN_PASSWORD=0penstackAPI_RATE_LIMIT=FalseLOGDAYS=1LOGFILE=$DEST/logs/stack.sh.logMYSQL_PASSWORD=superstackRABBIT_HOST=localhostRABBIT_PASSWORD=superstackSCREEN_LOGDIR=$DEST/logs/screenSCREEN_NAME=${SCREEN_NAME:-stack}SERVICE_PASSWORD=$ADMIN_PASSWORDSERVICE_TOKEN=cd0d1a03-b701-4fcb-801a-8b4d0bc3d06eSTACK_LOG=stack.sh.logVOLUME_BACKING_FILE_SIZE=10000MHEAT_CFN_IMAGE_URL=""enable_service s-account s-container s-object s-proxySWIFT_HASH=8213897fads879789asdf789SWIFT_REPLICAS=1
devstack/localrc – basic devstack configuration
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.14
Devstack Defaults
Layer 1: Base Compute Infrastructure
Layer 2: Extended Infrastructure
Layer 3: Optional Enhancements
Layer 4: Consumption Services
Ceilometer
Trove Sahara
Ironic
Barbican
Marconi
Bare Metal
Neutron DesignateNetworking DNS
SwiftObject
Storage Services Compute ServicesNetwork Services
Telemetry Key Management
Database Hadoop Queues
KeystoneIdentity
CinderBlock
HeatOrchestration
HorizonDashboard
Nova GlanceCompute Image
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.15
And if you need more specifics – local.conf
[[local|localrc]]DATABASE_PASSWORD=passRABBIT_PASSWORD=passSERVICE_TOKEN=passSERVICE_PASSWORD=passADMIN_PASSWORD=passMULTI_HOST="True"API_RATE_LIMIT="False"RECLONE="True"LOGFILE=/opt/stack/logs/stack.sh.logVERBOSE=TrueLOG_COLOR=TrueSCREEN_LOGDIR=/opt/stack/logs
[[post-config|$NOVA_CONF]][DEFAULT]flat_interface = eth1vlan_interface = eth1
Pass through variables
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.16
Caveat Developer
● 4G memory recommended– 8G VMs used in OpenStack testing
● Can run in a VM– 2nd Level guests will be slow, but cirros works ok
● Be extremely careful with changes in /opt/stack● Does not reclone git trees by default● If all else goes wrong... ./clean.sh should fix it
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.17
DevStack doesn't support my particular desired config, what do I do?
● A good change to DevStack– Generally useful configs
– Not just pass through variables that could be specified via local.conf
– Fits current architecture
● Reviewed through review.openstack.org– Small review team, please be patient
– Small patches much better than large ones
– Questions can be asked on #openstack-qa on freenode.net
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.18
Related Projects
● openstack-dev/devstack-vagrant– Vagrant configuration to make DevStack deployment into a VM even easier
● openstack-dev/grenade– Upgrade testing for OpenStack that consumes devstack as a library
● openstack-infra/devstack-gate– Setup tool for building the devstack based configurations we test with in OpenStack
● openstack-dev/bashate– bash style enforcement tool (inspired by pep8) used by bash projects in OpenStack
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.19
Thanks!
Layer 1: Base Compute Infrastructure
Layer 2: Extended Infrastructure
Layer 3: Optional Enhancements
Layer 4: Consumption Services
Nova Glance Keystone
Ceilometer Horizon
Heat Trove Sahara
Ironic
Barbican
Marconi
Compute Image
Bare Metal
Neutron DesignateNetworking DNS
Cinder SwiftObjectBlock
Storage Services Compute ServicesNetwork Services
Identity
Telemetry Dashboard Key Management
Orchestration Database Hadoop Queues
Integrated
Incubated
http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/
Questions?