-
Notifications
You must be signed in to change notification settings - Fork 7
OpenShift Enterprise with Contrail Networking
-
Register all nodes in cluster using Red Hat Subscription Manager (RHSM)
(all-nodes)# subscription-manager register --username <username> --password <password> --force
-
List the available subscriptions
(all-nodes)# subscription-manager list --available --matches '*OpenShift*'
-
From the previous command, find the pool ID for OpenShift Container Platform subscription & attach it
(all-nodes)# subscription-manager attach --pool=<pool-ID>
-
Disable all yum respositories
(all-nodes)# subscription-manager repos --disable="*"
-
Enable only the repositories required by OpenShift Container Platform 3.6
(all-nodes)# subscription-manager repos \ --enable="rhel-7-server-rpms" \ --enable="rhel-7-server-extras-rpms" \ --enable="rhel-7-server-ose-3.6-rpms" \ --enable="rhel-7-fast-datapath-rpms"
-
Install the base packages
(all-nodes)# yum install wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct -y (all-nodes)# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && rpm -ivh epel-release-latest-7.noarch.rpm (all-nodes)# yum update -y
-
Update the system to the latest packages
(all-nodes)# yum update -y
-
Install the following package, which provides OpenShift Container Platform utilities
(all-nodes)# yum install atomic-openshift-utils -y
-
Install atomic-openshift and docker packages
(all-nodes)# yum install atomic-openshift-excluder atomic-openshift-docker-excluder -y
-
Remove the atomic-openshift packages from the list for the duration of the installation
(all-nodes)# atomic-openshift-excluder unexclude -y
-
Enable SSH access for root user
(all-nodes)# sudo su (all-nodes)# passwd (all-nodes)# sed -i -e 's/#PermitRootLogin yes/PermitRootLogin yes/g' -e 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config (all-nodes)# service sshd restart (all-nodes)# logout Logout & login as root user
-
Enforce SELinux security policy
(all-nodes)# vi /etc/selinux/config SELINUX=enforcing
-
Add a static entry for master/slaves in /etc/hosts
(ansible-node)# vi /etc/hosts 10.84.18.1 master.test.net master 10.84.18.2 slave.test.net slave (ansible-node)# ping master (ansible-node)# ping slave
-
Enable passwordless SSH access
(ansible-node)# ssh-keygen -t rsa (ansible-node)# ssh-copy-id root@<master> (ansible-node)# ssh-copy-id root@<slave>
-
Download Contrail-Docker images
IMAGES: contrail-kubernetes-docker-images_4.0.1.0-28.tgz (Ubuntu 14.04)
Download from here
(all-nodes)# wget http://10.84.5.120/cs-build/jenkins-jobs/CB-R4.0-redhat70-newton/builds/44/archive/packages/contrail-kubernetes-docker_4.0.1.0-44_readhat7.tgz -P /root/docker_images && cd /root/docker_images && tar -xvzf contrail-kubernetes-docker_4.0.1.0-44_readhat7.tgz
-
Clone OpenShift-Ansible repo
(ansible-node)# cd /root (ansible-node)# git clone https://github.com/openshift/openshift-ansible (ansible-node)# git clone https://github.com/savithruml/openshift-contrail
-
Copy the install files
(ansible-node)# cp /root/openshift-contrail/openshift/install-files/all-in-one/ose-install openshift-ansible/inventory/byo (ansible-node)# cp /root/openshift-contrail/openshift/install-files/all-in-one/ose-prerequisites.yml openshift-ansible/inventory/byo
-
Populate the install file with Contrail related information
Example here
(ansible-node)# vi /root/openshift-ansible/inventory/byo/ose-install [OSEv3:vars] ... deployment_type=openshift-enterprise openshift_release=v3.6 openshift_use_openshift_sdn=false os_sdn_network_plugin_name='cni' openshift_use_contrail=true os_release=redhat7 contrail_version=4.0.1.0-44 vrouter_physical_interface=eno1 contrail_docker_images_path=/root ...
-
Run the ansible-playbook. This will install OpenShift Container Platform with Contrail Networking
(ansible-node)# cd /root/openshift-ansible (ansible-node)# ansible-playbook -i inventory/byo/ose-install inventory/byo/ose-prerequisites.yml (ansible-node)# ansible-playbook -i inventory/byo/ose-install playbooks/byo/openshift_facts.yml (ansible-node)# ansible-playbook -i inventory/byo/ose-install playbooks/byo/config.yml
-
Verify Contrail SDN came up fine
(master)# oc get ds -n kube-system (master)# oc get pods -n kube-system
© Savithru M Lokanath, Juniper Networks Inc.