With the base configurations for the virtual machine complete, start the virtual machine by selecting the machine from the VirtualBox Manager and clicking Start. This will attempt to boot the machine using the operation system media previously specified. A typical installation of the operating system can be completed without any special configurations. Ignore any configurations related to networking components as they will be manually configured after the installation completes. Choose an installation of a basic server when given the option as the OpenShift platform does not require the installation of a graphical user interface and the following instructions assumes a basic server has been installed.

With the installation of the operating system complete, we need to configure the networking components on each machine before additional configurations and the installation of OpenShift can be completed. The following instructions will cover how to configure both the broker and node virtual machines with the proper networking configuration to support the OpenShift environment. They are written for either Red Hat Enterprise Linux 5 or 6 or Fedora less than version 17.

First, let’s configure each of the network adapters. Navigate to /etc/sysconfig/network-scripts directory where we will be able to configure each network adapter. Interface eth0 represents the host-only network adapter and allows our guests to communicate with each other and with the host machine. VirtualBox provides a DHCP server to allocate IP addresses for machines configured host-only networking mode. We will configure each virtual machine with a static IP address that falls outside of the default assignable DHCP range (192.168.56.2-192.168.56.99) to ensure our machines consistently utilize the same network address.

For the purposes of this discussion, eth0 on each virtual machine will be configured with the following IP addresses:

Broker: 192.168.56.10

Node: 192.168.56.11

Make the following modifications on each machine to the file ifcfg-eth0

Next, we will configure the second adapter, configured using NAT networking mode, to connect to external resources on the Internet. Typically, adapters using NAT are configured in a 10.0.2.0 network. However, since the machines utilize NAT as their second adapter, it will instead use the 10.0.3.0 network. Within each NAT network, VirtualBox allocates a default set of IP addresses to provide key resources for virtual machines. The following lists these resources:

Default guest IP address: 10.0.x.15

Default DNS: 10.0.x.3

Default Gateway: 10.0.x.2

Each machine configured in a NAT configuration is isolated from other virtual machines which allows for the reuse of the same IP address across multiple virtual machines. Configure the eth1 interface of each machine to utilize the 10.0.3.15 IP address by editing the contents of the ifcfg-eth1file as follows:

Next, we will configure our virtual machines to connect to the Domain Name System (DNS) by modifying the resolver configuration file located at /etc/resolv.conf. We will utilize the Google Public DNS to support our virtual machines. Configure the resolver file with the following:

nameserver 8.8.8.8

Finally, we need to configure the virtual machines to connect to external networks by configuring the default gateway address. As mentioned earlier, the default gateway for the NAT networking mode is located at 10.0.x.2. Add the following line to the network configuration file located at /etc/sysconfig/network

GATEWAY=10.0.3.2

Once these configurations have been applied, restart the virtual machines for the settings to take effect.

With the configurations in place, lets go ahead and validate connectivity. First, ping each guest machine from the host machine by opening up a terminal on the host machine and running the following commands:

# ping 192.168.56.10
# ping 192.168.56.11

If the command returns a response and no time outs are indicated, host-only networking has been successfully configured. To validate NAT connectivity, we can first attempt to ping the Google Public DNS server configured earlier, then attempt name resolution against this server. From each guest machine, issue the following command to ping the Google Public DNS server:

# ping 8.8.8.8

A successful response indicates the default gateway is properly applied. To validate name resolution, attempt to resolve the IP address of google.com using the host command:

# host google.com

A response similar to the following indicates DNS configurations have been applied successfully.

At this point, both virtual machines representing the broker and node instances for an OpenShift environment have been initially configured. To continue the full installation of OpenShift, consult the deployment guide which will describe the steps for installing and configuring OpenShift for your newly created virtual environment.