Sunday, March 20, 2016

OpenStack - How to Install Mirantis Fuel 6.1 (Juno) with OpenContrail on Ubuntu OS (Standalone KVM Machine) - Part I


One of my customers asked me a question the other day on how to install Juniper Contrail (SDN) with Mirantis Fuel (Kilo release) on a machine with Ubuntu OS.  Interestingly, another colleague of mine asked about the same, a few days later.  That got me looking at some of the open source software that can be used to achieve similar outcome.  I decided to give it a shot after reading several related articles and watching some YouTube videos, e.g. https://www.youtube.com/watch?v=QQAUE4AY4x4 

One of the things that I noticed is that we will need to have additional packages to install Juniper Contrail.  I wasn't sure if that requires subscription as we will need to download these packages from Juniper website.  Hence I went ahead with OpenContrail instead as that is suppose to provide the same functionalities (based on my understanding).  I went to Mirantis website, i.e. https://www.mirantis.com/products/openstack-drivers-and-plugins/fuel-plugins/ and found that the current contrail 2.1 plugin is compatible with Mirantis Fuel 6.1 (Juno).  I did not manage to find relevant information on its compatibility with the Kilo release of Mirantis Fuel and hence decided to perform my installation with Mirantis Fuel 6.1 (Juno) instead.  Most of the steps that I followed came from Mirantis websites and I am able to successfully install the cloud cluster with those steps (minus the MX router connectivity since I do not have one).  

Some background information before starting the activity.  I have installed Ubuntu 14.04 Desktop on my new Lenovo P50 workstation (I formated the SSD hard disk that comes with Windows 10 and installed Ubuntu on it).  It is a really powerful laptop (at least for now) with Intel Xeon processor and 64GB DDR4 RAM.  I got this machine a month back and have been very impressed with its performance =)

root@ubuntu:~# uname -a
Linux ubuntu 4.2.0-30-generic #36~14.04.1-Ubuntu SMP Fri Feb 26 18:49:23 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux



I am going to break this post into 2 parts due to the large number of steps involved.  The first part will talk about how to set up the base environment.  The second part of the blog will go into the actual installation of the OpenStack (Juno) Cluster with OpenContrail.

You will need to enable virtualization on your machine for this exercise (I am going to assume that readers who are interested in this article will have the relevant expertise to do that).  I am going to use virt-manager and Linux bridges for this activity.  I believe that the below packages will be sufficient for our purpose.

root@ubuntu:~# sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager


Steps

1) Start virt-manager from terminal console

# sudo virt-manager



2) Click Edit -> Connection Details and click on the "Virtual Networks" tab


3) We will create 5 new virtual networks, i.e. PXE_Admin, Management, Storage, Private and Public on our laptop. Start by clicking on the green color "+" button at lower left-hand corner to create the first virtual network.

 
4) Assign the name "PXE_Admin" to that network



5) Assign an IP Subnet of your choice to that network (my example will be based on PXE Network with the 10.109.0.0/24 subnet)




6) Disable DHCP on this network


7) Create the network as an isolated virtual network



8) Check the settings and click "Finish" to create the PXE_Admin network



9) Perform the same steps above to create the Management, Private and Storage network.  I have assigned subnet 10.109.2.0/24 to the Management Network, 10.109.3.0/24 to the Private Network and 10.109.4.0/24 to the Storage Network.

10) The last network, i.e Public network will be created with subnet 10.109.1.0/24, with the main difference being it using NAT for Internet connectivity.



11) You should see the 5 newly created virtual networks after that


12) Next, we will need to download the Mirantis Fuel 6.1 ISO (Juno 2014.2.2) from their website (https://software.mirantis.com/releases/) and save the ISO to the default directory, i.e. /var/lib/libvirt/images/

13) Close the current window and go back to the main window of the virt-manager and click on the button at the top left-hand corner to create a new virtual machine



14) We will start by creating the Fuel VM. Select install from "Local install media" and choose the Fuel 6.1 ISO that was downloaded earlier. I gave it 4 vCPU, 4GB of RAM and 60GB of Hard Disk.  You can always give it more processing power and storage space if you want to.



15) We want to customize the configuration. Hence we will need to select the check-box for "Customize configuration before install" at Step 5 before clicking the "Finish" button.


16) Ensure that the first vNIC is using the "PXE_Admin" network


17) Click on the "Add Hardware" button to create a second vNIC.  Assign the Host device to the "Public" Network for Internet connectivity.


18) Click "Finish" and we should see 2 vNICs assigned to the Fuel VM



19) Click "Begin Installation" to start provisioning the Fuel VM.  We will see the following screen after that.



20) Hit the "Tab" button as we want to change the default configurations.  Press "Enter" after that to continue with the installation.



21) After the CentOS OS is installed, we will see the screen to set up the Network interfaces.  You should see eth0 and eth1 as we have 2 vNICs set up for Fuel.  Proceed to set up the IP address and network information of eth0 and eth1. The IP for eth0 in this example will be 10.109.0.11 (Netmask will be 255.255.255.0, Do not set Gateway for eth0). The IP information for eth1 will be as below.



22) Set up the PXE range


23) Set up DNS and Hostname


24) Leave the rest as default and proceed to save and exit.  Installation will commence after that.  Note that it will take a while to complete the installation.



25) Upon completion of the installation, we will get to the login prompt of Fuel (the default login credentials will be root / r00tme).  We can test Internet connectivity by pinging Google DNS, i.e. 8.8.8.8



26) The Fuel GUI (in my case) will be at 10.109.0.11 in my case.  Check that you are able to load the Web UI and able to log in with the default login credentials, i.e. admin / admin




27) We are done with Fuel installation at this point in time and will proceed to create the other VMs that are needed for our cluster.  I am creating 3 controllers, 3 contrail nodes and 1 compute node for my HA Cluster.  The steps to create the 7 nodes are the same.  Hence I will only show you how to create the first node (you can adjust the resource allocation to each of the nodes based on your needs).  The main idea is to use Fuel to PXE boot the rest of the VMs. 

I have used the following specifications for my VMs (you can use your own specifications but note that there is a minimum storage requirements for the Contrail Node - refer to Part II of this post for more information)


Controller Node - 4 vCPU, 8GB RAM and 100 GB of Storage Space
Contrail Node   - 4 vCPU, 4GB RAM and 300 GB of Storage Space
Compute Node    - 8 vCPU, 16 GB RAM and 200 GB of Storage Space
 

 

28) We will create 5 vNICs on each of the VMs.  The vNICs will be mapped to different source device.  Note that the ordering and mapping is important.  Eth0 will be mapped to PXE_Admin Network, Eth1 will be mapped to Public Network, Eth2 will be mapped to Management Network, Eth3 will be mapped to Private Network and Eth4 will be mapped to Storage Network.  We will have 5 vNICs after that.  Click the "Begin Installation" button and the VM will get PXE booted by Fuel.  We will do this for all the 7 VMs in the cluster.
 
 
29) All the 7 VMs should get bootstrapped after that



This concludes the first part of the installation as we finish setting up the environment needed to install Juno OpenStack cluster and OpenContrail.  I will continue with the rest of the installation in the second part of this post.   



1 comment:

Unknown said...

Hi, thanks for this details blog.
During installation, in Fuelmenu, I am getting an error that Check failed to build bootstrap image, in Bootstrap section also am getting this. Due to this I could not proceed further. Could you please tell me how to overcome this.