I’ve recently been working on lots of trial-runs of software at work and got annoyed with having to rebuild servers all the time so i decided to join the rest of the world and go virtual. Our production VI at work runs VMWare (ESXi) but my trial stack was going to be a no-budget affair so I took the opportunity to try out Openstack which I’d been meaning to do for quite some time. If you’ve not come across Openstack previously, it’s a project which started at NASA and has moved over to be open source which provides pretty much all the base software you need to run a VI (cloud).
After having read a load of the install documentation on Openstack, I decided it looked pretty complex (and I still hold that view). Consequently, I looked for an installer script/application for Openstack and found the go-to installer of choice for many, devstack. After playing with devstack for a little while I actually liked it a lot, I have one major beef with it though, as default devstack configures the storage for keystone (the authentication mechanism for Openstack) to use non-persistent storage. This may be fine for very simple test purposes but I found out to my peril that user accounts e.g. admin logins don’t survive a host reboot. So after trying and failing to use a different storage backend devstack was sidelined for me (I fully recognise this is my weakness but I think since devstack is targetted at developers rather than experienced VI techies.
Enter stackops! So stackops has similar aims in that it intends to (and very much does) simplify the installation of Openstack. Stackops is essentially Ubuntu server as a basis (10.04 at the time of writing) with a “Smart installer” which is web-based to install Openstack. I found that with a little digging and a little judicious manual work, I could easily get my Openstack/stackops installation working (stackops defaults to using MySQL as the storage backend for keystone) so I thought I’d share what I found in case it helps someone out.
As a brief introduction, the stackops installer is very similar to the installer used by Debian and Ubuntu (but with no purple). So here goes with an overview of how to create an all-in-one (single node) installation of Openstack using stackops:
- Check your host server has
- A 64 bit intel/AMD (x64) CPU which supports virtualisation – note you may need to enable virtualisation support in BIOS
- A static IP to assign to it (which you can reach from your desktop on at least port 80 and 8888 – for later configuration)
- No data you need on it – you’re very likely to lose it all depending on what you do with partitioning and installation
- Download the stackops ISO and burn to disc (a CD will do the job as it’s quite small) – i’m basing this on stackops V0.5
- Boot the host from the CD created above, follow the installer with logical choices specific to you e.g. language and enter the static IP of your host when prompted
- CRITICAL STEP: When you get to the disk partition menu, choose manual then (NOTE: the information for this part came from the comments on this page):
- Ideally delete all existing partitions – NOTE: you will lose all data so only do this if you are 100% sure you don’t need any of it, you can’t get it back!
- Create partitions as follows:
- OS partition: Primary, at beginning of free space,mount point “/”, bootable flag on, whatever size you want (this will hold the OS, apps etc. so I;d recommend 15GB or more)
- Swap partition: Logical, at end of free space, “use as” = “Swap area”, whatever size you want but probably best to be about the same as the amount of RAM you have
- Now we need to create the LVM group which Openstack will use for VM storage so choose “Configure the Logical Volume Manager” and choose “Yes” when asked if you want to write changes to disk
- Now choose “Create volume group” and use the name “nova-volumes” (without the quotes) – Openstack expects this name so you must use it
- Choose the free space from the selection menu (use spacebar to select) then write changes to LVM then choose “Finish” and then write changes to disk
- Follow the rest of the stackops installer as normal
You’ll eventually arrive at a shell login prompt so you’re nearly done! Log in as root using the default password of “stackops” (without the quotes).
Now run the shell command “pvs” and note the device path (bolded below)
root@nova-controller:/# pvs PV VG Fmt Attr PSize PFree /dev/cciss/c0d0p6 nova-volumes lvm2 a- 102.42g 97.42g root@nova-controller:/# pvs PV VG Fmt Attr PSize PFree /dev/cciss/c0d0p6 nova-volumes lvm2 a- 102.42g 97.42g
(You’ll need this in a moment)
So now go back to your desktop and go to the web-installer on the host on port 8888 – so if your hosts static IP is 192.168.16.10, go to 192.168.16.10:8888 and you will be forwarded on to the stackops web installer – don’t be scared it does work!
So head through the installer and when you come to the “volumes” page, make sure you select the device which holds your “nova-volumes” LVM group which we found above. Now complete the installer and sit back while it does it’s work.
Once the installer is complete, shell in again as root (pw: stackops) to the host – you now need to add some VM images. This step seems to be omitted in many guides but luckily, the nice folk at devstack and stackops have provided scripts to download and install some common images e.g. Debian, Ubuntu, Centos etc. You can find these scripts in /var/lib/stackops, just run them using e.g. ./pubdebian6.sh once you’ve cd’d to /var/lib/stackops.
Now you can log in to your admin console which is on port 80 at the static IP of your host.
Hope that’s useful.
Documents for reference: