How to create a private cloud on OpenStack using DevStack

posted in: Uncategorized | 0

OpenStack is an emerging technology that allows anyone to create a private cloud, a cloud is deployed on your own hardware. A cloud is a scalable number of computing units, disk units, and network, which can be dialed up or down as needed. Clouds can be organized into public and private clouds; Amazon’s AWS is the first public cloud. Amazon’s public cloud includes EC2 computing units, EBS (elastic block storage) disk units, and its own network. The advantage of using a cloud infrastructure is its scalability to add computing, disk, and networks as load increases, thus making high availability and scalable server products.

The easiest way to test an OpenStack private cloud is from DevStack. DevStack provides a prepackaged OpenStack solution that runs on your local computer. To test out the DevStack solution, I strongly recommend running DevStack inside a virtual machine. A virtual machine runs a “virtual” computer inside your actual computer. Read more about this technology from one of the vendors: VMWare, VirtualBox, or virtual machine manager.


Setting up a virtual machine for testing

1. Download and install one of VMWareVirtualBox, or virtual machine manager.

2. Create a virtual machine and install Ubuntu 12.04 desktop edition (assuming you have a 64-bit machine).

3. Configure your virtual machine with a decent amount of RAM and disk space, perhaps 4 GB RAM and 20 GB disk.


Required steps to run on an Ubuntu 12.04 desktop computer

1. Go to and follow the three instructions for installing OpenStack.

2. Once installed, the dashboard URL will be shown in the console. Open that link in a web browser. The remaining steps will be performed in your web browser.

3. You should see an OpenStack dashboard screen. The default user name: admin, password: password

4. Once logged in, select the Project tab on the left side.

5. Click on Images & Snapshots.

6. To the upper right corner is Create Image.

7. Type in a descriptive name for Ubuntu 12.04 server, for example, “My Cloud Server.” (Note: my choice of Ubuntu 12.04 server could be any other compatible cloud image that conforms to QCOW2 and supports cloudinit).

8. For the Image URL we will install a QCOW2 disk image from Ubuntu’s website. Copy and paste the following URL:

9. Choose the QCOW2 format, 2 GB minimum disk, 512 MB RAM, and select public. (These minimums might be too small, I haven’t tested this).

10. Once the image is ready, click on the Launch button.

11. A window shows up. Choose the newly created Ubuntu 12.04 server “My Cloud Server“.

12. Choose a descriptive Instance name such as “First Cloud Instance.”

13. Choose a m1.small instance or larger. (Ubuntu 12.04 server will fail if a smaller instance is chosen.)

14. Open the Access & Security tab and select a password for this new server, for example, password

15. For advanced users: You can create and upload your computer’s own public/private key (in the virtual machine) for ssh access.

16. Go ahead and create the image.

17. From the left side pane, click on Instances.

18. You should see a private IP address, which is accessible inside your virtual machine.

19. Click on Console and you’ll see a terminal prompt. Type in username: ubuntu and the password you previously created. (Advanced users, read

20. You have now logged into a server within a private cloud. Congratulations!

21. To leave the login session, type in exit

Many commands are available for the Linux operating system but is beyond the scope of this tutorial.


SSH access from your Ubuntu 12.04 desktop computer

1. Leave the web browser and open another terminal inside your Ubuntu 12.04 desktop computer (which is running inside the virtual machine).

2. Recall the private IP address from step 18. You can remotely access your cloud server by typing in: ssh ubuntu@private.ip.address where private.ip.address is something like

3. Type in your password that you previously created. You have now accessed your server.


Final thoughts

This post gives you a brief introduction to a private cloud using OpenStack. For those familiar with Amazon AWS, you’ll immediately notice some similarities. For any production grade or practical application, you should not be building anything on DevStack. Third party cloud providers will offer packaged working solutions of OpenStack implementations.