Doug Toppin's Blog

My thoughts on technology and other stuff

OpenShift Enterprise Running in VirtualBox Instances of RedHat Linux - Part 1

I’ve been doing some work with RedHat OpenShift Enterprise (http://www.redhat.com/products/cloud-computing/openshift-enterprise/) and thought that I would document a few tidbits that others might find useful. The configuration that I’m using is running VirtualBox on my MacBook Pro to host two instances of Red Hat Enterprise Linux Server release 6.4 (64bit), one for a broker and one for a node. It is useful/necessary to use static/predictable IPs with OSE because a dhcp environment can make things more difficult. VB can provide a dhcp server which will assign expected IPs to the Linux instances. However, I have the instances running in ‘Host-only Adapter’ mode so they are able to see each other but that does not allow access to the Internet which is necessary for yum repository access to update/install. A means of providing Internet access to the instances is to install SquidMan on the Mac which will provide a proxy facility. Configuring SquidMan was very easy and only involved setting the desired proxy port and adding the IPs of the Linux instances to the Clients list. Once SquidMan was ready I only needed to configure the Linux instances by editing /etc/rhsm/rhsm.conf (note that I am using subscription-manager and not rhn) to add the following:
  • proxy_hostname=192.168.56.1 (the VirtualBox assigned IP for the Mac)
  • proxy_port=8089 (the port I told SquidMan to use)
Then at the Linux shells I added the proxy env var with the following to enable curl and other utility access to the Internet.
export http_proxy=http://192.168.56.1:8089/
Assuming that everything configured correctly you should be able to use curl on the Linux instances to access a website with
curl http://www.google.com
Using the RedHat subscription-manager via this approach requires including the proxy info as an argument like this:
subscription-manager –proxy=192.168.56.1:8089 register
I will try to continue to add more updates on using OSE and all of the cool stuff that is possible with it.

Comments