Build Nested Openstack Using Ubuntu As Baseos on Baremetal Overview

Build Nested Openstack Using Ubuntu As Baseos on Baremetal Overview

Build Nested Openstack Using Ubuntu as BaseOS on BareMetal Overview • The following slides outline how to setup your BareMetal HOST (a server) in order to run a Openstack installation using FUEL based Deployer. The overall tasks can be broken down into the following sections: • Host OS installation and preparation • Virtual Machine creation for Openstack Nodes (Compute/Controller and FUEL) • Addition of vRouter (in order to isolate a useable “PUBLIC” network) • Setup of VNC to Nested Host (in order to use UI’s and convienence) • Booting/Configuration of FUEL VM (used to install Openstack to Compute/Controller) • Creation of an Environment and deployment of Openstack (job done) Conceptual Diagram • Below you can see what the internal Layout of a Nested installation can look like. In this example, we will use 1 bridge for each of the Openstack Networks (5 in total – ADMIN/PXE, PUBLIC, PRIVATE,STORAGE and MANAGEMENT) • LMCDASM – ADD PICTURE HERE Host OS and preparation • You should perform the following tasks in this section. • 1st – Install Ubuntu to your Host and ensure it has connectivity to the internet • Note: For the example used here – we use Ubuntu 14.04.03 LTS – however ,the specific base OS is up to the user (note: Centos/RedHat command will be different to reflect systemd usage and are not reflected herein) • Note: Depending on the size of your host (Disk/CPU/RAM) some of the values you see in the following screen shots may need to be modified to accommodate your system. Specifications used in this example (this is a small setup for example – you should not use this in production at all) HOST HAS: 12 Cpus (Cores) 16GB RAM 250GB disk 1 Physical NIC – connected to the internet ISO for booting HOST: ubuntu-14.04.3-server-amd64.iso Note: in this example the HOST is assigned an IP via DHCP – this might not be the case in your setup, but it is assumed you know how to setup an IP address – if not, then this procedure is going to be a real challenge for you. Host Install • When you boot your HOST with Ubuntu you should see the “startup page”. In general, we select all the defaults, but below you find the answers to each of the questions. 1st- Lang – English (or whatever you like) 2nd – Install Ubuntu Server (hit enter) 3rd – English 4th – US 5th – No (don’t detect Keyboard – unless you need it) 6th – English 7th – English 8th – Pick a hostname (ex NestedOstack) 9th – Full Name (eg user) 10th – Username (eg. user) 11th – Password (eg system) 12th – Re-enter Password (eg system) note: Answer yes to use password if not complex enough 13th – Answer no to encrypt home dir 14th – Answer “yes” if Timezone is correct 15th – Answer – “Guided – use entire disk and setup LVM” 16th – Select the Disk to install to. (Hit enter if there is only one) 17th – Answer “save Changes and configured LVM” 18th – Hit enter to use the total amount of disk (change if appropriate) 19th – Move to “YES” and hit enter to write all final changes to the disk 20th – Enter Proxy info (if needed). 21st – No to Automatic Updates 22nd – For Software to install – Select SSH only (note: We will add the Virtual Machine packages after the installation along with other tools) 22nd – Yes to Grub loaded and reboot the node. Ubuntu should install now – wait until it is completed and you have a login prompt and then continue with the HOST-POST-INSTALL steps (next page) Host Post-Install • Login to the node following the installation and perform the following steps. • 1st – sudo apt-get update && sudo apt-get upgrade • 2nd – sudo apt-get install kvm virt-manager bridge-utils vlan tightvncserver xfce4 xfce4-goodies firefox (note: you can use whatever desktop you like if you don’t like xfce4) • 3rd – Reboot the node (probably don’t “have to”, but a good idea at this point since initramfs was updated in the previous step) • 4th – run “kvm-ok” and ensure you see a positive output – if not – STOP and get HELP) Create Bridges • As outlined, we will create fives bridges on this HOST, they will represent “switches” that will hold each of the OPENSTACK networks required (ADMIN/PXE, MGMT, STOR, PUBLIC and PRIVATE). As well, we will create an “EXT_BR” that will be encapsulate our real network card (so we will be able to route in/out of the Openstack Later on). In this example, we will use 5 “FLAT” networks – no tags - although they can be used just as easily. • Note: sudo is implied below (or do “sudo –I” and execute as root) • Commands (to be done on console – or you will lose connection): • Ifconfig virbr0 down • brctl delbr virbr0 • brctl addbr ext_br • brctl addbr admin • brctl addbr public • brctl addbr private • brctl addbr storage • brctl addbr mgmt Bring up the bridges Command: ifconfig mgmt 192.168.10.253/24 up ifconfig public 172.16.0.253/24 up ifconfig private up <= Left without IP intentionally ifconfig storage192.168.20.253/24 up ifconfig admin 10.20.0.253/24 upup Encapsulate external NIC to EXT_BR and assign IP to the BRIDGE. 1st – get your current IP address (assuming you have eth0 as your external NIC) Command: ifconfig –a eth0 2nd – put your eth0 NIC to a null address (leave it up though) and add it to ext_br and set the IP on the bridge Command: ifconfig eth0 0.0.0.0 brctl addif ext_br eth0 ifconfig ext_br <ip from eth0 original) eg. 192.168.1.115 3rd – Test that you can ping your GW still (eg, my GW is 192.168.1.1) IF this doesn’t work – STOP and get HELP, cause nothing else will work going forward. Make Network Setting Permanent • Login to your node (you can now use SSH through the ext_br you setup in the previous step) and modify /etc/network/interfaces as shown below • user@NestedOstack:/etc/network$ cat interfaces • # 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 • auto ext_br • iface ext_br inet static address 192.168.1.115 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 8.8.8.8 bridge_ports eth0 Reboot the node and make sure you can get back in without issue. Setup VNC server and xfce4 • For the VM creation part, I like to use virt-manager (a GUI based tool), you can use the virsh CLI if you like, but the GUI allows to see the CONSOLE of the VMs and edit SPICE and other params on the fly. The following section outlines how to configure tightvncserver and xfce4 for use. • Step 1 – Login to your HOST and start VNCSERVER and set password (this is the password you will use to connect from your VNC client) – DO NOT RUN AS ROOT. • Command: “vncserver: • You will be prompted for a password (you can decide if you want a read-only one as well) • You should see the server started on :1 Setup VNC server and xfce4 /2 • Now kill the running vncserver Command: “vncserver –kill :1” • Modify your users /home/<user>/.vnc/xstartup file to look like this (remove everything else) #!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 & [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic & • Restart your VNC server (note: :1 is port 5901 for connecting with your client) Command: “vncserver” • Sample Output: • user@NestedOstack:~$ vncserver • New 'X' desktop is NestedOstack:1 • Starting applications specified in /home/user/.vnc/xstartup • Log file is /home/user/.vnc/NestedOstack:1.log • user@NestedOstack:~$ Connect with VNC client • I use UltraVNC as a client, but you can use whatever you like. (you can pull X display across if you have good bandwidth) • Open your VNC Client and connect to your Host, screen shot examples below: Connect with VNC Client /2 • Observe a desktop on your HOST is displayed. Select “default Config” Create Your VMs • In this example, we will create a total of 4 VMs. • 1 VM for a vROUTER – this is used to isolate our Openstack networks and provide routing and access for FUEL to the Openstack repos • 1VM for a FUEL server – this is the node that will boot and install the Controller and Compute • 1VM for Controller • 1VM for Compute • Note: You can create as many VM’s as your HARDWARE allows, just repeat the Section for COMPUTE/CONTROLER (note: Max 3 Controllers for HA, Min 1) Create VM - vRouter /1 • With our VNC open, open a terminal and start “virt-manager”, see screen shot below: Create VM – vRouter /2 • For the vRouter, I use Vyatta (you can get the image at http://dasmlab.org/vyatta-livecd_VSE6.7R6_amd64.iso), or you can use VyOs, or Quagga, or whatever you like. • Push the image to your host (SFTP/HTTP/etc) so it is accessible there. • In the virt-manager GUI – create your VM • Details: 1 CPU, 2GB RAM, 5GB HD, 3 NICs (on ext_br, admin, public) The following SCREEN SHOT outline each STEP Create VM – vRouter /3 • Click “Create New Virtual Machine” Create VM – vRouter /4 • Give your VM a name as shown and select “Local media install”: Create VM – vRouter /5 • Point to the ISO location and set the OS_TYPE and Version (pick any for version – doesn’t matter) click “Forward”. Set RAM/CPU as shown and click “Forward”. Set disk to 5GB and click Forward Create VM – vRouter /6 • On the next page, “CHECK” the customized box, and ensure that the “Advanced Options” is outlined as shown below (must be on ext_br) and click Finish.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    62 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us