OpenShift is a cloud solution for your application server requirements. OpenShift Express in particular is a free, cloud-based application platform for Java, Perl, PHP, Python, and Ruby applications. JBoss Developer Studio supports OpenShift Express and this guide will show you how to connect, create and deploy with OpenShift Express from your JBoss Developer Studio workbench.
From the workbench go to
→ → .In the wizard, go to and select
→ . With the wizard choice selected, click on the button.If you have already signed up for an OpenShift Express account then you can input your Username and Password here and click Validate. If validation is successful you will see the button is now unavailable and no error was presented.
If you do not have an OpenShift Express account, you can create one through the link at the top of the wizard screen. This will open the OpenShift sign-up page within your workbench. Once you have created an account you will need to relaunch the OpenShift Express Application wizard and input your new username and password.
Click the
button to proceed.If you already have a domain name then you can type this into the Domain name field.
If you need to create a domain, type the name you wish to have into the Domain name field and click the button. After clicking , you will need to provide your public SSH key. You will need to ensure that the paired private key is listed within the SSH2 Preferences. If you are unsure, click the SSH2 Preferences link in the window. Click to complete domain creation.
If you ever wish to rename your domain, you can do so by changing the name as it appears in the Domain name field and then click .
Click the Available Applications section of the wizard to begin creating your first OpenShift application for the specified domain.
in theYou will need to specify a name for the application and the platform to deploy for, from the Cartdige drop-down list. Click the to embedd cartridges or click to create the application.
No underscores or special characters are allowed in the application name.
If you clicked Embed Cartridges screen. From here you can choose to embed any numbe rof cartridges, or none. Once you have finished your selection click .
, you will now see theThe Embed Cartridges screen can also be access by highlighting a project in the Available Applications section of the Application Selection screen and clicking on the button. To embed your application with a cartridge is to grant the capability to your application. For example, embedding the mysql cartridge will grant your application the capability to use a MySQL database.
You can select an available application by clicking on it in the Available Applications section of the window. Having selected an application, you can now or view the details of the application by clicking the ; try that now.
The Application Details will provide you with all the information available concenring the application. To close this window and return to the previous window, click .
Click the
to proceed to the next screen.The final screen of the OpenShift application wizard specifies Git clone settings and JBoss Server adapter options.
In the Git clone section of the window sets the properties for creating a local copy of your application for you to work with. The location of your application in the Git repository of your domain is present in the Cloning From field. The Destination and Remote name options will be set to default automatically, however you are able to change these by deselecting the default option and specifying custom settings in the fields provided.
The JBoss Server adapter section of the window will have the option to Create a JBoss server adapter selected automatically. Creating a JBoss server adapter will allow you to publish changes you make to your application, back to your OpenShift Express domain.
Click the
to begin the cloning of the Git repository.After the Git repository has been cloned, you will see a new Git Repositories tab appear near the bottom of your workbench. If you do not see the tab you can open it manually by navigating to → → → → . With the Git Repositories option selected, click .
The OpenShift application that you created through the wizard, will appear in your Package Explorer tab.
The wizard has also created a server adaptor that connects to your OpenShift service. In the Servers tab there will be an OpenShift server available that contains your application. Any changes you make locally to the application can be published to your OpenShift instance by right-clicking on the application under the server in the Servers view, and selecting .
As with a local server, double-clicking on the OpenShift server instance in the Servers tab will open the server overview page in your workbench.