Cloud is a big trend in recent years and it will be bigger and bigger. Even though you want to join in this trend, it’s hard as it requires lots of machines to build and test it.
Fortunately, these days virtualisation technique allows us to install virtual guest on top of another virtual quest. So, to test openstack technology, you don’t need to purchase additional equipments. Just need a VMware or VirtualBox.
Here, I’ll show you the steps I took to build a OpenStack environment. In this case, I’m going to use Ubuntu (12.10).
You should turn on virtualisation feature in ‘Settings’ -> ‘Processor & Memory’ -> ‘Advanced options’. Just tick both options.
Add two more NICs which is using ‘Private to my Mac’ option. So, in total, there will be 3 NICs and the first one will use NAT.
After installation and update it fully, change the network details. Create a user openstack and log in as it (not necessary though).
$ sudo vi /etc/network/interface # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp # Public Interface auto eth1 iface eth1 inet static address 192.168.1.110 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 auto eth2 iface eth2 inet manual up ifconfig eth2 up
After made above changes, please start both interfaces.
$ sudo ifup eth1 $ sudo ifup eth2
Now, you need to install ‘git’ and download ‘devstack’ git.
$ sudo apt-get install git $ git clone git://github.com/openstack-dev/devstack.git $ cd devstack
Make the following ‘localrc’ file under devstack as it will reduce the typing.
$ vi localrc HOST_IP=192.168.1.110 ADMIN_PASSWORD=openstack MYSQL_PASSWORD=openstack RABBIT_PASSWORD=openstack SERVICE_PASSWORD=openstack SERVICE_TOKEN=openstack MYSQL_PASSWORD=password disable_service n-net enable_service q-svc enable_service q-agt enable_service q-dhcp enable_service q-l3 enable_service quantum enable_service g-api enable_service rabbit LOG=True SCHEDULER=nova.scheduler.simple.SimpleScheduler MULTI_HOST=True FIXED_RANGE=10.0.0.0/8 FLOATING_RANGE=192.168.1.128/25 NETWORK_GATEWAY=10.0.0.2 EXT_GW_IP=192.168.1.1 OVS_BRIDGE_MAPPINGS=br-eth2
By running ‘./stack.sh’, it will download necessary packages and build the system.
It will give you the URL that you can open to start OpenStack with ID and password.
Below is the screenshot that is accessed the virtual instance.