A teaser from the eBook OpenShift Primer, Get Your Code Into The Cloud

State of the OpenShift Union
Keine Kommentare

Traditionally in a ‚State of the Union‘ address, the head of a country will provide its citizens with an update on the current conditions within their country. Here we want to take you on a tour of demo applications that are freely available to you via the languages PHP, Perl, Ruby Python and more, which are supported by OpenShift at the time of this writing.

The list of applications, frameworks and demos is growing at an extremely quick rate, so there is no better way to check on the status of OpenShift than to browse their website, forums and code repository.

The examples provided are created in the command line tooling. Many of the steps provided can also be done with the web based console. This exercise however, is left to the reader. We want to provide the step by step details as to what is needed to create, install and run the given examples.

Password tip & trick

Before we dig into the various examples and projects that will follow in this chapter, it may be useful to show you a trick to avoid having to enter your account password with every single client tool command you enter. This is not a statement on the security and is not a means of password circumventing, but it is certainly convenient for both your testing and when presenting to an audience.

On a Unix based system, such as Linux or osX, you can create a file in the directory that holds your password; change the security setting on the file to protect this password (it is clear text) and then add a function to the command line settings. Once this has been done, you can run any client command for OpenShift and it will look up your password and not stop to ask you to enter it.

First you need to setup a file called ~/.openshift/.pass.txt that holds your rhcloud account user passwords as follows.

Note: This is a fake password used just as an example.

$ echo “98764password” > ~/.openshift/.pass.txt

Set this file to restricted.

$ chmod 600 ~/.openshift/.pass.txt

Add this function to your .bashrc file so that it is available any time you execute an ‚rhc‘ command.

function rhc() {

`which rhc` „$@“ -p „`cat ~/.openshift/.pass.txt`“

You can also specify:

-l $login


Now you can move on to the rest of the chapter; setting up, installing and destroying the examples as you need to without having to repeatedly enter your password.


Unsere Redaktion empfiehlt:

Relevante Beiträge

Benachrichtige mich bei
Inline Feedbacks
View all comments
- Gib Deinen Standort ein -
- or -