OpenStack in 10 minutes 
with DevStack 
Sean Dague / Aug 20th, 2014 
Twitter: @sdague 
Blog: dague.net 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
OpenStack – A Constellation of IaaS Services 
Horizon 
Swift CCiinnddeerr Neutron 
Nova 
Glance 
Keystone 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 2 without notice. 
Ceilometer 
Heat 
Sahara 
Trove
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 3 without notice.
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 4 without notice. 
● 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 5 without notice. Let's kick off a DevStack run...
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 6 without notice.
OpenStack as Layers (Compute Centric View) 
Layer 4: Consumption Services 
Heat Trove Sahara 
Orchestration Database Hadoop Queues 
Layer 3: Optional Enhancements 
Ceilometer Horizon 
Telemetry Dashboard Key Management 
Layer 2: Extended Infrastructure 
Storage Services Network Services Compute Services 
Layer 1: Base Compute Infrastructure 
Nova Glance Keystone 
Marconi 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 7 without notice. 
Ironic 
Barbican 
Compute Image 
Bare Metal 
Neutron Designate 
Networking DNS 
Cinder Swift 
Block Object 
Identity 
Integrated 
Incubated 
http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/
Alternate Compositions 
Layer 4: Consumption Services 
Heat Trove Sahara 
Orchestration Database Hadoop Queues 
Layer 3: Optional Enhancements 
Ceilometer Horizon 
Telemetry Dashboard Key Management 
Layer 2: Extended Infrastructure 
Storage Services Network Services Compute Services 
Layer 1: Base Compute Infrastructure 
Nova Glance 
Marconi 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 8 without notice. 
Ironic 
Barbican 
Compute Image 
Bare Metal 
Neutron Designate 
Networking DNS 
Swift 
Object 
Keystone 
Identity 
Cinder 
Block
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 9 without notice.
Queue Pattern in OpenStack (Creating a Compute Server) 
Nova API Keystone Nova Sched Glance Nova Conductor Nova Compute 
Database interaction 
REST interaction 
RPC (AMQP) interaction 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 10 without notice.
Watching it in Real Time 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 11 without notice.
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 12 without notice.
Customizing DevStack further – when the defaults aren't enough 
devstack/localrc – basic devstack configuration 
ADMIN_PASSWORD=0penstack 
API_RATE_LIMIT=False 
LOGDAYS=1 
LOGFILE=$DEST/logs/stack.sh.log 
MYSQL_PASSWORD=superstack 
RABBIT_HOST=localhost 
RABBIT_PASSWORD=superstack 
SCREEN_LOGDIR=$DEST/logs/screen 
SCREEN_NAME=${SCREEN_NAME:-stack} 
SERVICE_PASSWORD=$ADMIN_PASSWORD 
SERVICE_TOKEN=cd0d1a03-b701-4fcb-801a-8b4d0bc3d06e 
STACK_LOG=stack.sh.log 
VOLUME_BACKING_FILE_SIZE=10000M 
HEAT_CFN_IMAGE_URL="" 
enable_service s-account s-container s-object s-proxy 
SWIFT_HASH=8213897fads879789asdf789 
SWIFT_REPLICAS=1 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 13 without notice.
Devstack Defaults 
Layer 4: Consumption Services 
Trove Sahara 
Database Hadoop Queues 
Heat 
Orchestration 
Layer 3: Optional Enhancements 
Ceilometer 
Telemetry Key Management 
Layer 2: Extended Infrastructure 
Storage Services Network Services Compute Services 
Layer 1: Base Compute Infrastructure 
Marconi 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 14 without notice. 
Ironic 
Barbican 
Bare Metal 
Neutron Designate 
Networking DNS 
Swift 
Object 
Keystone 
Identity 
Cinder 
Block 
Horizon 
Dashboard 
Nova Glance 
Compute Image
And if you need more specifics – local.conf 
[[local|localrc]] 
DATABASE_PASSWORD=pass 
RABBIT_PASSWORD=pass 
SERVICE_TOKEN=pass 
SERVICE_PASSWORD=pass 
ADMIN_PASSWORD=pass 
MULTI_HOST="True" 
API_RATE_LIMIT="False" 
RECLONE="True" 
LOGFILE=/opt/stack/logs/stack.sh.log 
VERBOSE=True 
LOG_COLOR=True 
SCREEN_LOGDIR=/opt/stack/logs 
[[post-config|$NOVA_CONF]] 
[DEFAULT] 
flat_interface = eth1 
vlan_interface = eth1 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 15 without notice. 
Pass through variables
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 16 without notice.
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 17 without notice.
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 18 without notice.
Thanks! 
Layer 4: Consumption Services 
Heat Trove Sahara 
Orchestration Database Hadoop Queues 
Layer 3: Optional Enhancements 
Ceilometer Horizon 
Telemetry Dashboard Key Management 
Layer 2: Extended Infrastructure 
Storage Services Network Services Compute Services 
Layer 1: Base Compute Infrastructure 
Nova Glance Keystone 
Marconi 
© Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 19 without notice. 
Ironic 
Barbican 
Compute Image 
Bare Metal 
Neutron Designate 
Networking DNS 
Cinder Swift 
Block Object 
Identity 
Integrated 
Incubated 
http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/ 
Questions?

