Chris Moberly

Creating an OpenStack Sandbox

Blog Post created by Chris Moberly on May 8, 2014

I'm currently diving into OpenStack and thought I'd quickly share my process of creating a sandbox.

 

I use a dedicated hosted physical server from Datashack.net (configured 8 GB of RAM with their cheapest box for a total of $30 a month). I configured it as a virtualization host using KVM as a hypervisor. My OpenStack sandbox is a virtual machine on top of this. You could also use your desktop or laptop with VMware or Oracle VirtualBox if you prefer.

 

Here's a quick overview of the setup:

- Install Ubuntu 12.04 minimal on a virtual machine (http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/mini.iso). You could try a newer version, but I personally had major issues getting Ubuntu 14 working. The installation defaults are fine. Make sure to create a user named 'stack' during the install process. This will set up sudo privileges which are needed later on. Make sure you are logged in as user 'stack' for the rest of this tutorial, NOT root.

 

- Run the following command so you can get remote console access:

sudo apt-get install ssh

 

- I also installed the following package so I could easily set up my iptables firewall, but you probably don't need to do this if you aren't on a public network interface. The OpenStack install will automatically configure most of what you need for your firewall.

sudo apt-get install iptables-persistent

 

- make sure to update your installed packages:

sudo apt-get update

 

- "DevStack" is a single-node implementation of OpenStack for testing purposes. It should NEVER be used in production. Run the following commands inside your Ubuntu console to get it prepared:

sudo apt-get install git -y

git clone https://github.com/openstack-dev/devstack.git

cd devstack

mv ./samples/local.conf ./

 

- Now use your favorite text editor (the minimal install should have vi and pico) to open up local.conf and make any changes you deem necessary. Here is what I did:

- Set passwords for the four password variables (I just don't like using standard passwords for anything)

- Configured the 'HOST_IP' section with the static IP assigned to my Ubuntu VM

- Set 'FLOATING_RANGE' and 'FIXED_RANGE' to addresses I knew were not in use in my environment. You might want to read up on these - fixed IPs can be assigned to your instances at boot and floating can be dynamic, but don't worry about it for now if you are just poking around.

 

- You can now run the following command to install it all:

./stack.sh

 

- This is going to run for a while. Grab some coffee. After it completes, scroll up a bit in the console window and look for information on the URLs to access various components (Horizon and Keystone). Next, open up a web browser on your own machine and browse to the IP address you found. You should see something like this. Your username is 'admin' and the password is what you set above in local.conf.

Screen Shot 2014-05-08 at 9.38.17 AM.png

Success!

 

IMPORTANT: If you need to reboot your Ubuntu machine, make sure to run 'unstack.sh' first. After the machine comes back up, you can use 'rejoin-stack.sh' to bring it all back up, including any instances you have created. The instances will need to be manually started up again, though.

 

Have fun, and let me know if you have any questions.

Outcomes