Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Installing a Nested Red Hat OpenShift Container Platform 3.11 Cluster Using Contrail Ansible Deployer

Note:

This topic covers Contrail Networking in Red Hat Openshift environments that are using Contrail Networking Release 21-based releases.

Starting in Release 22.1, Contrail Networking evolved into Cloud-Native Contrail Networking. Cloud-Native Contrail offers significant enhancements to optimize networking performance in Kubernetes-orchestrated environments. Cloud-Native Contrail supports Red Hat Openshift and we strongly recommend using Cloud-Native Contrail for networking in environments using Red Hat Openshift.

For general information about Cloud-Native Contrail, see the Cloud-Native Contrail Networking Techlibrary homepage.

You can install a nested Red Hat OpenShift Container Platform 3.11 cluster along with Contrail Networking using Contrail Ansible deployer.

Prerequisites

Ensure that the following prerequisites are met for a successful provisioning of a nested Contrail-OpenShift cluster.

  • The recommended system requirements are:

    System Requirements

    Primary Node

    Infrastructure Node

    Compute Node

    CPU/RAM

    8 vCPU, 16 GB RAM

    16 vCPU, 64 GB RAM

    As per OpenShift recommendations.

    Disk

    100 GB

    250 GB

  • A running Red Hat OpenStack Platform Director (RHOSPD) 13 cluster with Contrail. OpenShift Contrail release must be same as RHOSPD 13 Contrail release.

  • RHOSPD environments require that the Contrail vrouter, Contrail config and OpenStack keystone are in “internal-api” network. Modify the ServiceNetMap parameters in the contrail-services.yaml file to configure in “internal-api” network.

  • Ensure that the vRouter gateway in the contrail-services.yaml file is part of “internal-api” network.

  • OpenShift nodes (VMs) must have Internet connectivity.

  • Default security group of the virtual-network where OpenShift nodes are launched must be modified to allow all ingress traffic to communicate with OpenShift networks provided in the OpenShift inventory file.

Provisioning Nested OpenShift Cluster

