Openstack Quantum + Devstack Tutorial

14,854 views
14,520 views

Published on

Presented at March 8 Essex Installfest Boston.

Published in: Technology

Openstack Quantum + Devstack Tutorial

  1. 1. Quantum + Devstack Tutorial Dave Lapsley dlapsley@nicira.com
  2. 2. Outline• Overall Architecture• Instance Launching Internals• Devstack in 30s• Single Node Development Deployment (OVS)• Multi-Node Development Deployment (OVS)• Tips and Tricks
  3. 3. Nova/Quantum Architecture http Dashboard EC2/Openstack API EC2/Admin API Glance API Glance API Nova API Nova Compute Glance Image Nova Nova Nova Network/ Registry Store Queue Database Quantum Manager (swift,etc) GlanceDatabase Volume Nova Nova Storage Volume Schedule Adapted from http://ken.pepple.info/openstack/2011/04/22/openstack-nova-architecture/
  4. 4. Instance Launching InternalsAPI server receives run_instancecommand from user.1. api server relays message to cloud controller (authentication).2. controller sends message to scheduler3. scheduler casts message to a “random” host and requests instance start4. compute worker on host grabs the message5. compute worker needs IP to launch new instance so it sends a message to the network controller (5,6,7,8).Compute worker continues withspawning a new instance. Adapted from http://www.laurentluce.com/posts/openstack-nova-internals-of-instance-launching/
  5. 5. Devstack in 30s• Quickstart – http://devstack.org – git clone https://github.com/openstack- dev/devstack.git cd devstack && ./stack.sh• Important files: – localrc: node settings – stackrc: git repo and branch information, image download location – tools/info.sh: capture system information, git project/branch/commit, package version information, local node settings
  6. 6. Single Node Devstack + QuantumDevelopment Deployment (OVS plugin)
  7. 7. Quantum Images, Patches, and Scripts• Default devstack vm images currently don’t support multiple interfaces (patch available at: https://bugs.launchpad.net/devstack/+bug/940693)• quantum.sh script is useful for automating your quantum setups and testing. Currently under review at: https://review.openstack.org/#change,4665• OVS Plugin provides some really nice features but requires VLAN support for multi-node in basic non-tunneled mode. If developing in virtualized environment, make sure your ethernet drivers/hypervisor don’t strip tagging: – Virtual Box works fine (with virtio-net driver – haven’t tested others yet)
  8. 8. Demo logical layout
  9. 9. localrc and versions# Hosts git|glance|master[c6a626e]HOST_IP=192.168.56.3 git|horizon|master[eb72487] git|keystone|master[48dc5be]# Services git|nova|master[67eb98d]ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-vol,n-sch,n- git|noVNC|master[22b9a75]novnc,n-xvnc,n-cauth,horizon,mysql,rabbit,quantum,q-svc,q-agt git|python-keystoneclient|master[ca76785] git|python-novaclient|master[01873d0]# Networks git|python-quantumclient|master[f6d5087]FIXED_NETWORK_SIZE=4096 git|quantum|master[a59c832]FIXED_RANGE=10.4.128.0/20 os|vendor=UbuntuFLAT_INTERFACE=eth1 os|release=11.10FLOATING_RANGE=172.16.142.128/25# MiscLOGFILE=/home/dlapsley/logs/stack.logMULTI_HOST=0OFFLINE=1SERVICE_TOKEN=xyzpdqlazydogSYSLOG=TrueUPLOAD_LEGACY_TTY=1MYSQL_PASSWORD=novaRABBIT_PASSWORD=novaADMIN_PASSWORD=novaRECLONE=noSERVICE_PASSWORD=novaDEFAULT_IMAGE_NAME=tty-quantum
  10. 10. Single Node Demo
  11. 11. Multi-Node Devstack + Quantum (OVS plugin)
  12. 12. Quantum Images, Patches, and Scripts• As for single node development deployment• Devstack patches under submission or to be submitted• Patches will also be available on Quantum Wiki next week: – http://wiki.openstack.org/Quantum
  13. 13. localrcs (same version info as before)# CONTROLLER NODE # COMPUTE NODE# Hosts # HostsHOST_IP=192.168.56.3 HOST_IP=192.168.56.2 Q_HOST=192.168.56.3# Services GLANCE_HOSTPORT=192.168.56.3:9292ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-vol,n-sch,n-novnc,n-xvnc,n- KEYSTONE_HOST=192.168.56.3cauth,horizon,mysql,rabbit,quantum,q-svc,q-agt MYSQL_HOST=192.168.56.3 RABBIT_HOST=192.168.56.3# Networks SYSLOG_HOST=192.168.56.3FIXED_NETWORK_SIZE=4096FIXED_RANGE=10.4.128.0/20 # ServicesFLAT_INTERFACE=eth1 ENABLED_SERVICES=n-cpu,n-sch,quantum,q-agtFLOATING_RANGE=172.16.142.128/25 # Networks# Misc FIXED_NETWORK_SIZE=4096LOGFILE=/home/dlapsley/logs/stack.log FIXED_RANGE=10.4.128.0/20MULTI_HOST=0 FLAT_INTERFACE=eth1OFFLINE=1 FLOATING_RANGE=172.16.142.128/25SERVICE_TOKEN=xyzpdqlazydogSYSLOG=True # MiscUPLOAD_LEGACY_TTY=1 LOGFILE=/home/dlapsley/logs/stack.log MULTI_HOST=0MYSQL_PASSWORD=nova OFFLINE=1RABBIT_PASSWORD=nova SERVICE_TOKEN=xyzpdqlazydogADMIN_PASSWORD=nova SYSLOG=TrueRECLONE=no UPLOAD_LEGACY_TTY=1SERVICE_PASSWORD=novaDEFAULT_IMAGE_NAME=tty-quantum MYSQL_PASSWORD=nova RABBIT_PASSWORD=nova ADMIN_PASSWORD=nova RECLONE=no SERVICE_PASSWORD=nova DEFAULT_IMAGE_NAME=tty-quantum
  14. 14. Multi-node Demo
  15. 15. Tips and Tricks Summary• devstack is your friend• Default images currently don’t support multiple interfaces (patch available at: https://bugs.launchpad.net/devstack/+bug/940693)• devstack/tools/info.sh is also your friend – Version information is critical for reproducible environment (particularly during periods of high code churn)• devstack needs some minor patching to work with multi-node quantum (to be submitted for review next week)• quantum.sh script is useful for automating your quantum setups and testing. Currently under review at: https://review.openstack.org/#change,4665• OVS Plugin provides some really nice features but requires VLAN support for multi-node in basic non-tunneled mode. If developing in virtualized environment, make sure your ethernet drivers/hypervisor don’t strip tagging: – Virtual Box works fine (with virtio-net driver – haven’t tested others yet)
  16. 16. Thank youdlapsley@nicira.com

×