As discussed, devstack enables a software developer to run a standalone minimal OpenStack cloud on a virtual machine (VM). In this tutorial we are going to step through the installation of an Ubuntu VM using VirtualBox manually. This is a pre-requisite to installing devstack.
Pre-requisites
- You will need a computer running a 64 bit operating system on Mac OSX, Windows, Linux or Solaris with at least 4GB of RAM and 10GB of available disk drive space.
- You will need to have a working VirtualBox on your computer. See Setting up VirtualBox to run virtual machines as a pre-requisite for these steps.
- You will need an Ubuntu server .iso image. Download the Ubuntu Server 14.04 (Trusty) server image (e.g. ubuntu-14.04.X-server-amd64.iso) to your computer. This will be the base operating system of your virtual machine that will run devstack.
If using Mac OS X or Linux you can obtain a recent .iso release with the command:
$ wget http://releases.ubuntu.com/14.04/ubuntu-14.04.4-server-amd64.iso
Create an Ubuntu Virtual Machine
To create a virtual machine in VirtualBox select the New icon. This will prompt you for some initial configuration. Use these recommendations:
- Name and operating System
- Name: devstack
- Type: Linux
- Version: Ubuntu (64-bit)
- Memory Size
- If you have 8+GB use 4GB.
- If you have only 4GB use 2.5GB. (Note. Testing during the creation of this guide found that 2048M was insufficient, and that a minimum of 2560M was needed)
- Hard Disk
- Use the default settings including 8.0GB, VDI type, dynamically allocated, File location and size.
By default your virtual machine is ready to install however by making the following network recommendation it will be easier to access your running virtual machine and devstack from your host computer.
- Click Settings
- Select Network
- Enable Adapter 2 and attach to a Host-only Adapter and select vboxnet0
- Ok
You are now ready to install the Operating System on the virtual machine with the following instructions.
- Click Start
- Open the Ubuntu .iso file you just downloaded.
- You will be prompted for a number of options, select the default provided and use the following values when prompted.
- Install Ubuntu Server
- English (or your choice)
- United States (or your location)
- No for configure the keyboard
- English (US) for keyboard (or your preference)
- English (US) for keyboard layout (or your preference)
- Select eth0 as your primary network interface
- Select default ubuntu for hostname
- Enter stack for full username/username
- Enter Openstack for password (or your own preference)
- Select No to encrypt home directory
- Select Yes for time zone selected
- Select Guided – use entire disk for partition method
- Select highlighted partition
- Select Yes to partition disks
- Select Continue for package manager proxy
- Select No automatic updates
- Select OpenSSH Server in software to install
- Select Yes to install GRUB boot loader
- Select Continue when installation complete
The new virtual machine will now restart and you will be able to login with the username and password specified (i.e. stack and Openstack).
Post Installation
After successfully logging in run the following commands to complete the Ubuntu installation setup needed as pre-requisites to install devstack.
$ sudo su - # Enter your stack user password $ umask 266 & echo "stack ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/stack $ apt-get update && apt-get upgrade -y $ echo "auto eth1 iface eth1 inet dhcp" >> /etc/network/interfaces $ ifup eth1
You are now ready to download and install devstack.
You can also setup an Ubuntu virtual machine via vagrant which simplifies these instructions.
More information
This blog is a series for the software developer with no experience in OpenStack to experience just the tip of functionality and features to become more interested in the project.
[…] discussed in Setting up an Ubuntu virtual machine using VirtualBox there are several other alternatives to defining an Ubuntu virtual machine. One of these […]