Provisioning a nested OpenShift cluster is a two-step process.

  1. Create link-local services in the Contrail-OpenStack cluster.

    A nested OpenShift cluster is managed by the same Contrail controller that manages the underlying OpenStack cluster. Hence, the nested Openshift cluster needs IP reachability to the Contrail controller and OpenStack keystone service. Since the OpenShift cluster is actually an overlay on the OpenStack cluster, we use the Link Local Service feature of Contrail to provide IP reachability to and from the overlay OpenShift cluster and OpenStack cluster.

    To configure a Link Local Service, we need a Fabric IP and Service IP. Fabric IP is the node IP on which the Contrail Controller and OpenStack services are running. Service IP is a unique and unused IP in the entire OpenStack cluster and is shared with the OpenShift cluster to reach Contrail Controller and OpenStack services. Service IP (along with port number) is used by the data plane to identify the fabric IP. For each node of the OpenStack cluster, one service IP must be identified.

    You must configure the following Link Local Services in Contrail.

    Contrail Controller and OpenStack Process

    Service IP

    Service Port

    Fabric IP

    Fabric Port

    Contrail Config

    <Service IP for the running node>

    8082

    <Node IP of running node>

    8082

    Contrail Analytics

    <Service IP for the running node>

    8086

    <Node IP of running node>

    8086

    Contrail Msg Queue

    <Service IP for the running node>

    5673

    <Node IP of running node>

    5673

    Contrail VNC DB

    <Service IP for the running node>

    9161

    <Node IP of running node>

    9161

    Keystone

    <Service IP for the running node>

    35357

    <Node IP of running node>

    35357

    K8s-cni-to-agent

    <Service IP for the running node>

    9091

    <Node IP of running node>

    9091

    For example, consider a sample cluster of seven nodes.

    Allocate seven unused IP addresses for the seven nodes.

    Note:

    One Service IP address can represent all vRouter nodes.

    The following link-local services must be created:

    Contrail controller and OpenStack process

    Service IP

    Service Port

    Fabric IP

    Fabric Port

    Contrail Config

    10.10.10.1

    8082

    192.168.1.100

    8082

    Contrail Analytics 1

    10.10.10.1

    8086

    192.168.1.100

    8086

    Contrail Analytics 2

    10.10.10.1

    8086

    192.168.1.101

    8086

    Contrail Msg Queue

    10.10.10.2

    5673

    192.168.1.100

    5673

    Contrail VNC DB 1

    10.10.10.1

    9161

    192.168.1.100

    9161

    Contrail VNC DB 2

    10.10.10.2

    9161

    192.168.1.101

    9161

    Contrail VNC DB 3

    10.10.10.2

    9161

    192.168.1.102

    9161

    Keystone

    10.10.10.4

    35357

    192.168.1.200

    35357

    K8s-cni-to-agent

    10.10.10.5

    9091

    127.0.0.1

    9091

  2. Install OpenShift using OpenShift Ansible deployer.

    Perform the following steps to install the nested OpenShift 3.11 cluster along with Contrail Networking using OpenShift Ansible deployer.

    1. Set up environment nodes for RHEL OpenShift enterprise installations:

      1. Subscribe to RHEL.

        (all-nodes)# subscription-manager register --username <> --password <> --force

      2. From the list of available subscriptions, find and attach the pool ID for the OpenShift Container Platform subscription.

        (all-nodes)# subscription-manager attach --pool=pool-ID

      3. Disable all yum repositories.

        (all-nodes)# subscription-manager repos --disable="*"

      4. Enable only the required repositories.

      5. Install required packages, such as python-netaddr, iptables-services, and so on.

        (all-nodes)# yum install -y tcpdump wget git net-tools bind-utils yum-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct python-netaddr openshift-ansible

      Note:

      CentOS OpenShift Origin installations are not supported.

    2. Get the files from the latest tar ball. Download the OpenShift Container Platform install package from Juniper software download site and modify the contents of the openshift-ansible inventory file.

      1. Download Openshift Ansible (contrail-ansible-deployer-release-tag.tgz) installer from the Juniper software download site, https://www.juniper.net/support/downloads/?p=contrail#sw. See README Access to Contrail Networking Registry 20xx for appropriate release tags.

      2. Copy the install package to the node from where Ansible is deployed. Ensure that the node has password-free access to the OpenShift primary and slave nodes.

        scp contrail-ansible-deployer-release-tag.tgz openshift-ansible-node:/root/

      3. Log in to the Ansible node and untar the contrail-ansible-deployer-release-tag.tgz package.

        tar -xzvf contrail-ansible-deployer-release-tag.tgz -C /root/

      4. Verify the contents of the openshift-ansible directory.

        cd /root/openshift-ansible/

      5. Modify the inventory/ose-install file to match your OpenShift environment.

        Populate the inventory/ose-install file with Contrail configuration parameters specific to your system. The following mandatory parameters must be set.

        Note:

        The contrail_container_tag value for this release can be found in the README Access to Contrail Networking Registry 20xx file.

      Note:

      Juniper Networks recommends that you obtain the Ansible source files from the latest release.

      This procedure assumes that there is one primary node, one infrastructure node, and one compute node.

    3. Edit /etc/hosts to include all the nodes information.

    4. Set up password-free SSH access to the Ansible node and all the nodes.

    5. Run Ansible playbook to install OpenShift Container Platform with Contrail. Before you run Ansible playbook, ensure that you have edited inventory/ose-install file.

      For a sample inventory/ose-install file, see #installing-a-nested-red-hat-openshift-container-platform---cluster-using-contrail-ansible-deployer__sample_ose_install.

    6. Create a password for the admin user to log in to the UI from the primary node.

      Note:

      If you are using a load balancer, you must manually copy the htpasswd file into all your primary nodes.

    7. Assign cluster-admin role to admin user.

    8. Open a Web browser and type the entire fqdn name of your primary node or load balancer node, followed by :8443/console.

      Use the user name and password created in step 2.f to log in to the Web console.

      Your DNS should resolve the host name for access. If the host name is not resolved, modify the /etc/hosts file to route to the above host.

    Note:

    OpenShift 3.11 cluster upgrades are not supported.

Sample inventory/ose-install File

Note:

The /etc/resolv.conf must have write permissions.

Release History Table
Release
Description
1907
You can install a nested Red Hat OpenShift Container Platform 3.11 cluster along with Contrail Networking using Contrail Ansible deployer.