In the our last article on OpenStack and OpenShift we showed how you could setup these two large systems quickly and fast but on your local system. Now what if you wanted to use OpenStack to provide OpenShift capabilities to a set of users?

Well why not use the cloud?! So the idea in this post is to use OpenStack as a provider of a computation and storage (essentially a VM), quickly provision the VM and then through a quick set of commands have the VM ready to serve an OpenShift service. This is something that is done in the Mobile Cloud Networking project, where we use OpenShift as a means to provide a service orchestration capability for all types of services, including ones like EPC (evolved packet core) and IMS (IP Multimedia Subsystem).

So let’s get started!

First we need a VM and so you’ll need a friendly IaaS provider. Luckily, the ICCLab operates OpenStack and so for this exercise we’ll create a VM…

$ source $my_openstack_credentials
$ nova boot --flavor m1.large --image centos-6.5 --key-name my_key ops_aio

Once done you should assign a floating IP to this VM. Now that the VM is accessible, we’ll set things up for our puppet run. There is some pre-step (all could be puppetised) that need to be done, once having SSH’ed into the newly created host:

$ sudo -i

$ hostname

$ rpm -ivh 

$ echo "[openshift-origin-deps]
name=OpenShift Origin Dependencies - EL6
gpgcheck=0" &> /etc/yum.repos.d/openshift-origin-deps.repo

$ yum -y update --exclude kernel*
$ yum -y install libcgroup dbus puppet wget

$ sed -i 's/enforcing/permissive/g' /etc/selinux/config
$ setenforce 0

$ wget
$ tar xvf mcn_cc.tar.gz
$ rm -f mcn_cc.tar.gz

$ puppet apply --verbose --modulepath '/root/mcn_cc/modules' --manifestdir /root/mcn_cc/manifests --detailed-exitcodes /root/mcn_cc/manifests/site.pp

Once the run has completed you will be able to access the OpenShift service at $FL_IP. At this point you would be able to create various runtime containers (e.g. Python, ruby etc) but in order for this to completely work, you will need some control over DNS settings. Access details can be found in the puppet manifest. To create new users run this:

oo-register-user -l admin -p adminpass --username me --userpass mypass

The last and final step that you might want to do is to setup a wildcard DNS entry. You only need do this if you want to serve users from a domain name (e.g. that you have control over. The entry for bind would look like this:

 *.openshift      IN      A

By having this you will be able to access your applications under the domain, for example

Next up we’ll look at modifying this setup so a number of VMs are used to provide parts of the overall OpenShift system.