OpenStack Ubuntu 14 Installation

Cloud Stack install

Here we are going to install apache cloudstack on one machine. The machine is an old ASUS desktop PC with an AMD processor. It have 4GB of memory and a 2tb harddrive. We are using a Ubuntu 14.04 clean install.

Update and upgrade 14.04 first.

$ sudo apt update
$ sudo apt upgrade

Edit host file to include your IP and server name:

$ sudo nano /etc/hosts       localhost stack

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Set the root account password:

$ sudo passwd root

Go into root account:

$ su

Install NTP server:

$ apt-get install openntpd

Set the ssh config to allow root login can’t permitRootLogin to yes:

$ nano /etc/ssh/sshd_config
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

Restart ssh after change:

$ service ssh restart

Install bridge utilities or network won’t work:

$ apt-get install bridge-utils

Edit your /etc/network/interfaces file to look something like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual

# Public network
auto cloudbr0
iface cloudbr0 inet static
    bridge_ports eth0
    bridge_fd 5
    bridge_stp off
    bridge_maxwait 1

# Private network
auto cloudbr1
iface cloudbr1 inet manual
    bridge_ports none
    bridge_fd 5
    bridge_stp off
    bridge_maxwait 1

Now reboot:

$ sudo reboot now

Create a custom apt repository file:

$ nano /etc/apt/sources.list.d/cloudstack.list

Looks like this:

$ deb trusty 4.4

Load the cloudstack repository keys:

$ wget -O -|apt-key add -

Update with new repository:

$ sudo apt update

Install cloudstack:

$ apt-get --yes install cloudstack-management

Install mysql, set password to something you remember:

$ apt-get --yes install mysql-server

Edit cloudstack msql config to look something like this:

$ nano /etc/mysql/conf.d/cloudstack.cnf
binlog-format = 'ROW'

Restart mysql:

$ service mysql restart

Run this command to setup the database for cloud stack, use your own passwords and keys:

$ cloudstack-setup-databases cloud:jensen@localhost --deploy-as=root:password -e file -m mymskey44 -k mydbkey00

Make directory’s for NFS mounts:

$ mkdir -p /export/primary /export/secondary

Install NFS server:

$ apt-get install nfs-kernel-server

Edit the exports file, should look like this:

$ nano /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
/export  *(rw,async,no_root_squash,no_subtree_check)

Activate exports added to file:

$ exportfs -a

Restart NFS:

$ service nfs-kernel-server restart

Check your exports:

$ showmount -e

Output looks like this:

Export list for
/export *

Make temp mount directory’s:

$ mkdir -p /mnt/primary /mnt/secondary

Edit fstab, it should look like this:

$ nano /etc/fstab
# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/stack--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdf1 during installation
UUID=9919bf2b-2ec2-49f1-b4e0-8926929d8251 /boot           ext2    defaults        0       2
/dev/mapper/stack--vg-swap_1 none            swap    sw              0       0   /mnt/primary    nfs rsize=8192,wsize=8192,timeo=14,intr,vers=3,noauto  0   2 /mnt/secondary  nfs rsize=8192,wsize=8192,timeo=14,intr,vers=3,noauto  0   2

Temporally mount the mnt directories.

$ mount /mnt/primary
$ mount /mnt/secondary

Install cloud agent:

$ apt-get install cloudstack-agent

Edit the qwmu.conf:

$ nano /etc/libvirt/qemu.conf

Take the comment off of this line:

vnc_listen = ""

Restart libvirt:

$ service libvirt-bin restart

Use this command to make sure KVM is working and your hardware supports VT for virtual machines:

$ kvm-ok

INFO: /dev/kvm exists
KVM acceleration can be used

Check NFS:

$ rpcinfo -u mount

program 100005 version 1 ready and waiting
program 100005 version 2 ready and waiting
program 100005 version 3 ready and waiting

Check exports with IP:

$ showmount -e
Export list for
/export *

Download the templates to the secondary storage share:

$ /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt     -m /mnt/secondary -u -h kvm -F

Unmount the temp shares:

$ umount /mnt/primary
$ umount /mnt/secondary

Reboot now for good measure:

$ sudo reboot now

Make sure the NFS share are not mounted after reboot:

$ df -k

To access the GUI to continue do to use admin and password.

If you get a 404 error in the GUI, enter these commands and wait about 5 minutes for the GUI to come back.


$ service cloudstack-management stop
$ service tomcat6 stop
$ service cloudstack-agent stop
$ ps -efl | grep java

Then start:

$ service cloudstack-management start
$ service cloudstack-management status
$ service cloudstack-agent start
$ service cloudstack-agent status

Check these logs for errors if you run into issues:

$ cat /var/log/cloudstack/management/management-server.log
$ cat /var/log/cloudstack/agent/agent.log

Cloudstack docs, SSVM page.