Sunday, February 12, 2017

Setting up Openstack on Ubuntu

I have been using Openstack for the past a couple of years, starting from Ice House, Juno, till Liberty and Mitaka. I have enough rights in the Horizon dashboard but somehow, i want to try the installation of Openstack myself onto my own VM.

Here as a reference I am taking some notes of what went into the effort.


1. Download Ubuntu 14.04 from:
    http://old-releases.ubuntu.com/releases/14.04.0/ubuntu-14.04-desktop-amd64.iso
    My VM's host machine is Windows 10, even though it is an Intel Inside, it is OK to use Ubuntu's AMD64 iso.
2. Setting up Ubuntu is pretty straight forward except, unlike Centos, Ubuntu is using Debian flavor of the package management tools: apt-get (while Centos uses rpm and yum). Assure the network setting in Virtualbox uses Bridged Adaptor and has Promiscuous Mode enabled, as below:

3. As usual, always perform update to the OS image that we just loaded.
    >sudo apt-get update
    >sudo apt-get upgrade
    (if there is any connectivity issue related to the network, do following:
    >sudo ifconfig eth0 down
    >sudo ifconfig eth0 up  )
    (if above also failed, add following to /etc/network/interface
  #The loopback network interface
   auto lo
   iface lo inet loopback
  #The primary network interface
   auto eth0
   iface eth0 inet static
   address 192.168.1.2   #<--use ifconfig to determine this
   netmask 255.255.255.0
   gateway 192.168.1.1
   dns-nameservers 192.168.1.1 8.8.8,8  #<-8.8.8.8 is google's DNS server)
4. Create new user stack, which is going to own openstack
   >sudo adduser stack
   >sudo passwd root
5. Change to be root user:  >su -
6. Grant the stack user with sudo privilege:
  >echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
7. change to user stack:
   >su - stack
8. Install git:
   >sudo apt-get install git
9. Get devstack from git hub
  >git clone https://git.openstack.org/openstack-dev/devstack

10. Change to devstack diretory: >cd devstack
11. Edit local.conf file to specify passwords used in the devstack installation with following contents: >vi local.conf
   [[local|localrc]]
   ADMIN_PASSWORD=openstack
   DATABASE_PASSWORD=openstack
   RABBIT_PASSWORD=openstack
   SERVICE_PASSWORD=openstack
12. Start the installation: ./stack.sh
13. After fair long time of installation below is the final results and my devstack installation:
    http://192.168.1.2/dashboard
    http://192.168.1.2/identity
    default users: admin and demo
    password: openstack


14. Plug in dashboard url and log in and start exploring...

No comments:

Post a Comment