(This article is in progress and is not definitive until this WARNING exists)
Step 1: Get access to Red Hat OpenShift Platform
If you are a new user, you need to sign up for a RHN account. All the regular registration and you should see an email in your inbox.
(If you already have a RHN account, you can just sign in)
Step 2: Install the Client Tools for your platform
RPM based system such as RHEL or Fedora
$ sudo vi /etc/yum.repos.d/openshift.repo $ $ sudo yum install rhc ..... Installed: rhc.noarch 0:0.75.9-1.el6_1 Dependency Installed: compat-readline5.i686 0:5.2-17.fc12 ruby.i686 0:188.8.131.522-1.fc14 ruby-irb.noarch 0:184.108.40.2062-1.fc14 ruby-libs.i686 0:220.127.116.112-1.fc14 ruby-rdoc.noarch 0:18.104.22.1682-1.fc14 rubygem-json.i686 0:1.4.3-2.fc14 rubygem-parseconfig.noarch 0:0.5.2-3.fc14 rubygems.noarch 0:1.3.7-2.fc14 Complete!
[openshift-express] name=Openshift-express 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
Non-rpm based systems (Windows,Ubuntu,Mac etc)https://www.redhat.com/openshift/kb/kb-e1000/installing-openshift-express-client-tools-on-non-rpm-based-systems
Step 3: Create a sub domain
A sub-domain will provide you a url such as mysubdomain . rhcloud . com
NOTE: Do not try to use a sub-domain that may be blacklisted. Subdomains such as hibernate, picketlink etc are unavailable.
$ rhc-create-domain -n anilsaldhana -l asaldhan Password: OpenShift Express key found at /home/anil/.ssh/libra_id_rsa. Reusing... Contacting https://openshift.redhat.com Creation successful You may now create an application. Please make note of your local config file in /home/anil/.openshift/express.conf which has been created and populated for you.
You may be asked to enter a password for the keypair OpenShift creates for you.
Step 4: Create an application space
In my example, I created an application space called "sso"
$ rhc-create-app -a sso -t jbossas-7.0 Password: Found a bug? Post to the forum and we'll get right on it. IRC: #openshift on freenode Forums: https://www.redhat.com/openshift/forums Attempting to create remote application space: sso Contacting https://openshift.redhat.com API version: 1.1.1 Broker version: 1.1.1 RESULT: Successfully created application: sso Checking ~/.ssh/config Contacting https://openshift.redhat.com Found rhcloud.com in ~/.ssh/config... No need to adjust Now your new domain name is being propagated worldwide (this might take a minute)... Pulling new repo down Warning: Permanently added 'sso-anilsaldhana.rhcloud.com,22.214.171.124' (RSA) to the list of known hosts. Enter passphrase for key '/home/anil/.ssh/libra_id_rsa': Confirming application sso is available Attempt # 1 Success! Your application is now published here: http://sso-anilsaldhana.rhcloud.com/ The remote repository is located here: ssh://firstname.lastname@example.org/~/git/sso.git/ To make changes to your application, commit to sso/. Then run 'git push' to update your OpenShift Express space anil@localhost:~$
Now you should see a local directory called "sso" with a deployment directory and a README file.
Now is the time to sit (with a cup of coffee) and read the README file. Particularly the section on zipped war deployments or unzipped deployments with the .dodeploy suffix.
Other Useful Information
Delete an Application Space
Assume you created an application space called "sales" and you hate it. You can delete it as:
$ rhc-ctl-app -c destroy -a sales Password: Contacting https://openshift.redhat.com !!!! WARNING !!!! WARNING !!!! WARNING !!!! You are about to destroy the sales application. This is NOT reversible, all remote data for this application will be removed. Do you want to destroy this application (y/n): y Contacting https://openshift.redhat.com API version: 1.1.1 Broker version: 1.1.1 RESULT: Successfully destroyed application: sales
Can I configure standalone.xml on express?
It should be under .openshift/config of your application space.
~/sso/.openshift/config$ ls standalone.xml