diff options
Diffstat (limited to 'foreman')
-rwxr-xr-x | foreman/ci/deploy.sh | 177 | ||||
-rw-r--r-- | foreman/docs/src/installation-instructions.rst | 225 |
2 files changed, 283 insertions, 119 deletions
diff --git a/foreman/ci/deploy.sh b/foreman/ci/deploy.sh index ae585b0..3e20fe4 100755 --- a/foreman/ci/deploy.sh +++ b/foreman/ci/deploy.sh @@ -34,6 +34,7 @@ display_usage() { echo -e "\nUsage:\n$0 [arguments] \n" echo -e "\n -no_parse : No variable parsing into config. Flag. \n" echo -e "\n -base_config : Full path of settings file to parse. Optional. Will provide a new base settings file rather than the default. Example: -base_config /opt/myinventory.yml \n" + echo -e "\n -virtual : Node virtualization instead of baremetal. Flag. \n" } ##find ip of interface @@ -120,6 +121,25 @@ function increment_ip { echo $baseaddr.$lsv } +##translates yaml into variables +##params: filename, prefix (ex. "config_") +##usage: parse_yaml opnfv_ksgen_settings.yml "config_" +parse_yaml() { + local prefix=$2 + local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') + sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ + -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | + awk -F$fs '{ + indent = length($1)/2; + vname[indent] = $2; + for (i in vname) {if (i > indent) {delete vname[i]}} + if (length($3) > 0) { + vn=""; for (i=0; i<indent; i++) {vn=(vn)(vname[i])("_")} + printf("%s%s%s=\"%s\"\n", "'$prefix'",vn, $2, $3); + } + }' +} + ##END FUNCTIONS if [[ ( $1 == "--help") || $1 == "-h" ]]; then @@ -143,6 +163,10 @@ do no_parse="TRUE" shift 1 ;; + -virtual) + virtual="TRUE" + shift 1 + ;; *) display_usage exit 1 @@ -150,8 +174,6 @@ do esac done - - ##disable selinux /sbin/setenforce 0 @@ -470,12 +492,163 @@ echo "${blue}Parameters Complete. Settings have been set for Foreman. ${reset}" fi +if [ $virtual ]; then + echo "${blue} Virtual flag detected, setting Khaleesi playbook to be opnfv-vm.yml ${reset}" + sed -i 's/opnfv.yml/opnfv-vm.yml/' bootstrap.sh +fi + echo "${blue}Starting Vagrant! ${reset}" ##stand up vagrant if ! vagrant up; then printf '%s\n' 'deploy.sh: Unable to start vagrant' >&2 exit 1 +else + echo "${blue}Foreman VM is up! ${reset}" fi +if [ $virtual ]; then + +##Bring up VM nodes +echo "${blue}Setting VMs up... ${reset}" +nodes=`sed -nr '/nodes:/{:start /workaround/!{N;b start};//p}' opnfv_ksgen_settings.yml | sed -n '/^ [A-Za-z0-9]\+:$/p' | sed 's/\s*//g' | sed 's/://g'` +##due to ODL Helium bug of OVS connecting to ODL too early, we need controllers to install first +##this is fix kind of assumes more than I would like to, but for now it should be OK as we always have +##3 static controllers +compute_nodes=`echo $nodes | tr " " "\n" | grep -v controller | tr "\n" " "` +controller_nodes=`echo $nodes | tr " " "\n" | grep controller | tr "\n" " "` +nodes=${controller_nodes}${compute_nodes} + +for node in ${nodes}; do + cd /tmp + + ##remove VM nodes incase it wasn't cleaned up + rm -rf /tmp/$node + + ##clone bgs vagrant + ##will change this to be opnfv repo when commit is done + if ! git clone https://github.com/trozet/bgs_vagrant.git $node; then + printf '%s\n' 'deploy.sh: Unable to clone vagrant repo' >&2 + exit 1 + fi + + cd $node + + if [ $base_config ]; then + if ! cp -f $base_config opnfv_ksgen_settings.yml; then + echo "{red}ERROR: Unable to copy $base_config to opnfv_ksgen_settings.yml${reset}" + exit 1 + fi + fi + + ##parse yaml into variables + eval $(parse_yaml opnfv_ksgen_settings.yml "config_") + ##find node type + node_type=config_nodes_${node}_type + node_type=$(eval echo \$$node_type) + + ##find number of interfaces with ip and substitute in VagrantFile + output=`ifconfig | grep -E "^[a-zA-Z0-9]+:"| grep -Ev "lo|tun|virbr|vboxnet" | awk '{print $1}' | sed 's/://'` + + if [ ! "$output" ]; then + printf '%s\n' 'deploy.sh: Unable to detect interfaces to bridge to' >&2 + exit 1 + fi + + + if_counter=0 + for interface in ${output}; do + if [ "$if_counter" -ge 4 ]; then + break + fi + interface_ip=$(find_ip $interface) + if [ ! "$interface_ip" ]; then + continue + fi + case "${if_counter}" in + 0) + mac_string=config_nodes_${node}_mac_address + mac_addr=$(eval echo \$$mac_string) + mac_addr=$(echo $mac_addr | sed 's/:\|-//g') + if [ $mac_addr == "" ]; then + echo "${red} Unable to find mac_address for $node! ${reset}" + exit 1 + fi + ;; + 1) + if [ "$node_type" == "controller" ]; then + mac_string=config_nodes_${node}_private_mac + mac_addr=$(eval echo \$$mac_string) + if [ $mac_addr == "" ]; then + echo "${red} Unable to find private_mac for $node! ${reset}" + exit 1 + fi + else + ##generate random mac + mac_addr=$(echo -n 00-60-2F; dd bs=1 count=3 if=/dev/random 2>/dev/null |hexdump -v -e '/1 "-%02X"') + fi + mac_addr=$(echo $mac_addr | sed 's/:\|-//g') + ;; + *) + mac_addr=$(echo -n 00-60-2F; dd bs=1 count=3 if=/dev/random 2>/dev/null |hexdump -v -e '/1 "-%02X"') + mac_addr=$(echo $mac_addr | sed 's/:\|-//g') + ;; + esac + sed -i 's/^.*eth_replace'"$if_counter"'.*$/ config.vm.network "public_network", bridge: '\'"$interface"\'', :mac => '\""$mac_addr"\"'/' Vagrantfile + ((if_counter++)) + done + + ##now remove interface config in Vagrantfile for 1 node + ##if 1, 3, or 4 interfaces set deployment type + ##if 2 interfaces remove 2nd interface and set deployment type + if [ "$if_counter" == 1 ]; then + deployment_type="single_network" + remove_vagrant_network eth_replace1 + remove_vagrant_network eth_replace2 + remove_vagrant_network eth_replace3 + elif [ "$if_counter" == 2 ]; then + deployment_type="single_network" + second_interface=`echo $output | awk '{print $2}'` + remove_vagrant_network $second_interface + remove_vagrant_network eth_replace2 + elif [ "$if_counter" == 3 ]; then + deployment_type="three_network" + remove_vagrant_network eth_replace3 + else + deployment_type="multi_network" + fi + + ##modify provisioning to do puppet install, config, and foreman check-in + ##substitute host_name and dns_server in the provisioning script + host_string=config_nodes_${node}_hostname + host_name=$(eval echo \$$host_string) + sed -i 's/^host_name=REPLACE/host_name='$host_name'/' vm_nodes_provision.sh + ##dns server should be the foreman server + sed -i 's/^dns_server=REPLACE/dns_server='${interface_ip_arr[0]}'/' vm_nodes_provision.sh + + ## remove bootstrap and NAT provisioning + sed -i '/nat_setup.sh/d' Vagrantfile + sed -i 's/bootstrap.sh/vm_nodes_provision.sh/' Vagrantfile + + ## modify default_gw to be node_default_gw + sed -i 's/^.*default_gw =.*$/ default_gw = '\""$node_default_gw"\"'/' Vagrantfile + + ## modify VM memory to be 4gig + sed -i 's/^.*vb.memory =.*$/ vb.memory = 4096/' Vagrantfile + + echo "${blue}Starting Vagrant Node $node! ${reset}" + + ##stand up vagrant + if ! vagrant up; then + echo "${red} Unable to start $node ${reset}" + exit 1 + else + echo "${blue} $node VM is up! ${reset}" + fi + +done + + echo "${blue} All VMs are UP! ${reset}" + +fi diff --git a/foreman/docs/src/installation-instructions.rst b/foreman/docs/src/installation-instructions.rst index 98b7687..8d22d4a 100644 --- a/foreman/docs/src/installation-instructions.rst +++ b/foreman/docs/src/installation-instructions.rst @@ -1,175 +1,160 @@ :Authors: Tim Rozet (trozet@redhat.com) :Version: 0.0.1 -============================================================== -OPNFV Installation instructions for - Foreman/QuickStack@OPNFV -============================================================== +==================================================== +OPNFV Installation Instructions - Foreman/QuickStack +==================================================== Abstract ======== -This document describes how to install Foreman/QuickStack@OPNFV, it's dependencies and required system resources. - -License -======= -All Foreman/QuickStack and "common" entities are protected by the Apache 2.0 License ( http://www.apache.org/licenses/ ) +This document describes how to deploy a Foreman/QuickStack-based OPNFV system. **Contents** -1 Version history +1 Introduction -2 Introduction +2 Preface -3 Preface +3 Setup Requirements -4 Setup Requirements +4 Installation High-Level Overview - Bare Metal Deployment -5 Installation High-Level Overview - Baremetal Deployment +5 Installation High-Level Overview - VM Deployment -6 Installation High-Level Overview - VM Deployment +6 Installation Guide - Bare Metal Deployment -7 Installation Guide - Baremetal Deployment +7 Installation Guide - VM Deployment -8 Installation Guide - VM Deployment - -9 Frequently Asked Questions - -10 References +8 Frequently Asked Questions -1 Version history -=================== +9 License -+--------------------+--------------------+--------------------+--------------------+ -| **Date** | **Ver.** | **Author** | **Comment** | -| | | | | -+--------------------+--------------------+--------------------+--------------------+ -| 2015-05-07 | 0.0.1 | Tim Rozet | First draft | -| | | | | -+--------------------+--------------------+--------------------+--------------------+ +10 References -2 Introduction +1 Introduction ================ This document describes the steps to install an OPNFV R1 (Arno) reference platform, as defined by the Bootstrap/Getting-Started (BGS) Project using the Foreman/QuickStack installer. -The audience of this document is assumed to have good knowledge in network and Unix/Linux administration. +The audience is assumed to have a good background in networking and Linux administration. -3 Preface +2 Preface =========== -Foreman/QuickStack uses the Foreman opensource project as a server managment tool, which in turn manages and executes Genesis/QuickStack. Genesis/QuickStack consists of layers of puppet modules which are capable of provisioning out the OPNFV Target System (3 Controllers, n number of Compute nodes). +Foreman/QuickStack uses the Foreman Open Source project as a server management tool, which in turn manages and executes Genesis/QuickStack. Genesis/QuickStack consists of layers of Puppet modules which are capable of provisioning the OPNFV Target System (3 controllers, n number of compute nodes). -The Genesis repo contains the necessary tools to get install and deploy an OPNFV Target system using Foreman/QuickStack. These tools consist of the Foreman/QuickStack bootable ISO, and the automatic deployment script (deploy.sh). +The Genesis repo contains the necessary tools to get install and deploy an OPNFV target system using Foreman/QuickStack. These tools consist of the Foreman/QuickStack bootable ISO, and the automatic deployment script (deploy.sh). -An OPNFV install requires a "jumphost" in order to operate. The bootable ISO will allow you to install a customized CentOS 7 release to the jumphost, which then gives you the required packages needed to run deploy.sh. If you already have a jumphost with CentOS 7 installed, you may choose to ignore the ISO step and instead move directly to running deploy.sh. In this case, deploy.sh will install the necessary packages for you in order to execute. +An OPNFV install requires a "Jumphost" in order to operate. The bootable ISO will allow you to install a customized CentOS 7 release to the Jumphost, which then gives you the required packages needed to run deploy.sh. If you already have a Jumphost with CentOS 7 installed, you may choose to ignore the ISO step and instead move directly to running deploy.sh. In this case, deploy.sh will install the necessary packages for you in order to execute. -deploy.sh installs Foreman/QuickStack VM server using Vagrant with VirtualBox as it's provider. This VM is then used to provision out the OPNFV Target System (3 Controllers, n Compute nodes). These nodes can be either virtual or baremetal, and this guide contains instructions on how to install both. +deploy.sh installs Foreman/QuickStack VM server using Vagrant with VirtualBox as its provider. This VM is then used to provision the OPNFV target system (3 controllers, n compute nodes). These nodes can be either virtual or bare metal. This guide contains instructions for installing both. -4 Setup Requirements +3 Setup Requirements ======================== -4.1 Jumphost Requirements +3.1 Jumphost Requirements ------------------------- -The jumphost requirements are outlined below: +The Jumphost requirements are outlined below: -1. CentOS 7 (from ISO or self-installed) +1. CentOS 7 (from ISO or self-installed). -2. Root access/permissions +2. Root access. -3. libvirt or other hypervisors disabled (no kernel modules loaded) +3. libvirt or other hypervisors disabled (no kernel modules loaded). -4. 3-4 NICs, untagged (no 802.1Q tagging), with IP addresses +4. 3-4 NICs, untagged (no 802.1Q tagging), with IP addresses. -5. Internet access for downloading packages (with a default gateway configured) +5. Internet access for downloading packages, with a default gateway configured. -6. 4 GB of RAM (Baremetal Deployment) or 24 GB of RAM (VM Deployment) +6. 4 GB of RAM for a bare metal deployment, 24 GB of RAM for a VM deployment. -4.2 Network Requirements +3.2 Network Requirements ------------------------ Network requirements include: -1. No DHCP, or TFTP server running on networks used by OPNFV +1. No DHCP or TFTP server running on networks used by OPNFV. -2. 3-4 separate VLANS (untagged) with connectivity between Jumphost and nodes (Baremetal Deployment Only). These make up the Admin, Private, Public and optional Storage Networks. +2. 3-4 separate VLANs (untagged) with connectivity between Jumphost and nodes (bare metal deployment only). These make up the admin, private, public and optional storage networks. -3. Lights out OOB network access from Jumphost with IPMI node enablement (Baremetal Deployment Only) +3. Lights out OOB network access from Jumphost with IPMI node enabled (bare metal deployment only). -4. Admin or Public network has Internet access, meaning a gateway and DNS availability. +4. Admin or public network has Internet access, meaning a gateway and DNS availability. -*Note: Storage network will be consolidated to the Private network if only 3 networks are used +*Note: Storage network will be consolidated to the private network if only 3 networks are used.* -4.3 Baremetal Node Requirements +3.3 Bare Metal Node Requirements -------------------------------- -Baremetal Nodes require: +Bare Metal nodes require: -1. IPMI enabled on OOB interface for power control +1. IPMI enabled on OOB interface for power control. -2. BIOS Boot Priority should be PXE first then local hard disk +2. BIOS boot priority should be PXE first then local hard disk. -3. BIOS PXE interface should include Admin network mentioned above. +3. BIOS PXE interface should include admin network mentioned above. -4.4 Execution Requirements (Baremtal Deployment Only) +3.4 Execution Requirements (Baremtal Deployment Only) ------------------------------------------------------ -In order to execute deployment, one must need to gather the following information: +In order to execute a deployment, one must gather the following information: -1. IPMI IP Addresses for the nodes +1. IPMI IP addresses for the nodes. -2. IPMI Login information for the nodes (user/pass) +2. IPMI login information for the nodes (user/pass). -3. MAC Address of Admin interfaces on nodes +3. MAC address of admin interfaces on nodes. -4. MAC Address of Private interfaces on 3 nodes that will be controllers +4. MAC address of private interfaces on 3 nodes that will be controllers. -5 Installation High-Level Overview - Baremetal Deployment +4 Installation High-Level Overview - Bare Metal Deployment =========================================================== -The setup presumes that you have 6 baremetal servers and have already setup connectivity on at least 3 interfaces for all servers via a TOR switch or other network implementation. +The setup presumes that you have 6 bare metal servers and have already setup connectivity on at least 3 interfaces for all servers via a TOR switch or other network implementation. -The physical TOR switches are **not** automatically configured from the OPNFV reference platform. All the networks involved in the OPNFV infra-structure as well as the provider networks and the private tenant VLANs needs to be manually configured. +The physical TOR switches are **not** automatically configured from the OPNFV reference platform. All the networks involved in the OPNFV infrastructure as well as the provider networks and the private tenant VLANs needs to be manually configured. -The Jumphost can be installed using the bootable ISO. The Jumphost should then be configured with an IP gateway on it's Admin or Public interface and configured with a working DNS server. The Jumphost should also have routable access to the Lights Out network. +The Jumphost can be installed using the bootable ISO. The Jumphost should then be configured with an IP gateway on its admin or public interface and configured with a working DNS server. The Jumphost should also have routable access to the lights out network. -Deploy.sh is then executed in order to install the Foreman/QuickStack Vagrant VM. Deploy.sh uses a configuration file with YAML format in order to know how to install and provision the OPNFV Target System. The information gathered under section "4.4 Execution Requirements" is put into this configuration file. +Deploy.sh is then executed in order to install the Foreman/QuickStack Vagrant VM. Deploy.sh uses a configuration file with YAML format in order to know how to install and provision the OPNFV target system. The information gathered under section "4.4 Execution Requirements" is put into this configuration file. -Deploy.sh brings up a CentOS 7 Vagrant VM, provided by VirtualBox. The VM then executes an Ansible project called Khaleesi in order to install Foreman and QuickStack. Once the Foreman/QuickStack VM is up, Foreman will be configured with the nodes' information. This includes MAC address, IPMI, OpenStack Type (Controller, Compute, OpenDaylight Controller) and other information. At this point Khaleesi makes a REST API call to Foreman to instruct it to provision the hardware. +Deploy.sh brings up a CentOS 7 Vagrant VM, provided by VirtualBox. The VM then executes an Ansible project called Khaleesi in order to install Foreman and QuickStack. Once the Foreman/QuickStack VM is up, Foreman will be configured with the nodes' information. This includes MAC address, IPMI, OpenStack type (controller, compute, OpenDaylight controller) and other information. At this point Khaleesi makes a REST API call to Foreman to instruct it to provision the hardware. -Foreman will then reboot the nodes via IPMI. The nodes should already be set to PXE boot first off the Admin interface. Foreman will then allow the nodes to PXE and install CentOS 7 as well as Puppet. Foreman/QuickStack VM server runs a Puppet Master and the nodes query this master to get their appropriate OPNFV configuration. The nodes will then reboot one more time and once back up, will DHCP on their Private, Public and Storage NICs to gain IP addresses. The nodes will now check in via puppet and start installing OPNFV. +Foreman will then reboot the nodes via IPMI. The nodes should already be set to PXE boot first off the admin interface. Foreman will then allow the nodes to PXE and install CentOS 7 as well as Puppet. Foreman/QuickStack VM server runs a Puppet Master and the nodes query this master to get their appropriate OPNFV configuration. The nodes will then reboot one more time and once back up, will DHCP on their private, public and storage NICs to gain IP addresses. The nodes will now check in via Puppet and start installing OPNFV. -Khaleesi will wait until these nodes are fully provisioned and then return a success or failure based on the outcome of the puppet application. +Khaleesi will wait until these nodes are fully provisioned and then return a success or failure based on the outcome of the Puppet application. -6 Installation High-Level Overview - VM Deployment +5 Installation High-Level Overview - VM Deployment ==================================================== -The VM nodes deployment operates almost the same way as the Baremetal Deployment with a few differences. deploy.sh still installs Foreman/QuickStack VM the exact same way, however the part of the Khaleesi Ansible playbook which IPMI reboots/PXE boots the servers is ignored. Instead, deploy.sh brings up N number more Vagrant VMs (where N is 3 Control Nodes + n compute). These VMs already come up with CentOS7 so instead of re-provisioning the entire VM, deploy.sh initiates a small bash script which will signal to Foreman that those nodes are built and install/configure Puppet on them. +The VM nodes deployment operates almost the same way as the bare metal deployment with a few differences. deploy.sh still installs Foreman/QuickStack VM the exact same way, however the part of the Khaleesi Ansible playbook which IPMI reboots/PXE boots the servers is ignored. Instead, deploy.sh brings up N number more Vagrant VMs (where N is 3 control nodes + n compute). These VMs already come up with CentOS 7 so instead of re-provisioning the entire VM, deploy.sh initiates a small Bash script which will signal to Foreman that those nodes are built and install/configure Puppet on them. -To Foreman these nodes look like they have just built and register the same way as baremetal nodes. +To Foreman these nodes look like they have just built and register the same way as bare metal nodes. -7 Installation Guide - Baremetal Deployment -============================================= +6 Installation Guide - Bare Metal Deployment +============================================== -This section goes step-by-step on how to correctly install and provision the OPNFV target system to baremetal nodes. +This section goes step-by-step on how to correctly install and provision the OPNFV target system to bare metal nodes. -7.1 Install Baremetal Jumphost -------------------------------- -1. If your Jumphost does not have CentOS 7 already on it, or you would like to do a fresh install, then download the Foreman/QuickStack bootable ISO here <ISO LINK> +6.1 Install Bare Metal Jumphost +-------------------------------- +1. If your Jumphost does not have CentOS 7 already on it, or you would like to do a fresh install, then download the Foreman/QuickStack bootable ISO here <ISO LINK>. -2. Boot the ISO off of a USB or other installation media and walk through installing OPNFV CentOS 7 +2. Boot the ISO off of a USB or other installation media and walk through installing OPNFV CentOS 7. -3. After OS is installed login to your Jumphost as root +3. After OS is installed login to your Jumphost as root. -4. Configure IP addresses on 3-4 interfaces that you have selected as your Admin, Private, Public, and Storage (optional) networks +4. Configure IP addresses on 3-4 interfaces that you have selected as your admin, private, public, and storage (optional) networks. -5. Configure the IP gateway to the internet either, preferably on the Public interface +5. Configure the IP gateway to the Internet either, preferably on the public interface. -6. Configure your /etc/resolv.conf to point to a DNS server (8.8.8.8 is provided by Google) +6. Configure your /etc/resolv.conf to point to a DNS server (8.8.8.8 is provided by Google). 7. Disable selinux: @@ -181,37 +166,37 @@ This section goes step-by-step on how to correctly install and provision the OPN - systemctl stop firewalld - systemctl disable firewalld -7.2 Creating an Inventory File +6.2 Creating an Inventory File ------------------------------- -You now need to take the MAC address/IPMI info gathered in section "4.4 Execution Requirements" and create the YAML Inventory (also known as Configuration) file for deploy.sh +You now need to take the MAC address/IPMI info gathered in section "4.4 Execution Requirements" and create the YAML inventory (also known as configuration) file for deploy.sh. 1. Copy the opnfv_ksgen_settings.yml file from /root/bgs_vagrant/ to another directory and rename it to be what you want EX: </root/my_ksgen_settings.yml> 2. Edit the file in your favorite editor. There is a lot of information in this file, but you really only need to be concerned with the "nodes:" dictionary. -3. The nodes dictionary contains each baremetal host you want to deploy. You can have 1 or more Compute nodes and must have 3 Controller nodes (these are already defined for you). It is optional at this piont to add more Compute nodes into the dictionary. You must use a different name, hostname, short_name and dictionary keyname for each node. +3. The nodes dictionary contains each bare metal host you want to deploy. You can have 1 or more compute nodes and must have 3 controller nodes (these are already defined for you). It is optional at this point to add more compute nodes into the dictionary. You must use a different name, hostname, short_name and dictionary keyname for each node. 4. Once you have decided on your node definitions you now need to modify the MAC address/IPMI info dependant to your hardware. Edit the following values for each node: - - mac_address: change to mac_address of that node's Admin NIC (Default 1st NIC) + - mac_address: change to MAC address of that node's admin NIC (defaults to 1st NIC) - bmc_ip: change to IP Address of BMC (out-of-band)/IPMI IP - bmc_mac: same as above, but MAC address - bmc_user: IPMI username - bmc_pass: IPMI password -5. Also edit the following for only Controller nodes: +5. Also edit the following for only controller nodes: - - private_mac - change to mac_address of node's Private NIC (Default 2nd NIC) + - private_mac - change to MAC address of node's private NIC (default to 2nd NIC) 6. Save your changes. -7.3 Running deploy.sh +6.3 Running deploy.sh ---------------------- -You are now ready to deploy OPNFV! deploy.sh will use your /tmp/ directory to store it's Vagrant VMs. Your Foreman/QuickStack Vagrant VM will be running out of /tmp/bgs_vagrant. +You are now ready to deploy OPNFV! deploy.sh will use your /tmp/ directory to store its Vagrant VMs. Your Foreman/QuickStack Vagrant VM will be running out of /tmp/bgs_vagrant. -It is also recommended that you power off your nodes before running deploy.sh If there are dhcp servers or other network services that are on those nodes it may conflict with the installation. +It is also recommended that you power off your nodes before running deploy.sh If there are DHCP servers or other network services that are on those nodes it may conflict with the installation. Follow the steps below to execute: @@ -219,11 +204,11 @@ Follow the steps below to execute: 2. ./deploy.sh -base_config </root/my_ksgen_settings.yml> -3. It will take about 20-25 minutes to install Foreman/QuickStack VM. If something goes wrong during this part of the process, it is most likely a problem with the setup of your Jumphost. You will also notice different outputs in your shell. When you see messages that say "TASK:" or "PLAY:" this is Khalessi running and installing Foreman/QuickStack inside of your VM or deploying your nodes. Look for "PLAY [Deploy Nodes]" as a sign that Foreman/QuickStack is finished installing and now your nodes ar being rebuilt. +3. It will take about 20-25 minutes to install Foreman/QuickStack VM. If something goes wrong during this part of the process, it is most likely a problem with the setup of your Jumphost. You will also notice different outputs in your shell. When you see messages that say "TASK:" or "PLAY:" this is Khalessi running and installing Foreman/QuickStack inside of your VM or deploying your nodes. Look for "PLAY [Deploy Nodes]" as a sign that Foreman/QuickStack is finished installing and now your nodes are being rebuilt. 4. Your nodes will take 40-60 minutes to re-install CentOS 7 and install/configure OPNFV. When complete you will see "Finished: SUCCESS" -7.4 Verifying the setup +6.4 Verifying the setup ------------------------ Now that the installer has finished it is a good idea to check and make sure things are working correctly. To access your Foreman/QuickStack VM: @@ -232,33 +217,33 @@ Now that the installer has finished it is a good idea to check and make sure thi 2. 'vagrant ssh' password is "vagrant" -3. You are now in the VM and can check the status of foreman service, etc. For example: 'systemctl status foreman' +3. You are now in the VM and can check the status of Foreman service, etc. For example: 'systemctl status foreman' -4. type "exit" and leave the Vagrant VM. Now execute: 'cat /tmp/bgs_vagrant/opnfv_ksgen_settings.yml | grep foreman_url' +4. Type "exit" and leave the Vagrant VM. Now execute: 'cat /tmp/bgs_vagrant/opnfv_ksgen_settings.yml | grep foreman_url' 5. This is your Foreman URL on your public interface. You can go to your web browser, http://<foreman_ip>, login will be "admin"//"octopus". This way you can look around in Foreman and check that your hosts are in a good state, etc. 6. In Foreman GUI, you can now go to Infrastructure -> Global Parameters. This is a list of all the variables being handed to Puppet for configuring OPNFV. Look for "horizon_public_vip". This is your IP address to Horizon GUI. -**Note: You can find out more about how to ues Foreman by going to http://www.theforeman.org/ or by watching a walkthrough video here: https://bluejeans.com/s/89gb/ +**Note: You can find out more about how to ues Foreman by going to http://www.theforeman.org/ or by watching a walkthrough video here: https://bluejeans.com/s/89gb/** -7. Now go to your web browser and insert the Horizon Public VIP. The login will be "admin//octopus" +7. Now go to your web browser and insert the Horizon public VIP. The login will be "admin//octopus" 8. You are now able to follow the next section "7.5 OpenStack Verification" -7.5 OpenStack Verification +6.5 OpenStack Verification --------------------------- -Now that you have Horizon access, let's make sure OpenStack the OPNFV Target System are working correctly: +Now that you have Horizon access, let's make sure OpenStack the OPNFV target system are working correctly: 1. In Horizon, click Project -> Compute -> Volumes, Create Volume -2. Make a volume "test_volume" and 1 GB +2. Make a volume "test_volume" of size 1 GB 3. Now in the left pane, click Compute -> Images, click Create Image 4. Insert a name "cirros", Insert an Image Location "http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img" -5. Select Format "QCOW2", select Public, then hit Create Image +5. Select format "QCOW2", select Public, then hit Create Image 6. Now click Project -> Network -> Networks, click Create Network @@ -274,9 +259,9 @@ Now that you have Horizon access, let's make sure OpenStack the OPNFV Target Sys 12. Click Launch, status should show "Spawning" while it is being built -13. You can now repeat setps 11 and 12, but create a "cirros2" named instance +13. You can now repeat steps 11 and 12, but create a "cirros2" named instance -14. Once both instances are up you can see their IP Addresses on the Instances page. Click the Instance Name of cirros1. +14. Once both instances are up you can see their IP addresses on the Instances page. Click the Instance Name of cirros1. 15. Now click the "Console" tab and login as cirros//cubswin:) @@ -284,18 +269,19 @@ Now that you have Horizon access, let's make sure OpenStack the OPNFV Target Sys Congratulations you have successfully installed OPNFV! -8 Installation Guide - VM Deployment -===================================== +7 Installation Guide - VM Deployment +==================================== This section goes step-by-step on how to correctly install and provision the OPNFV target system to VM nodes. -8.1 Install Jumphost +7.1 Install Jumphost -------------------- -Follow section "7.1 Install Baremetal Jumphost" +Follow section "7.1 Install Bare Metal Jumphost" -8.2 Running deploy.sh +7.2 Running deploy.sh ---------------------- -You are now ready to deploy OPNFV! deploy.sh will use your /tmp/ directory to store it's Vagrant VMs. Your Foreman/QuickStack Vagrant VM will be running out of /tmp/bgs_vagrant. Your compute and subsequent controller nodes will be running in: +You are now ready to deploy OPNFV! deploy.sh will use your /tmp/ directory to store its Vagrant VMs. Your Foreman/QuickStack Vagrant VM will run out of /tmp/bgs_vagrant. Your compute and subsequent controller nodes will run in: + - /tmp/compute - /tmp/controller1 - /tmp/controller2 @@ -315,22 +301,27 @@ Follow the steps below to execute: 5. The speed at which nodes are provisioned is totally dependant on your Jumphost server specs. When complete you will see "All VMs are UP!" -8.3 Verifying the setup +7.3 Verifying the setup ----------------------- Please follow the instructions under section "7.4 Verifying the setup". Also, for VM deployment you are able to easily access your nodes by going to /tmp/<node name> and then "vagrant ssh" (password is "vagrant"). You can use this to go to a controller and check OpenStack services, OpenDaylight, etc. -8.4 OpenStack Verification +7.4 OpenStack Verification -------------------------- Please follow the steps in section "7.5 OpenStack Verification" -9 Frequently Asked Questions -============================== +8 Frequently Asked Questions +============================ + +9 License +========= + +All Foreman/QuickStack and "common" entities are protected by the `Apache 2.0 License <http://www.apache.org/licenses/>`_. 10 References -============= +============== 10.1 OPNFV ------------- @@ -342,4 +333,4 @@ Please follow the steps in section "7.5 OpenStack Verification" -------------------- 10.4 Foreman --------------- +--------------- |