OpenStack in 10 minutes with Devstack

  • 1.
    OpenStack in 10minutes with DevStack Sean Dague / Aug 20th, 2014 Twitter: @sdague Blog: dague.net © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
  • 2.
    OpenStack – AConstellation of IaaS Services Horizon Swift CCiinnddeerr Neutron Nova Glance Keystone © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 2 without notice. Ceilometer Heat Sahara Trove
  • 3.
    Installing OpenStack fromSource ● 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 3 without notice.
  • 4.
    © Copyright 2014Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 4 without notice. ● 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
  • 5.
    © Copyright 2014Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 5 without notice. Let's kick off a DevStack run...
  • 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 6 without notice.
  • 7.
    OpenStack as Layers(Compute Centric View) Layer 4: Consumption Services Heat Trove Sahara Orchestration Database Hadoop Queues Layer 3: Optional Enhancements Ceilometer Horizon Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Storage Services Network Services Compute Services Layer 1: Base Compute Infrastructure Nova Glance Keystone Marconi © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 7 without notice. Ironic Barbican Compute Image Bare Metal Neutron Designate Networking DNS Cinder Swift Block Object Identity Integrated Incubated http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/
  • 8.
    Alternate Compositions Layer4: Consumption Services Heat Trove Sahara Orchestration Database Hadoop Queues Layer 3: Optional Enhancements Ceilometer Horizon Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Storage Services Network Services Compute Services Layer 1: Base Compute Infrastructure Nova Glance Marconi © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 8 without notice. Ironic Barbican Compute Image Bare Metal Neutron Designate Networking DNS Swift Object Keystone Identity Cinder Block
  • 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 9 without notice.
  • 10.
    Queue Pattern inOpenStack (Creating a Compute Server) Nova API Keystone Nova Sched Glance Nova Conductor Nova Compute Database interaction REST interaction RPC (AMQP) interaction © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 10 without notice.
  • 11.
    Watching it inReal Time © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 11 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 12 without notice.
  • 13.
    Customizing DevStack further– when the defaults aren't enough devstack/localrc – basic devstack configuration ADMIN_PASSWORD=0penstack API_RATE_LIMIT=False LOGDAYS=1 LOGFILE=$DEST/logs/stack.sh.log MYSQL_PASSWORD=superstack RABBIT_HOST=localhost RABBIT_PASSWORD=superstack SCREEN_LOGDIR=$DEST/logs/screen SCREEN_NAME=${SCREEN_NAME:-stack} SERVICE_PASSWORD=$ADMIN_PASSWORD SERVICE_TOKEN=cd0d1a03-b701-4fcb-801a-8b4d0bc3d06e STACK_LOG=stack.sh.log VOLUME_BACKING_FILE_SIZE=10000M HEAT_CFN_IMAGE_URL="" enable_service s-account s-container s-object s-proxy SWIFT_HASH=8213897fads879789asdf789 SWIFT_REPLICAS=1 © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 13 without notice.
  • 14.
    Devstack Defaults Layer4: Consumption Services Trove Sahara Database Hadoop Queues Heat Orchestration Layer 3: Optional Enhancements Ceilometer Telemetry Key Management Layer 2: Extended Infrastructure Storage Services Network Services Compute Services Layer 1: Base Compute Infrastructure Marconi © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 14 without notice. Ironic Barbican Bare Metal Neutron Designate Networking DNS Swift Object Keystone Identity Cinder Block Horizon Dashboard Nova Glance Compute Image
  • 15.
    And if youneed more specifics – local.conf [[local|localrc]] DATABASE_PASSWORD=pass RABBIT_PASSWORD=pass SERVICE_TOKEN=pass SERVICE_PASSWORD=pass ADMIN_PASSWORD=pass MULTI_HOST="True" API_RATE_LIMIT="False" RECLONE="True" LOGFILE=/opt/stack/logs/stack.sh.log VERBOSE=True LOG_COLOR=True SCREEN_LOGDIR=/opt/stack/logs [[post-config|$NOVA_CONF]] [DEFAULT] flat_interface = eth1 vlan_interface = eth1 © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 15 without notice. Pass through variables
  • 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 16 without notice.
  • 17.
    DevStack doesn't supportmy 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 17 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 18 without notice.
  • 19.
    Thanks! Layer 4:Consumption Services Heat Trove Sahara Orchestration Database Hadoop Queues Layer 3: Optional Enhancements Ceilometer Horizon Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Storage Services Network Services Compute Services Layer 1: Base Compute Infrastructure Nova Glance Keystone Marconi © Copyright 2014 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change 19 without notice. Ironic Barbican Compute Image Bare Metal Neutron Designate Networking DNS Cinder Swift Block Object Identity Integrated Incubated http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/ Questions?