OpenStack in 10 minutes with DevStack Sean Dague / Aug 20th, 2014 Twitter: @sdague Blog: dague.net
OpenStack A Constellation of IaaS Services Heat Sahara Horizon Swift Trove Glance Nova Cinder Keystone 2 Neutron Ceilometer
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 3
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
5 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. 6
OpenStack as Layers (Compute Centric View) Layer 4: Consumption Services Heat Trove Sahara Marconi Orchestration Database Hadoop Queues Integrated Incubated Layer 3: Optional Enhancements Ceilometer Horizon Barbican Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Network Services Storage Services Cinder Swift Neutron Designate Ironic Block Object Networking DNS Bare Metal Layer 1: Base Compute Infrastructure 7 Compute Services Nova Glance Keystone Compute Image Identity http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/
Alternate Compositions Layer 4: Consumption Services Heat Trove Sahara Marconi Orchestration Database Hadoop Queues Layer 3: Optional Enhancements Ceilometer Horizon Barbican Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Network Services Storage Services Cinder Swift Neutron Designate Ironic Block Object Networking DNS Bare Metal Layer 1: Base Compute Infrastructure 8 Compute Services Nova Glance Keystone Compute Image Identity
OpenStack Services Management Glue 9 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
Queue Pattern in OpenStack (Creating a Compute Server) Nova API Keystone Nova Sched Glance Database interaction REST interaction RPC (AMQP) interaction 10 Nova Conductor Nova Compute
Watching it in Real Time 11
Hacking with DevStack Edit code in /opt/stack Connect to screen: screen -rd stack Find service you want restarted 12 Be careful about devstack overwriting things, safer to use local branches Ctrl-C Up Arrow Enter Voila! Your changes are now running.
Customizing DevStack further when the defaults aren't enough devstack/localrc basic devstack configuration 13 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
Devstack Defaults Layer 4: Consumption Services Heat Trove Sahara Marconi Orchestration Database Hadoop Queues Layer 3: Optional Enhancements Ceilometer Horizon Barbican Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Network Services Storage Services Cinder Swift Neutron Designate Ironic Block Object Networking DNS Bare Metal Layer 1: Base Compute Infrastructure 14 Compute Services Nova Glance Keystone Compute Image Identity
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 15 Pass through variables
Caveat Developer 4G memory recommended Can run in a VM 16 8G VMs used in OpenStack testing 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
DevStack doesn't support my particular desired config, what do I do? 17 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
Related Projects openstack-dev/devstack-vagrant openstack-dev/grenade Setup tool for building the devstack based configurations we test with in OpenStack openstack-dev/bashate 18 Upgrade testing for OpenStack that consumes devstack as a library openstack-infra/devstack-gate Vagrant configuration to make DevStack deployment into a VM even easier bash style enforcement tool (inspired by pep8) used by bash projects in OpenStack
Thanks! Layer 4: Consumption Services Heat Trove Sahara Marconi Orchestration Database Hadoop Queues Questions? Layer 3: Optional Enhancements Ceilometer Horizon Barbican Telemetry Dashboard Key Management Layer 2: Extended Infrastructure Network Services Storage Services Cinder Swift Neutron Designate Ironic Block Object Networking DNS Bare Metal Layer 1: Base Compute Infrastructure 19 Compute Services Nova Glance Keystone Compute Image Identity http://hackstack.org/x/blog/2013/09/05/openstack-seven-layer-dip-as-a-service/ Integrated Incubated