A JBoss Project
Red Hat

How To:

Create Your First OpenShift Online App

OpenShift Tools provides an all-in-one New OpenShift Application wizard for creating new OpenShift applications from templates and existing projects. This wizard is the starting point for creating all new OpenShift Online applications from the IDE and also for importing OpenShift Online applications to your workspace.

The New OpenShift Application wizard is an ideal starting point for new users to OpenShift and OpenShift Tools as it guides you through all the steps necessary to set up the IDE to use your OpenShift Online account and configure your account ready for applications.

The instructions here demonstrate how to use this wizard and a default OpenShift application template to create a basic OpenShift Online application. This includes one-time steps, such as signing up for an OpenShift Online account, creating an OpenShift Online domain and uploading SSH keys. If you have previously used OpenShift Online or OpenShift Tools, you can omit unnecessary one-time steps as appropriate.

Start the New OpenShift Application Wizard

  1. In JBoss Central, under Start from scratch, click OpenShift Application.

Sign up for an OpenShift Online Account

If you do not have an OpenShift Online account, you should complete the following steps:

  1. Click the link provided to sign up for an OpenShift account and follow the instructions on the OpenShift website.

    Link to sign up for a new OpenShift Online user account
    Figure 1. Link to Sign up for a New OpenShift Online User Account
  2. When you have completed the sign-up process, restart the OpenShift Application wizard from JBoss Central.

Connect to OpenShift Online

  1. Complete the fields about your OpenShift Online account as follows:

    • From the Connection list, select New Connection.

    • Ensure the disabled Server field states https://openshift.redhat.com.

    • In the Username and Password fields, type your account credentials.

      Completed OpenShift Online connection fields
      Figure 2. Connection Information Provided for OpenShift Online Account
  2. Click Next.

Enable Communication between the IDE and OpenShift

If your OpenShift Online account has no SSH public keys stored, you are prompted with the Add SSH Keys wizard and you should complete the following steps:

  1. Click New.

  2. Complete the fields about the SSH Keys to be created as follows:

    • In the Name field, type a name for the SSH key pair.

    • From the Key Type list, ensure SSH_RSA is selected.

    • In the SSH2 Home field, ensure your .ssh directory path is correct.

    • In the Private Key File Name field, type a name for the private key file name. The Public Key File Name field populates automatically with the name of the private key file name with .pub appended.

      Completed new SSH key fields
      Figure 3. New SSH Key Information for OpenShift Online Provided
  3. Click Finish.

  4. Click Finish to close the Add SSH Keys window.

Create a Domain

If your OpenShift Online account has no domains, you are prompted with the Create Domain wizard and you should complete the following step:

  1. In the Domain Name field, type an alphanumeric name for your new OpenShift Online domain and click Finish. The provided domain name must be unique across all domains on OpenShift Online; if it is not unique, you are directed back to the Create Domain window to provide a unique domain name.

    Completed new OpenShift Online domain field
    Figure 4. New OpenShift Domain Name Provided

Provide Essential New Application Details

  1. Complete the fields about the type of OpenShift application you want to create as follows:

    • Ensure Create a new OpenShift application is selected.

    • Expand Basic Cartridges and select JBoss Application Server 7.

      JBoss Application Server 7 selected as the Basic Cartridge
      Figure 5. Basic Cartridge Selected for the New OpenShift Online Application
  2. Click Next.

  3. Complete the fields about your OpenShift application as follows:

    • Ensure the Domain field displays the OpenShift Online domain with which you want to host your application.

    • In the Name field, type an alphanumeric name for your application.

    • From the Gear profile list, select small.

    • Select the Enable scaling check box.

      Completed new OpenShift application fields
      Figure 6. New OpenShift Application Information Provided
  4. Click Next.

Configure the Corresponding Workspace Project for the New Application

  1. Complete the fields about the corresponding workspace project as follows:

    • Ensure the Create a new project check box is selected.

    • Ensure the Create and set up a server for easy publishing check box is selected. This automatically creates an OpenShift server adapter for the application, enabling you to easily publish project changes to the OpenShift server.

  2. Click Next.

  3. Ensure the location in the Git Clone Destination field corresponds to where you want to make a local git repository for the project source code.

    Default Git clone destination check box selected
    Figure 7. Git Clone Destination Specified

Create the OpenShift Online Application

  1. Click Finish for the wizard to start generating the new OpenShift application. This process may take some time to complete.

  2. If you are prompted that the authenticity of the host cannot be established and asked whether you want to continue connecting, ensure that the host name matches that of your application and domain and click Yes.

View the OpenShift Online Application

  1. In the OpenShift Explorer view, expand the connection and domain.

  2. Right-click {application name} and click Show In  Web Browser.

Your OpenShift Online application is displayed in the IDE default web browser.

Some OpenShift Terminology

  • Gear: A server container with a set of resources that allow you to run your application

  • Cartridge: Plug-ins that house the framework or components that can be used to create and run your application

    • Standalone cartridge: Languages and application servers that serve your application

    • Embedded cartridge: Functionality to enhance your application

  • Scaling: Enables your application to react to changes in traffic and automatically allocate the necessary resources to handle the current demand

Did You Know?

  • You can also start the New OpenShift Application wizard from the OpenShift Explorer view by right-clicking a connection, domain or existing application and clicking New  Application or from the IDE main menus by clicking File  New  OpenShift Application.

  • To save time when logging in to OpenShift Online in future, you can click the Save Password check box in the Sign in to OpenShift window. The password is retained in secure storage provided by the IDE and automatically populates the Password field for the associated connection.

  • Using the New OpenShift Application wizard, you can also create a new OpenShift application from an existing workspace project or a Git source.

  • Each time you start the IDE or switch workspaces the IDE is initially disconnected from OpenShift. When you attempt to complete an action that requires an active OpenShift connection, you are automatically prompted to reconnect.

back to top