Monthly Archives: February 2012

Full list of applications/cartridges supported on OpenShift Express

In my last post we created a sample PHP application with no content, no files, no nothing!

Just in case you want to create another kind of applications, here’s the full list of what is supported right now:

  • python-2.6
  • jenkins-1.4
  • ruby-1.8, raw-0.1
  • php-5.3
  • jbossas-7.0
  • perl-5.1

Remember how to create an application:

rhc-create-app -a <appname>  -t <apptype>

And here’s the list of all the cartridges supported in those applications:

  • mongodb-2.0
  • cron-1.4
  • mysql-5.1
  • postgresql-8.4
  • 10gen-mms-agent-0.1
  • phpmyadmin-3.4
  • metrics-0.1
  • rockmongo-1.1
  • jenkins-client-1.4

And a quick remember of how to add a cartridge:

rhc-ctl-app  -a <appname> -e add-<cartridge>

How to setup OpenShift Express with RHEL

If you don’t know what’s OpenShift you should check it out at Red Hat site, and for further reference also take a look to their documentation, blogs and knowledge base:

Things to take into account:
  • We have 512 MB of disk space
  • We have 300 MB of RAM and 100 MB of swap
After this briefly introduction, in order to setup OpenShift in our machine we have to install a new channel as usual and set up EPEL/Openshift repositories(this demo is based in RHEL 6.2):
rhn-channel -a -c rhel-x86_64-server-optional-6
rpm -ivh
wget -O /etc/yum.repos.d/openshift.repo
yum install rhc -y
Now we just have to create our domain and our PHP application:
 rhc-create-domain -n  -l 
 rhc-create-app -a  -t php5.3

For example, my domainname is prova and my appname is mw, so my service URL is:

Next step is set up our embedded database. Take note of your mysql admin password and connection URL:
rhc-ctl-app  -a mw -e add-mysql-5.1
 Mysql 5.1 database added. Please make note of these credentials:
 Root User: admin
 Root Password: xxxxxxx
 Database Name: mw
 Connection URL: mysql://127.6.x.y:3306/

Finally we’ll need to configure a demo wikipedia/wordpress in our OpenShift Express application with MySQL support, stay tuned for my next post 😉


Single Sign On in RHEV3 using GDM and Active Directory

As per my previous post we should have Active Directory up and running in our RHEV-M.

So how about setting up SSO on our RHEL guests? In order to do that we should follow this simple procedure.

First of all we need to install our rhev agent that is found in a special channel and winbind client:

rhn-channel --add --channel=rhel-x86_64-rhev-agent-6-server
yum install rhev-agent rhev-agent-gdm-plugin-rhevcred samba-winbind-clients

Next of all we need to activate AD authentification on our guest, for example (RHEVM is our test Domain):

  User Account => Winbind
  Winbind Domain => RHEVM
  Security Model => ads
  Winbind ADS Realm => RHEVM
  Winbind Domain Controller => ad.rhevm.test
  Template Shell => /bin/bash
  Join Domain  => Joined domain RHEVM.

If is not working double check your configuration files and DNS resolution:


And finally, just in case, check that winbind is properly working, we could check some users/groups for example:

wbinfo -t
wbinfo -u
wbinfo -g
getent passwd "RHEVM\testuser"

As a last step, check that we can login/sudo with an AD user on this guest:

su - 'RHEVM\testuser'
ssh 'RHEVM\testuser'@localhost

Finally restart GDM daemon and rhev-agent service:

service rhev-agentd restart
pkill -f gdm-binary

And try to Single Sign On through GDM! It should work!

If it doesn’t work put in debug mode rhev-agent and try to figure out why is not working:

vi /etc/rhev-agent.conf
service rhev-agentd restart
tail -f /var/log/rhev-agent/rhev-agent.log

How to connect RHEV 3.0 IPA to Active Directory?

In a default installation we have two methods of authentication:

But, how about connecting our IPA to an Active Directory? Piece of cake! We just need to add it through the command line:
rhevm-manage-domains -action=list
rhevm-manage-domains -action=add -domain='your.nice.domain' -user='' -interactive
service jbossas restart
After that we can check that our Active Directory is correctly up and running, trying to connect it through:
rhevm-manage-domains -action=list
rhevm-manage-domains -action=validate
If it validates, all should be fine! Just try to log in with your admin IPA user and set up some users/perms from your AD, and then just authenticate with your user/pass of the AD.
If it doesn’t work just take into account:
  1. Remember to restart jbossas service after setting up your AD domain!
  2. On the UserPortal/RHEVManager remember to select the correct domain from the combobox!
  3. If you can add your AD domain, did you try to add it with another administration user of your AD?
And just in case you just broke IPA and don’t remember your internal admin password ([email protected]), you can change it through:
rhevm-config -s AdminPassword=<newpassword>
service jbossas restart