RHOSP8: Proof Of Concept

The deployment is not publicly accessible, only connection from the virtual host.

Requirements

Hardware & Software

System: HP ProLiant DL580 G7
CPU: Intel(R) Xeon(R) CPU E7- 4830
RAM: 64 GB
OS: RHEL 7.4 (Maipo) x86_64
Software:
qemu-kvm-1.5.3-141.el7_4.2.x86_64
libvirt-3.2.0-14.el7_4.3.x86_64

Subscription

An active RHOSP subscription

Network

Bridge:
bridge name     bridge id               STP enabled     interfaces
virbr1          8000.5254008fb993       yes             virbr1-nic
                                                        vnet0
                                                        vnet1
                                                        vnet2
                                                        vnet3
                                                        vnet4
Libvirt Net:192.168.122.0/24 (non-DHCP)
Routing Table:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.0.1  0.0.0.0         UG        0 0          0 eth0
192.168.0.0   0.0.0.0         255.255.254.0   U         0 0          0 eth0
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr1
Openstack Private IP: 10.0.0.0/24 (DHCP)
Openstack Public IP: 192.168.122.0/24 (Allocation starts from 100 until 150, non-DHCP)
VM:
1 x Director (director.example.com) 1 x Controller (controller0.example.com) 1 x Compute (compute0.example.com) 1 x Ceph (ceph0.example.com) 1 x Power (TripleO required BMC to start/stop machine during overcloud installation).

Storage

Location: Local Disk
Path: /var/lib/libvirtd/images
Disk Configuration:
Format: qcow2
Cache: Unsafe (Not for production use! Unless underlying filesystem has removed the risks.)
AIO: threads

Installation

The openstack installation based on TripleO method. The installation consists of four parts.
  1. Provisioning Director
  2. Provisioning Power Machine
  3. Install Undercloud
  4. Install Overcloud

Step 1: Provisioning Director

Specs:
8 CPUs
12GB RAM
50 GB HDD (Minimum)
2 NICs (one for host, one for openstack provisioning - unnumbered interface)
The installation of RHEL is out of scope for this Wiki.
When the installation done, it is good to remove the 70-persistent-net.rules from udev so the network changes wont cause reconfiguration.

Step 2: Provisioning Power

Specs:
2 CPUs
2GB RAM
20 GB HDD (Minimum) 1 NIC (192.168.122.5/24)
This machine will act as virtualBMC to control virtual guest power start/stop/reset. Once the machine kickstarted:
  1. Register the machine
  2. Enable repos:
subscription-manager repos --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms
  1. Enable RDO repo:
yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
  1. Install python virtualBMC:
yum install python2-virtualbmc -y
  1. Create ssh key and transfer it to virtual host server. Make sure the ssh using public key to virtual host server is working.
  2. We need to assign one IP to each virtual guest for IPMI. Configure firewall to allow port 623 IPMI. Add the IP into the current interface, so right now we have for IPs running on the NIC.
compute0.example.com 192.168.122.66 
controller0.example.com 192.168.122.60
ceph0.example.com 192.168.122.63
  1. Add the vbmc (note the name must be as the same as virtual guest name in virsh list --all).
vbmc add controller0 --username root --password Shell123 --libvirt-uri=qemu+ssh://host.example.com/system --address ::ffff:192.168.122.60
vbmc add conmpute0 --username root --password Shell123 --libvirt-uri=qemu+ssh://host.example.com/system --address ::ffff:192.168.122.66
vbmc add ceph0 --username root --password Shell123 --libvirt-uri=qemu+ssh://host.example.com/system --address ::ffff:192.168.122.63
  1. Start the vbmc.
vbmc start controller0
vbmc start ceph0
vbmc start compute0
  1. To test , use IPMI Tool.
[root@host ~]# ipmitool -I lanplus -U root -P Shell123 -H 192.168.122.60 power status
Chassis Power is on
Next move to the undercloud provisioning.

Step 3: Installing Undercloud

TripleO utilizing openstack baremetal component (undercloud) to provision openstack (overcloud), hence the OOO (TripleO - openstack on openstack).
The official documentation is at https://access.redhat.com/documentation/en/red-hat-openstack-platform/.
Once the host kickstarted:
  1. Add stack user.
useradd stack
passwd -d stack
echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack
chmod 0440 /etc/sudoers.d/stack
  1. Add director to /etc/hosts.
