How to Find and Install OpenShift rhc tools on Fedora

The other day I set out to write a post on getting a WordPress instance running on OpenShift.  I got sidelined in the confusion of determining the best place to install `rhc` tools from.

I’m trying to be more deliberate about using OpenShift and blogging about about my experiences along the way.  I myself, prefer more detailed, step-by-step guides and that is what I plan to writer here.

Stay with upstream for now

The best place to currently get rhc tools is from the openshift.redhat.com repo.  I’m told this is because they change a lot and the versions in Fedora don’t get updated as often because of the updates approval process (that’s not a knock on the Fedora process–OpenShift follows Fedora’s process and policies just like everyone else and updates Fedora as time permits).

rubygem-rhc

rhc tools is available in Fedora 14 through 17 and known as `rubygem-rhc.`  Setting aside the technical or policy reason why the package name is this way, it always bugs me when a trip to Google is required to determine the package named to`yum install` something this simple.  It’s definitely not as obscure as 7zip.

Install rhc tools

Below is the essence of what you need to do.  Alternatively you can follow OpenShift’s getting started instructions which felt less efficient to me.

1) Set up the yum repo.  As root,

# cd /etc/yum.repos.d
# wget https://openshift.redhat.com/app/repo/openshift.repo

If you prefer to configure the OpenShift repo by hand, as root, put the following in a separate file (with a name ending in .repo, for example openshift.repo) in /etc/yum.repos.d:

[openshift]
name=OpenShift
baseurl=https://openshift.redhat.com/app/repo/rpms/$releasever/$basearch/
failovermethod=priority
skip_if_unavailable=1
gpgkey=https://openshift.redhat.com/app/repo/RPM-GPG-KEY-redhat-beta
ggpkey=https://openshift.redhat.com/app/repo/RPM-GPG-KEY-redhat-release
enabled=1
gpgcheck=1

2) Install rhc tools

$ su -c 'yum install rhc'

 

UPDATE: A new page has been added to the OpenShift Developer center clarifying this process for each operating system.  It’s better than my steps above.

 

 

6 thoughts on “How to Find and Install OpenShift rhc tools on Fedora

  1. Hi, is there a yum repo for Fedora 17 – using the repo described above gives me an 404 error, and replacing the $releasever with a hard coded “16” gives me dependency errors with ruby.

    • Thanks Johannes. This is a known issue and there is a bug tracking it which is bug #826808

      In the meantime I believe you can install the version that is in the Fedora 17 repos by doing a ‘yum install rubygem-rhc’ or do a ‘yum search rhc’ as suggested in a previous comment. I’m sorry, I don’t have a Fedora 17 instance handy at the moment.

  2. Pingback: Fedora Utils – Install Codecs, Drivers and Fonts in Fedora 17 – Smashing Web

  3. I must disagree ! I’m the maintainer of rubygem-rhc for Fedora and EPEL. ;) I’have been following upstream as close as possible without Fedora/EPEL guidelines breakage. The actual rubygem-rhc for Fedora is synced with rubygems.org version at 0.91.12, that includes EPEL6 repo.

    Often updates? Try a look at https://admin.fedoraproject.org/updates/rubygem-rhc

    At Fedora we have a couple of testers that allows me to push as quickly as Openshift delivers theirs gem version, actually 2 days at minimum, so the effort to manually configure their repo is not worthy, not to talk about little bugs found on my way reviewing theirs gem version in the past ;)

    About the package name, well yes its a little pain, but it can be mitigated with some smart yum usage:

    $ yum search rhc

    No need to google it :)

    • Thanks for your comments. I appreciate the packaging and work you do to maintain rhc tools in Fedora. You do have a point about it being easier to get the packages straight from Fedora.

      I was approaching from the perspective of being on the bleeding edge and being able take advantage of the latest enhancements to the online offering via the client tools immediately.

      I heard recently that for a regular user (like me?) staying on this bleeding edge may not be that necessary. I’ll try to clarify things once I have a better understanding.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>