This guide will show you how to deploy HTML5 Applications to Openshift.
- Java JDK6
- JBoss Developer Studio 5.0.0.M5
- Openshift client tools (https://openshift.redhat.com/app/express#install_client_tools)
Creating the Sample Project
Now, fill in the info for your project. We'll use myapp on this tutorial.
An Email containing a validation link should arrive at your mailbox.
You should accept the Openshift Terms and Conditions.
Voilà - your account should be ready.
We'll create a namespace for our apps (deploydemo on this tutorial) - When asked for a passphrase, just hit enter.
qmx@gondor ~ » rhc-create-domain -n deploydemo -l <your openshift account email> -a WARNING: Unable to find '/Users/qmx/.ssh/libra_id_rsa.pub' Your SSH keys are created either by running ssh-keygen (password optional) or by having the rhc-create-domain command do it for you. If you created them on your own (or want to use an existing keypair), be sure to paste your public key into the express console at http://www.openshift.com. The client tools use the value of 'ssh_key_file' in express.conf to find your key followed by the defaults of libra_id_rsa[.pub] and then id_rsa[.pub]. Password: Generating OpenShift Express ssh key to /Users/qmx/.ssh/libra_id_rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/qmx/.ssh/libra_id_rsa. Your public key has been saved in /Users/qmx/.ssh/libra_id_rsa.pub. The key fingerprint is: 29:3e:82:37:b7:e3:c8:a7:eb:77:3f:13:e3:f2:81:71 email@example.com The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | . | | . S E | | . . . +o | | . + + ...o | | o =+oo +. | | .**oo +oo | +-----------------+ Checking ~/.ssh/config Found rhcloud.com in ~/.ssh/config... No need to adjust Alteration successful.
Now let's create the application at Openshift.
You need to uncheck the "Create New Project" checkbox...
... and select our "myapp" project.
Openshift comes with some configurations, which need to be merged on our project.
As shown on the screenshot below, the default openshift application landing page is deployed.
We need to publish our application to Openshift to trigger a new deployment. OpenShift is convenientely represented by a WTP Server entry.
There we go! Our shiny new mobile webapp is successfully deployed!