[root@director ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.122.10 director director.example.com
  1. Create template and images dir.
su - stack
mkdir ~/images
mkdir ~/templates
  1. Register the machine.
subscription-manager  register
  1. Attach an RHOSP subscription.
subscription-manager list --all --available
subscription-manager attach --pool=xxxxxxxxxxxxxx
  1. Re-enable repo.
$ sudo subscription-manager repos --disable=*
$ sudo subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-openstack-8-rpms --enable=rhel-7-server-openstack-8-director-rpms --enable rhel-7-server-rh-common-rpms
  1. Update and reboot.
sudo yum update -y
sudo reboot
  1. Install the director package.
[stack@director ~]$ sudo yum install -y python-tripleoclient
  1. Configure the director.
$ cp /usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf
Uncomment below parameters in the undercloud.conf and use the value unless you have different configuration.
  • local_ip
  • network_gateway
  • undercloud_public_vip
  • undercloud_admin_vip
  • local_interface (the unnumbered NIC)
  • network_cidr
  • masquerade_network
  • dhcp_start, dhcp_end
  • inspection_interface
  • inspection_iprange
  1. Start the deployment for undercloud.
openstack undercloud install

Step 4: Provisioning Overcloud

Once the undercloud completed, it will generates two files:
  • undercloud-passwords.conf - A list of all passwords for the director's services.
  • stackrc - A set of initialization variables to help you access the director's command line tools.
  1. Initialize the stack login.
source ~/stackrc
  1. Obtain image for overcloud.
su - stack
sudo yum install rhosp-director-images rhosp-director-images-ipa
  1. Copy the image to the directory for images:
cp /usr/share/rhosp-director-images/overcloud-full-latest-8.0.tar ~/images/.
cp /usr/share/rhosp-director-images/ironic-python-agent-latest-8.0.tar ~/images/.
  1. Extract the images.
$ cd ~/images
$ for tarfile in *.tar; do tar -xf $tarfile; done
  1. Import the image into undercloud.
$ openstack overcloud image upload --image-path /home/stack/images/
  1. Set the DNS nameserver for the net.
$ neutron subnet-list
$ neutron subnet-update [subnet-uuid] --dns-nameserver 8.8.8.8
  1. Create a JSON template for registering the node for overcloud call instackenv.json.

    "nodes":[
        {
            "mac":[
                "52:54:00:7e:fc:9a"
            ],
            "cpu":"8",
            "memory":"4092",
            "disk":"50",
            "arch":"x86_64",
            "pm_type":"pxe_ipmitool",
            "pm_user":"root",
            "pm_password":"Shell123",
            "pm_addr":"192.168.122.63",
            "name":"ceph0"
        },
                {
            "mac":[
                "52:54:00:4d:d8:f1"
            ],
            "cpu":"8",
            "memory":"4092",
            "disk":"50",
            "arch":"x86_64",
            "pm_type":"pxe_ipmitool",
            "pm_user":"root",
            "pm_password":"Shell123",
            "pm_addr":"192.168.122.60",
            "name":"controller0"
        },
                {
            "mac":[
                "52:54:00:0c:42:08"
            ],
            "cpu":"8",
            "memory":"4092",
            "disk":"50",
            "arch":"x86_64",
            "pm_type":"pxe_ipmitool",
            "pm_user":"root",
            "pm_password":"Shell123",
            "pm_addr":"192.168.122.66",
            "name":"compute0"
        }

    ]
}
  1. Import the JSON.
$ openstack barematal import --json ~/instackenv.json
  1. Configure the boot.
$ openstack baremetal configure boot
  1. Ironic will show the node.
$ ironic node-list
  1. Start the ironic introspection.
$ openstack baremetal introspection bulk start
  1. Each overcloud node need to tagged to their respective profile. Same flavor as openstack flavor list. Theflavor states the minimum requirement to provision overcloud component, if not met , no valid hosts error during deployment.
ironic node-update compute0 add properties/capabilities='profile:compute,boot_option:local'
ironic node-update ceph0 add properties/capabilities='profile:ceph-storage,boot_option:local'
ironic node-update controller add properties/capabilities='profile:control,boot_option:local'
  1. Deploy the overcloud.
openstack overcloud deploy --templates --control-scale 1 --compute-scale 1 --ceph-storage-scale 1 --control-flavor control --compute-flavor compute --ceph-storage-flavor ceph-storage 
Note: The deployment will use pacemaker to provide HA when the scale is not 1.

Comments

Popular Posts