I Built My Own Open Source PaaS – You Can Too!

I’ll be frank, I’ve become a great fan of the OpenShift Platform-as-a-Service (PaaS) from Red Hat, especially since it was open sourced as OpenShift Origin a few months ago. When I started to take look at the code, I was amazed with the way things worked together and the architecture behind it. Although, let’s be honest, it’s still in the process of maturing and will no doubt grow fast with quality contributions from the community.

After reading up on all the great OpenShift documentation I decided to take a shot at deploying my own PaaS. I followed the OpenShift Origin guide that can be found here and did the setup with ease. I was amazed at how easy and the smooth the install and configuration was. Since the guide was geared mostly towards an earlier release of OpenShift Origin ISO, I thought I’d share what I learned when I tried setting up OpenShift Origin with the new ISO which was released last week. The changes are an extension of sorts to the original guide, except that I did some additional things and skipped a few instructions to make it work as expected.

  • Updates to the original guide
    1. We might not need to do the OpenShift client configuration as mentioned in the guide as the new OpenShift Origin has the express.conf in place out of the box
    2. With the new OpenShift Origin image we need to be very careful when removing the unwanted packages, as some packages tend to remove the OpenShift and Ruby packages which are listed as a dependencies of the packages being removed. Here is he right set of unwanted packages that could be safely removed:
      sudo yum remove aisleriot brasero cheese deja-dup duplicity empathy eog festival gnome-backgrounds gnome-contacts gnome-games icedtea-web libpurple orca shotwell simple-scan tracker transmission-common vinagre vino
    3. Update of /etc/stickshift/stickshift-node.conf for the variable PUBLIC_HOSTNAME which by default points to default host name e.g broker.example.com update that to your new FQN host name. This is because of the update that happened to the new version. Check this blog for more information on the updates for the new release. The earlier version of OpenShift Origin was using the oddjob plugin, but it now uses the mcollective plugin so the /usr/lib/ruby/gems/1.8/gems/gearchanger-oddjob-plugin-0.8.4/lib/gearchanger-oddjob-plugin/gearchanger/oddjob_application_container_proxy.rb is no longer available. Instead it uses /usr/lib/ruby/gems/1.8/gems/gearchanger-mcollective-plugin-0.2.1/lib/mcollective_application_container_proxy.rb. Though the method name remains the same as per the guide, how the values are retrieved has changed a bit, the method get_public_hostname now delegates the call to rpc_get_fact_direct(‘public_hostname’) which in turns looks up the value for the ‘public_hostname‘ in the /etc/stickshift/stickshift-node.conf#PUBLIC_HOSTNAME

After the above steps try restarting the stickshift services stickshift-broker and stickshift-proxy to refresh changes, and you are good to have a new host name for your PaaS now 🙂

  • Virtualization updates (VMware Workstation)
    I did the setup using VMware 8.0.4 on Linux. You might need to do few things before you get started especially if you want to enable the Host-Guest file sharing, copying etc. It’s a very normal thing for people who use VMware tools. The OpenShift origin CD comes with gcc and other packages, but we need to install kernel-headers and kernel-devel to make the VMWare installation smooth. Here is the sequence of steps I followed. This assumes you have installed OpenShift Origin to a hard drive and rebooted.

    1. Remove the ruby updates as suggested by the guide
    2. Now do a yum update to update the kernel and other packages, don’t do a yum install of kernel-headers and kernel-devel before you’ve updated the kernel version or the kernel header version will not match hence the VMWare tools configuration may not be done properly
    3. Do a reboot of the system to make sure the kernel-headers are added to the path. You should now be ready to install the VMware tools.

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s