This is an old revision of the document!
This will setup a basic functional assessment platform (a learning "academy") ala Sandbox prior to getting a BGS environment that we can use. As compared to Sandbox, the goal of this activity is rather to install the actual OPNFV components as listed for BGS, under a single node (e.g. a laptop with lots of memory) or multi-node environment.
The procedure below has been used to create a 3-node OPNFV install using Intel NUC i7 nodes with 16GB RAM, 250MB SSD, and 1 TB HDD. The install uses one NUC for the Jumphost, and one each for the controller (penStack + ODL) and the compute nodes.
# Includes instructions from http://artifacts.opnfv.org/genesis/foreman/docs/installation-instructions.html # install Centos 7 x86_64 minimal server: CentOS-7-x86_64-Minimal-1503-01.iso # during install, add user opnfv # once active, login to opnfv account from console ip addr # note IP address of enp0s25 - will set it in ifcfg-enp0s25 per the notes below # add opnfv account to sudoers after "root ALL=(ALL) ALL" su visudo opnfv ALL=(ALL) ALL # update sudo yum -y update # reboot and select updated kernel so correct kernel headers can be obtained in virtualbox setup sudo shutdown -r 0 # Select boot option: CentOS Linux (3.10.0-229.14.1.e17.x86_64) 7 (Core) # configure hostname sudo vi /etc/hostname jumphost1.opnfv.org # Disable NetworkManager sudo systemctl disable NetworkManager # configure single NIC as static per IP assigned during install sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s25 TYPE="Ethernet" BOOTPROTO="static" IPADDR=192.168.1.201 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 NM_CONTROLLED="no" DEFROUTE="yes" PEERDNS="yes" PEERROUTES="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" IPV6_FAILURE_FATAL="no" NAME="enp0s25" UUID="e8d07430-b511-42f0-83e7-ee1d1af69063" DEVICE="enp0s25" ONBOOT="yes" # Restart networking sudo service network restart # Edit /etc/resolv.conf and add a nameserver sudo vi /etc/resolv.conf 8.8.8.8 # Disable selinux: sudo setenforce 0 sudo sed -i 's/SELINUX=.*/SELINUX=permissive/' /etc/selinux/config # Disable firewalld: sudo systemctl stop firewalld sudo systemctl disable firewalld # install and start ntp sudo yum -y install ntp sudo systemctl start ntpd date # verify time is correct # Set NUCs to PXE boot on wake-on-lan # https://help.ubuntu.com/community/WakeOnLan # In BIOS options (F2), Power tab, set "Wake on LAN from S4/S5" to "Power On - PXE Boot" and save (F10) # Boot NUCs and note MAC addresses # NUC1 JUMPHOST1 B8:AE:ED:76:FC:WB # NUC2 OSCONTROLLER1 B8:AE:ED:76:FB:45 # NUC3 OSCOMPUTE1 B8:AE:ED:76:FB:C4 # NUC4 JUMPHOST2 B8:AE:ED:76:A4:E9 # NUC5 OSCONTROLLER2 B8:AE:ED:76:F9:FF # NUC6 OSCOMPUTE2 B8:AE:ED:76:C5:ED # install ether-wake (for test of wakenodes.sh below) sudo yum -y install net-tools # install git sudo yum -y install git cd ~ # clone genesis git clone https://blsaws@gerrit.opnfv.org/gerrit/genesis # (for testing, downloaded trozet's patch fork snapshot from https://gerrit.opnfv.org/gerrit/gitweb?p=genesis.git;a=commit;h=756ee8c81cfac9a69e8f67811429e63da9af6480 curl "https://gerrit.opnfv.org/gerrit/gitweb?p=genesis.git;a=snapshot;h=756ee8c81cfac9a69e8f67811429e63da9af6480;sf=tgz" -o genesis-756ee8c.tar.gz gzip -d genesis-756ee8c.gz tar -xvf genesis-756ee8c.tar # modify to clone khaleesi from my fork (trozet=>blsaws) per the patches below vi ~/genesis-756ee8c/foreman/ci/bootstrap.sh if ! git clone -b opnfv https://github.com/blsaws/khaleesi.git; then # modify ~/genesis-756ee8c/foreman/ci/opnfv_ksgen_settings_no_HA.yml for my specific config vi ~/genesis-756ee8c/foreman/ci/opnfv_ksgen_settings_no_HA.yml # Jumphost1: # (for compute1:) name: oscompute1.{{ domain_name }} hostname: oscompute1.{{ domain_name }} short_name: oscompute1 mac_address: "B8:AE:ED:76:FB:C4" # (for controller1:) name: oscontroller1.{{ domain_name }} hostname: oscontroller1.{{ domain_name }} short_name: oscontroller1 mac_address: "B8:AE:ED:76:FB:45" private_mac: "B8:AE:ED:76:FB:45" # Jumphost1: # (for compute1:) name: oscompute1.{{ domain_name }} hostname: oscompute1.{{ domain_name }} short_name: oscompute1 mac_address: "B8:AE:ED:76:C5:ED" # (for controller1:) name: oscontroller1.{{ domain_name }} hostname: oscontroller1.{{ domain_name }} short_name: oscontroller1 mac_address: "B8:AE:ED:76:F9:FF" private_mac: "B8:AE:ED:76:F9:FF" # clone my fork of trozet's khaleesi, updated with patches # it will later be cloned by the foreman vm, so these patches will be available in the foreman vm cd /opt sudo git clone -b opnfv https://github.com/blsaws/khaleesi.git # during initial debugging, the patches were manually created as below; later they were pulled from the repo fork after being committed # patch 1: add wakenodes.sh to root of khaleesi repo # alternative is to manually power-on the nodes, which will go into PXE-boot mode sudo vi /opt/khaleesi/wakenodes.sh #!/bin/bash yum -y install net-tools ether-wake B8:AE:ED:76:FB:C4 ether-wake B8:AE:ED:76:FB:45 ether-wake B8:AE:ED:76:F9:FF ether-wake B8:AE:ED:76:C5:ED # During initial debugging wakenodes.sh was copied to the shared folder for the foreman vm and later copied to the root of the cloned repo in the foreman vm. # (in jumphost) sudo cp /opt/khaleesi/wakenodes.sh /var/opt/opnfv/foreman_vm # (after foreman vm is up) # su; cd /var/opt/opnfv/foreman_vm; vagrant ssh; cp /vagrant/wakenodes.sh /opt/khaleesi/wakenodes.sh # patch 2: in main.yml add call to wakenodes.sh script as shown in http://docs.ansible.com/ansible/script_module.html # In khaleesi/roles/get_nodes/foreman/tasks/main.yml add call to node wakeup script after block "- name: Provision nodes" sudo vi /opt/khaleesi/roles/get_nodes/foreman/tasks/main.yml # - script: /opt/khaleesi/wakenodes.sh # During initial debugging main.yml was copied to the shared folder for the foreman vm and later copied to the cloned repo in the foreman vm. # (in jumphost) sudo cp /opt/khaleesi/roles/get_nodes/foreman/tasks/main.yml /var/opt/opnfv/foreman_vm/main.yml # (after foreman vm is up) # su; cd /var/opt/opnfv/foreman_vm; vagrant ssh; cp /vagrant/main.yml /opt/khaleesi/roles/get_nodes/foreman/tasks/main.yml # patch 3: in foreman.py skip IPMI related code in node bringup # In khaleesi/library/foreman.py exit early to avoid IPMI code # change "elif ipmi_host is None:" to "if ipmi_host is None:" and add module.exit before it sudo vi /opt/khaleesi/library/foreman.py # bryan_att modified to skip IPMI stuff module.exit_json(changed=True, msg="Rebuilding Node") # change elif to if so the module.exit is outside the previous if block if ipmi_host is None: # During initial debugging foreman.py was copied to the shared folder and then to the foreman VM as above. # (in jumphost) sudo cp /opt/khaleesi/library/foreman.py /var/opt/opnfv/foreman_vm/ # (after foreman vm is up) # su; cd /var/opt/opnfv/foreman_vm; vagrant ssh; cp /vagrant/foreman.py /opt/khaleesi/library/foreman.py # kickoff deploy.sh cd ~/genesis-756ee8c/foreman/ci/ sudo ./deploy.sh -single_baremetal_nic enp0s25 -base_config /home/opnfv/genesis-756ee8c/foreman/ci/opnfv_ksgen_settings_no_HA.yml # if errors, before retrying wipe using clean.sh or su cd /var/opt/opnfv/foreman_vm vagrant destroy -f cd - rm -rf /var/opt/opnfv exit
OpenStack running in a VM had touble being reachable from compute hosts outside the main host machine. So dropping back to running OpenStack on the host machine directly, until I figure out how to resolve the connectivity issue (maybe the bridged networking config below would help with that - it's a recent change which was needed to allow the compute hosts running in VMs to connect to OpenStack…).
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual auto br0 iface br0 inet dhcp bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0
glance_host = 192.168.1.132 my_ip = 192.168.122.209 vnc_enabled = True vncserver_listen = 192.168.1.132 vncserver_proxyclient_address = 192.168.1.132 novncproxy_base_url = http://192.168.1.132:6080/vnc_auto.html rpc_backend = rabbit rabbit_host = 192.168.1.132 rabbit_password = opnfv auth_strategy = keystone [keystone_authtoken] auth_uri = http://192.168.1.132:5000 auth_host = ubuntu-1404-openstack auth_port = 35357 auth_protocol = http admin_tenant_name = service admin_user = nova admin_password = opnfv [database] # The SQLAlchemy connection string used to connect to the database connection = mysql://nova:opnfvmysql@192.168.1.132/nova
To address some of the potential snags occurring due to conflicts between OpenStack, ODL, OVS, libvirt, … I am switching to running OpenStack and compute nodes under KVM VMs, with the addition of other compute nodes on other machines. At this point ODL is not in the picture as I have to figure out how the whole flat network approach works first. And the goal for this initial sandbox will be to get off the ground with policy feature assessment in OpenStack, so ODL can wait until I learn it better or get guidance on how to factor it into this setup.
At this point I have most of the above working. What is not currently working is getting the external compute node connected to OpenStack nova, likely some firewall issue with KVM that I need to fix.
I'll post details on how this was setup soon.
Returning to a more direct approach, this time will ensure component independence by installing: * OpenStack on host OS * ODL in VM managed by OpenStack
Decided pretty quickly that as some of the earlier issues may have been with running OpenStack on the host directly, I would switch to trying it in a VM (take 4).
Trying out Foreman to see if it helps get past some of the basic issues with the manual install.
. . .
Here is a graphic of the concept. This is very draft and leaves many things unclear partly because I'm not sure how to do them yet.
This procedure is not being further pursued at the moment… too many undocumented things about the overall setup of OpenStack, ODL, etc…
Restart process for For sandbox based upon host OS: Unbuntu 14.04 Server LTS
Restart process for sandbox based upon host OS: Unbuntu 14.04 Server LTS
Tried CentOS 7 but continually getting errors: