Friday, April 6, 2018

OpenStack Pike TripleO undercloud overcloud: Final preparations before deploying the overcloud



Ensure the profile has been set in the capabilities of the nodes.

Check one of the nodes details to see the capabilities now show the associated profile.


(undercloud) [stack@pike ~]$
(undercloud) [stack@pike ~]$ openstack baremetal node show d2d31668-060b-4642-8c5c-298ddebbf4c1

--


Creating the environment file to pass the variables to build the overcloud

Putting the env vars to be used for the openstack overcloud deploy in a single file. These are the parameter variable to be passed to the overcloud deploy.

parameter_defaults:
  ControlPlaneDefaultRoute: '172.16.0.1'
  DnsServers: '172.16.0.1'
  OvercloudCephStorageFlavor: ceph-storage
  CephStorageCount: 3
  CephDefaultPoolSize: 3
  ControllerCount: 3

  ExtraConfig:
    ceph::profile::params::osds:
      '/dev/sdb':
        journal: '/dev/sdc'

        

  • Please note that the above is self-explanatory as we are specfiying that the controller count will be 3 and the same will be the count of the ceph-storage servers.
  • Also by the 'ExtraConfig' we specidy that the ceph will use /dev/sdb and /dev/sdc on the ceph overcloud nodes where /dev/sdc on them will be used for Ceph Journal.
  • (Please note that at the time of the creation of the overcloud VirtuaMachines on the KVM host we had specified 3 * 60GB disks for the ceph-nodes.)

--

    
Deciding on selecting which environment files will be used to deploy the overcloud
  
The overcloud installation is highly customizable. The list here cannot be exhaustive, hence it is suggested that you go through the openstack tripleo guides on the OpenStack documentation website.



For HA of the overcloud controllers as we are going to have 3 Controller in the overcloud and they will be in Highly Available configuration we will use the puppet-pacemaker.yaml HEAT environment template YAML file 

-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml --ntp-server pool.ntp.org

An NTP server is must when you are installing CEPH as well as the PACEMAKER based OpenStack Controller HA 

As we are also going to install ceph on the ceph-storage nodes, we are going to use the puppet-ceph.yaml HEAT template YAML file 

-e /usr/share/openstack-tripleo-heat-templates/environments/puppet-ceph.yaml

--

--

Considerations for the overcloud nodes being behind a proxy server

As the overcloud servers are going to be behind a proxy, so the proxy parameters have to be set to the overcloud nodes as the part of the firstboot. 

Please note that this was a workaround, and may not be needed in your case.

It is however important to note that the /usr/share/openstack-tripleo-heat-templates/firstboot/userdata_default.yaml is a good place to run the firstboot customization for all common things on all the overcloud servers.


Also my lookout was to have the default gateway at the OS level set also for the overcloud controllers. The default gateway at the OS of the overcloud compute nodes was getting set correctly automatically.



Edit the file /usr/share/openstack-tripleo-heat-templates/firstboot/userdata_default.yaml 


heat_template_version: pike

description: >
  This is a default no-op template which provides empty user-data
  which can be passed to the OS::Nova::Server resources.
  This template can be replaced with a different implementation via
  the resource registry, such that deployers may customize their
  first-boot configuration.

resources:
  userdata:
    type: OS::Heat::MultipartMime
    properties:
      parts:
        - config: { get_resource: proxy_config }

  proxy_config:
    type: OS::Heat::SoftwareConfig
    properties:
      group: ungrouped
      config: |
        #!/bin/bash
        echo "Running boot script"
        sudo su -c  "echo 'export http_proxy=http://1.2.3.4:8080' >> /etc/profile"
        sudo su -c  "echo 'export https_proxy=http://1.2.3.4:8080' >> /etc/profile"
        sudo su -c  "echo 'proxy=http://1.2.3.4:8080' >> /etc/yum.conf
        if [ $( ip r s | grep -i default | wc -l) -eq 0 ]; then
        /usr/sbin/route add default gw 172.16.0.1 dev br-ex
        echo "default via 172.16.0.1 dev br-ex" >> /etc/sysconfig/network-scripts/route-br-ex
        fi

outputs:
  # This means get_resource from the parent template will get the userdata, see:
  # http://docs.openstack.org/developer/heat/template_guide/composition.html#making-your-template-resource-more-transparent
  # Note this is new-for-kilo, an alternative is returning a value then using
  # get_attr in the parent template instead.
  OS::stack_id:
    value: {get_resource: userdata}



These are the environment files that we are going to use in our OpenStack PIKE overcloud TripleO deployment.



Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)

No comments:

Post a Comment