This document introduces DEVSTACKpy, a Python rewrite of the devstack installation script for OpenStack. It aims to address perceived shortcomings in the existing Bash script by using object-oriented programming practices for improved modularity, readability, and extensibility. Features discussed include component-specific installations, multi-node support, uninstall/start/stop functions, and multiple concurrent version management. The author demonstrates DEVSTACKpy and invites further contributions to additional features and documentation.
2. Dev. installs to hard? Welcome to the land of happiness & joy.
DEVSTACKpy
and what it can do for u!
Joshua Harlow + Oompa loompa’s
Codeus Awesomus @ Yahoo!
3.
4. What is this all about??
‣ Have you used devstack.org?
‣ Used by an increasing number of people to kick the
tires, develop with OpenStack, setup CI, figure out how
to install…
‣ Not perfect though (great initial work!)
‣ For my definition of perfect…
‣ DEVSTACKpy is meant to help get it going in the
right direction, with new features and common
OOP practices and many more goodies!
5.
6. What is great about devstack.sh
‣ An install script for developers that can setup a
OpenStack instance (with the 4+ main
components)!
‣ Somewhat easy to read (as long as you are
comfortable with unix commands and bash)
‣ Provided a initial package and pypi package
listing for each component
‣ Describing what is done and why (docs)
‣ CI setup (good/bad, idk)
7. What we thought was lacking
‣ Python usage
‣ Why add another shell language to be understood
‣ If you are developing in OpenStack, you most likely
already understand python…
‣ Can take advantage of logging, subprocess, os, sys…
‣ Can use pylint and pep8 for sanity checking
‣ Complete package/pypi dependency listings
‣ Allows for you to reproduce environment
configurations easily
8. What we thought was lacking
‣ Multiple distribution support
‣ Ties into having complete package dependencies and
knowledge of bugs/features in each distribution
‣ Currently works with RHEL6.2, Ubuntu 11.10, Ubuntu
12.04 (WIP), Fedora 16
‣ Componentized installs (i.e., I only want glance)
‣ Devstack.sh has this somewhat, but there is no way
to easily scrape the shell script to determine what
actually is needed for a specific component
‣ Classes and functions and objects are our friends
10. What we thought was lacking
‣ Multi-node installs (WIP)
‣ It may be controversial but in reality developers do like
to simulate real environments and a single node install
isn’t very realistic
‣ Useful for integration testing as well (TBD)
‣ OOP/Composition/Decoupling
‣ Programming practices do matter, and we should not
sacrifice this (ever), have pride in what you do!
‣ Decoupled/plugin-like code is easier to read, easier
to extend, easier to debug, easier to trace…
12. What we thought was lacking
‣ Ability to “CTRL-C” at anytime
‣ For example, install partially then stop, say oops, and
then be able to uninstall whatever was installed
‣ Multiple extensible run modes
‣ Everyone's cup of tea isn’t screen
‣ Supports screen, forking, upstart (easily extensible)
‣ Dry-run mode
‣ Sometimes you don’t want to actually install but you
just want to see what would of happened
13. What we thought was lacking
‣ Multiple concurrent versions
‣ No need to place in /opt/… place it wherever you want
‣ Useful to say have version X in Y dir and version X+1 in
Y+1 dir and start and stop either or as desired
‣ For example test with working version X and try
new feature with unstable version X+1
‣ Uninstall, starting, stopping
‣ Extensible (each component can choose how it
wants to perform these operations)
16. What’s next?
‣ Continuing working on multi-node installs
‣ Figure out plan for replacement of devstack.sh?
‣ More docs/code comments…
‣ Swift needs some love
‣ Idempotent installs (ie transactional like)
17. What’s next?
‣ Figure out what to do with CI
‣ Should devstack be doing this??
‣ Building packages from a DEVSTACKpy install
‣ rpm BUILDROOT match closely the install root…
‣ GPG keystore usage (for passwords)?
‣ Any other awesomeness we can think up!
19. Hugs
‣ Much thanks to the following:
‣ Y! and DreamHost guys/gals
‣ Meme generators and monty python
‣ My parents and my invisible friend
‣ And any others that I missed, much appreciated!