Friday 21 December 2012
DevStack on openSUSE, or how to quickly setup OpenStack on openSUSE
One of the first things I did when I joined the Cloud team at SUSE was to start porting DevStack to openSUSE. DevStack is a set of shell scripts to build complete OpenStack development environments. It is useful to create a small OpenStack environment that will be used for hacking, testing, etc. and is therefore primarily used for upstream development. Getting this to work on openSUSE seemed like a logical first step before doing more OpenStack work. I got things working pretty quickly, but for various reasons, this all stayed in a personal branch of mine (except for a few preliminary patches).
A few weeks ago, I got time for DevStack again. So I rebased my branch, cleaned up everything, and started submitting the patches. After reviews from Sean Dague and Dean Troyer (and some patch rewriting to address the issues that were raised), the openSUSE support landed in master. A few other people tested it, and nobody has been hitting any major issue, so yesterday, I finally submitted the patch to make openSUSE 12.2 a supported distribution. Now you can play with DevStack on openSUSE!
I wrote some documentation for DevStack on openSUSE if you want to get more details on how to use it. But I guess it wouldn't hurt to show how easy it is to setup your own OpenStack environment this way...
I'm shamelessly stealing instructions from the single VM DevStack guide to show you the very short version. Just run the following in an openSUSE virtual machine (do not run this on your main system unless you're 100% sure it's what you want: DevStack is a little bit too invasive right now; see Daniel's analysis on this topic):
zypper in git-core git clone https://github.com/openstack-dev/devstack.git cd devstack echo ADMIN_PASSWORD=password > localrc echo MYSQL_PASSWORD=password >> localrc echo RABBIT_PASSWORD=password >> localrc echo SERVICE_PASSWORD=password >> localrc echo SERVICE_TOKEN=tokentoken >> localrc echo FLAT_INTERFACE=br100 >> localrc ./stack.sh
(You'll actually need to call FORCE=yes ./stack.sh
until the patch mentioned above gets in.)
And there you go, you have OpenStack running! That was quite easy, right? :-) You can connect to the web dashboard (horizon) or use the command line tools (hint: source openrc
will setup the proper environment variables for you). Here's a few commands you can use to get started:
source openrc glance image-list # find out which image is available nova boot --image cirros-0.3.0-x86_64-uec --flavor m1.tiny cirros-test # start an instance of one specific image nova list # see what instances are in the cloud
So go ahead, read the documentation, play with all this, and enjoy DevStack on openSUSE!
Last Comments