The following section describes my experiment on how to add a NEW NODE into your existing OpenShift cluster.
It is NOT LOGICAL to have a heterogenous setup.
This means it is very difficult to have a master in AWS for example, and have a node in Azure. The reason being, internal IPs are very important for VM-to-VM communication which mimics the behaviour of a DataIP setup.
As far as my testing went thru, I cannot rely on external IP alone. So let's keep our setup within the same Cloud Provider group.
So the plan is to re-use the Ansible inventory file you ran, when you installed the OpenShift in the old master and old node. Just add a new section in your ansible file:
[new nodes]
NOTE!
1 - The VM boxes should be able to login to each other passwordless.
2 - You still need to do pre-work for the newly-created VMs, as explained in --> https://gist.github.com/melvz/df19999c64f2c7fd817973b7a89042a7
# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes
# Set variables common for all OSEv3 hosts
[OSEv3:vars]
ansible_user=root
ansible_become=true
openshift_master_default_subdomain=35.198.131.7.xip.io
openshift_deployment_type=origin
openshift_release=v3.6.0
deployment_subtype=registry
containerized=true
# disable strict production setup check
openshift_disable_check=docker_storage,memory_availability
# enable htpasswd auth
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
#openshift_master_htpasswd_users={'admin': '$apr1$zgSjCrLt$1KSuj66CggeWSv.D.BXOA1'}
# host group for masters
[masters]
35.198.131.7
[etcd]
35.198.131.7
# host group for worker nodes, we list master node here so that# openshift-sdn gets installed. We mark the master node as not schedulable.
[nodes]
35.198.131.7
openshift_node_labels="{'region': 'infra', 'zone': 'default'}" openshift_schedulable=true
#