Devstack is the developer installation of the cloud offering by Redhat called OpenStack. If you are interested in learning OpenStack, it is highly recommended you install devstack and try out various modules that constitute the OpenStack environment. To take full advantage of a cloud installation, it really has to be installed on multiple machines on a network. However if you simply wish to develop for OpenStack or take it for a test drive then the quickest way to install it is on a single virtual machine. This kind of installation is known as all in one installation.
This tutorial will show you the quickest way to install devstack using VirtualBox and Ubuntu Minimal installation. This installation has been tried on a Macbook Pro as well as a Windows Desktop so the underlying OS in not important. Also once devstack is installed, it can be accessed without the host machine being connected to the network. This tutorial will also show you a few tricks to connect to the installation from the host OS and will give you a few pro tips to watch out for. So let’s get cracking.
- Let’s build us a VM. Start VirtualBox and click on New. Type the name as mydevstack. Select the type as Linux and version as Ubuntu(64). Click Next. Give the VM at least 4 GB of RAM for good performance. It should work with 2 GB but performance will not be that good. Click Next. Select “Do Not Add a Virtual Hard Drive.” By default it adds a 8 GB hard drive. In the next step we will add a 50 GB hard drive so our virtual empire has more space to launch lots of VMs. Click Create. VirtualBox will warn you that a hard disk is not attached and you will not be able to install a OS on it. Click OK.
- Do extra configuration on the VM. Right click mydevstack and click settings. Click on processors and give it at least half of your processors. This will again give good performance to your system.If your underlying Operating supports hardware acceleration, you may choose to enable it by clicking Enable PAE/NX and the options under acceleration Tab, however later if you get errors or warnings while booting or booting takes too long, come back here and disable it.Now click on storage and besides Controller: SATA, click on the little + symbol on the hard drive to add a new hard drive. Choose “Create New Disk”. Let’s call the disk devstackdisk and make it 50 GB. You can choose a different size or type of disk that is big enough for all your experimentation. Finally we will map some ports. Click on Network/Advanced and then Port Forwarding. Map the local port 2220 to guest port 22. That way if you ssh to localhost 2220 you will login directly to the guest VM. Map the local port 8888 to guest port 80. That way if you point your browser to http://localhost:8888 it will connect to the web server on the guest VM on port 80. Finally map the local port 6080 to the guest port 6080. This allows you to connect to the guest consoles. More on that in a bit. click OK
- Now time to install Ubuntu. Go Here and download the Ubuntu Minimal ISO of your choice. Go back to storage and mount ISO that you just downloaded as a CD. Click OK and boot the VM by clicking on start. Start the installation by selecting Install. From here there is little point in posting screenshots since we will be selecting defaults till the installation completes. We will also keep the installation to the minimum since devstack installs its own dependencies. If you have any questions or run into problems, please post into the comments below. Click next. Select Language, Country, Keyboard, enter a hostname (I cleverly selected devstack), select the nearest mirror to you, select proxy, get a coffee, and then select the name of a new user. Since this will be our own private and hopefully secure install, go ahead and select username as stack and password and stack (DON’T YOU DARE DO THAT IN PRODUCTION!). Just go on clicking Yes and Ok (or no as need may be) till you come to disk partitions. Select Guided – Use Entire Disk. Write the changes to the disk and let the installation progress. Ubuntu will install the Linux base system. Select No Automatic Updates. When it asks you to select software to install, DO NOT select anything. Just hit tab and select continue. When it asks you to install GRUB on Master Boot Record, select Yes. The installation of Linux should be complete at this point. Before you select Continue and Reboot the box, go back to storage and remove the CD from the VM’s drive. If you don’t do this, the Linux installation will start again. Click Here to go to Part 2