4.5. Deploy and View Application
4.5.1. Deploy to the JBoss EAP Server
Once you have imported the TicketMonster source code into JBoss Developer Studio, the project application can be deployed to the JBoss EAP server and the running application viewed in the default system web browser, as detailed in the procedure below.
Procedure 4.3. Deploy to the JBoss EAP Server
- In the Project Explorer view, right-click ticket-monster and click →.
- Under How do you want to select the server?, ensure Choose an existing server is selected.
- In the Server table, expand localhost, select jboss-eap-version where version denotes the JBoss EAP version, and click .
- Ensure ticket-monster is listed in the Configured column and click . The Console view automatically becomes the view in focus and displays the output from the JBoss EAP server. Once deploying is complete, the web application opens in the default system web browser.
4.5.2. Deploy to OpenShift Online
Once verified that the workspace ticket-monster application runs successfully on JBoss EAP, you can deploy it with confidence to OpenShift Online, Red Hat's cloud service. To deploy ticket-monster to OpenShift Online, you must create a new OpenShift Online application based on the existing workspace project using OpenShift Tools, as detailed in the procedure below.
Note
This procedure documents the deploying process for first-time OpenShift Online users. 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 and OpenShift Tools, omit the one-time steps as appropriate.
Procedure 4.4. Deploy to OpenShift Online
- In JBoss Central, under Start from scratch, click OpenShift Application.
- If you do not have an OpenShift Online account, click Please sign up here to create an OpenShift Online account and follow the instructions on the OpenShift web page displayed in your default system web browser. Once you have completed the sign-up process, restart the New OpenShift Application wizard.
- Complete the fields about your OpenShift Online account as follows:
- From the Connection list, select New Connection.
- Ensure the Use default server check box is selected.
- In the Username and Password fields, type your account credentials.
- Click .
- If your OpenShift Online account has no SSH public keys stored, you are prompted with the Add SSH Keys wizard. Click and complete the fields about the SSH Keys to be created as follows:
- In the Name field, type a name for the SSH key.
- From the Key Type list, ensure SSH_RSA is selected.
- In the SSH2 Home field, ensure your
.sshdirectory path is shown. - 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
.pubappended.
Click and click again to close the Add SSH Keys window. - If your OpenShift Online account has no domains, you are prompted with the Create Domain wizard. In the Domain name field, type a name for your new OpenShift Online domain and click . 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 wizard page to provide a unique domain name.
- 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 Enterprise Application Platform 6 jbosseap-6.
- Click .
- Complete the fields about your OpenShift Online 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
ticketmonster. - From the Gear profile list, select small.
- Click .
- Complete the fields about the workspace ticket-monster project as follows:
- Clear the Create a new project check box.
- In the Use existing project field, type
ticket-monster. Alternatively, click to select the ticket-monster project. - Ensure the Create and set up a server adapter for easy publishing check box is selected.
- Click .
- Click to create the new OpenShift application based on the existing workspace ticket-monster project. This process may take some time to complete.
- At the prompt stating OpenShift application ticketmonster will be enabled on project ticket-monster ..., click . This configures the workspace ticket-monster project for OpenShift and connects it to the OpenShift Online Git repository system used for version control.
- At the prompt stating the authenticity of the host cannot be established and asking if you are sure you want to continue connecting, verify the host information is correct and click .
- In the Servers view, right-click ticketmonster at OpenShift and click .
- At the prompt asking if you want to push committed changes to OpenShift, click . The Console view automatically becomes the view in focus and displays the output from the OpenShift Online server. Once the OpenShift Online ticketmonster application is created and deployed, the Console view displays the following:
Deployment completed with status: success
4.5.3. View the OpenShift Application in a Browser
Once deployed, you can view the OpenShift Online ticketmonster application in a web browser. Details are provided here for viewing in your default system web browser and with BrowserSim.
To view the application in your default system web browser, in the OpenShift Explorer view, expand the connection and domain. Right-click ticketmonster and click .
To view the application in a BrowserSim simulated device web browser, click the icon. Copy and paste the URL from your default system web browser into the simulated device web browser address bar. Notice that the user interface is different in the two web browsers; the TicketMonster example has a different user interface for small views such as mobile devices.









