Openshift with NSX-T Installation Part 4: Openshift Installation

In this article, we will use Ansible to install Openshift 3.9.

On the Master node:

nano /usr/share/ansible/openshift-ansible/roles/lib_utils/action_plugins/sanity_checks.py

add then (‘openshift_use_nsx’,False.

Screen Shot 2018-05-15 at 4.36.44 PM

cd /root

wget https://raw.githubusercontent.com/vincenthanjs/openshift-nsxt/master/hosts

cp hosts /etc/ansible/ -f

cd /etc/ansible/

htpasswd -c /root/htpasswd admin

If the above URL does not work. you can copy and paste the below into /etc/ansible/hosts

#This is the file you replace on /etc/ansible/hosts

# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes

# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root
ansible_ssh_pass=VMware1!
openshift_master_default_subdomain=ocpapps.acepod.com

os_sdn_network_plugin_name=cni
openshift_use_openshift_sdn=false
openshift_use_nsx=true
openshift_node_sdn_mtu=1500
openshift_enable_service_catalog=true

# If ansible_ssh_user is not root, ansible_become must be set to true
#ansible_become=true

openshift_deployment_type=openshift-enterprise
#openshift_deployment_type=origin
openshift_disable_check=docker_storage,docker_image_availability
openshift_disable_check=memory_availability,disk_availability,docker_storage,docker_image_availability,package_version

# uncomment the following to enable htpasswd authentication; defaults to DenyAllPasswordIdentityProvider
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_master_htpasswd_file=/root/htpasswd

# host group for masters
[masters]
ocp-master  ansible_ssh_host=10.11.1.10

# host group for etcd
[etcd]
ocp-master  ansible_ssh_host=10.11.1.10

# host group for nodes, includes region info
[nodes]
ocp-master  ansible_ssh_host=10.11.1.10
ocp-node01  ansible_ssh_host=10.11.1.11
ocp-node02  ansible_ssh_host=10.11.1.12

[nsxtransportnodes:children]
masters
nodes
[root@ocp-master ~]#

ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/prerequisites.yml

Screen Shot 2018-05-15 at 3.50.28 PM

 

You will get warning message but that should be alright.

Screen Shot 2018-05-16 at 10.41.03 AM

Before we continue to run the next script, we need to install the nsx container plugins. Before that we already have the NSX container download in the /root.

You have to do the below on every node.

cd /root/nsx-container-2.1.3.8356796/OpenvSwitch/rhel74_x86_64

yum install *.rpm -y

Screen Shot 2018-05-16 at 4.00.17 PM

You have to do the below on every node.

cd /root/nsx-container-2.1.3.8356796/Kubernetes/rhel_x86_64

yum install *.rpm -y

Screen Shot 2018-05-16 at 4.24.57 PM

Now we can run the deploy script. On the Master Node, run the following

ansible-playbook  /usr/share/ansible/openshift-ansible/playbooks/deploy_cluster.yml

It will take about 30 minutes to complete the install by the ansible playbook. Your mileage will vary.

You will see some error messages on the Web Console. This is because of the NSX-T integration have not been set up and therefore the error.

Screen Shot 2018-05-16 at 5.17.57 PM

The next check that the openshift installation is successful is to do the following commands.

As you can see now you can use the openshift commands such as

oc get pods –all-namespaces

Screen Shot 2018-05-16 at 5.21.24 PM

systemctl status openvswitch

Screen Shot 2018-05-16 at 5.37.33 PM