In the previous post I've explained in short what OpenShift is about and how you can use it. In this post I'll go a bit further in how to use the OpenShift origin framework in a private pass environment. I'll do this by creating an application based on the "Do it yourself" cartridge. Step 1 Download the OpenShift origin image and install it in a virtual image manager. As virtual image manager you can use kvm or VirtualBox. I'm currently using kvm, as it takes a lot less resources of my system.
ssh openshift@$IP_OPENSHIFT_VMwhere $IP_OPENSHIFT_VM is the IP address of the virtual machine and the default password is also 'openshift'. After that you can directly create an application with the RedHat command line tools. Use the following to create a domain:
rhc domain create -n cloudit -l adminAnd to create the first application within the cloudit domain:
rhc app create -a firstapp -t php-5.3RedHat command line tools local. After installation run
rhc setupAfter that you will find under ~/.openshift/ a file named 'express.conf'. Edit that file with your favorite editor and change the libra_server value with you $IP_OPENSHIFT_VM. Step 4 You still must add your public ssh key to the OpenShift server by adding:
rhc sshkey add -k ~/.ssh/id_rsa.pub -i host --config ~/.openshift/express.confAfter that you can check your own domain status from your local development machine using:
rhc domain showStep 5 Now you can create any application on your OpenShift private paas using the command line tools without first using ssh. So for example you could run:
rhc app create -a deploy -t diy-0.1which will give you a Do it Yourself application, that can be accessed using your web browser at https://deploy-cloudit.example.commeetup