Appendix B. Deploying a working vSphere Environment (Optional)

To deploy a working vSphere environment on the deployment host, first prepare it.

# yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# yum install -y python2-pyvmomi
$ git clone -b vmw-3.9 https://github.com/openshift/openshift-ansible-contrib
$ cd openshift-ansible-contrib/reference-architecture/vmware-ansible/

Verify that the inventory file has the appropriate variables including IPv4 addresses for the virtual machines in question and logins for the Red Hat Subscription Network. All of the appropriate nodes should be listed in the proper groups: masters, infras, apps.

$ cat /etc/ansible/hosts | egrep 'rhsub|ip'
rhsub_user=rhn_username
rhsub_pass=rhn_password
rhsub_pool=8a85f9815e9b371b015e9b501d081d4b
infra-0  openshift_node_labels="{'region': 'infra'}" ipv4addr=10.x.y.8
infra-1  openshift_node_labels="{'region': 'infra'}" ipv4addr=10.x.y.9
infra-2  openshift_node_labels="{'region': 'infra'}" ipv4addr=10.x.y.13
app-0  openshift_node_labels="{'region': 'app'}" ipv4addr=10.x.y.10
app-1  openshift_node_labels="{'region': 'app'}" ipv4addr=10.x.y.11
...omitted...
$ ansible-playbook playbooks/prod.yaml

If an HAproxy instance is required it can also be deployed.

$ ansible-playbook playbooks/haproxy.yaml

This will provide the necessary nodes to fulfill Section 2.10, “vSphere VM Instance Requirements for RHOCP”