Menu Close

Chapter 8. Application deployment in CodeReady Studio

In order to deploy applications to a server from within the IDE, you must configure the IDE with information about the server. For a local server this information includes the following:

  • A server runtime environment with details about the server location, runtime JRE, and configuration files
  • A server adapter with management settings for the server runtime environment, including access parameters, launch arguments, and publishing options

JBoss Server Tools enables you to efficiently configure a local server ready for use with the IDE using Runtime Detection. As demonstrated here, this feature is useful for quickly configuring a server for deploying and testing an application.

The following section describes how to:

  • Configure a local server.
  • Configure a remote server.
  • Deploy your application.

8.1. Configuring a local server

Runtime Detection searches a given local system path to locate certain types of runtime servers. For any servers found, Runtime Detection automatically generates both a default server runtime environment and a default server adapter. These items can be used for immediate application deployment as is or they can be customized to meet your requirements.

The following section describes how to configure a local server in CodeReady Studio.

Procedure

  1. Start CodeReady Studio.
  2. Start Git Perspective.
  3. Click WindowPreferences.

    The Preferences window appears.

  4. Enter JBoss Tools in the search field.
  5. Select JBoss Runtime Detection.

    The JBoss Runtime Detection window appears.

  6. Click the Add button.
  7. Locate the directory containing the runtime server.
  8. Click the OK button.
  9. Click the Apply and Close button.

Verification steps

  1. Click the WindowShow ViewOther.

    The Show View window appears.

  2. Type Servers in the search field.
  3. Select Servers.
  4. Click the Open button.

    The Servers view appears.

Your newly added local server is now listed in the Servers view.

8.2. Configuring a remote server

The following section describes how to configure a remote server.

Procedure

  1. Start CodeReady Studio.
  2. Press Ctrl+N.

    The New window appears.

  3. Enter Server in the search field.
  4. Select Server.
  5. Click the Next button.

    The Define a New Server window appears.

  6. Select the server type.
  7. Click the Next button.
  8. Check the Remote box.
  9. Select one of the Controlled by options.
  10. Check the Server lifecycle externally managed box.
  11. Assign runtimes to the server.
  12. Click the Next button.

    The Remote System Integration window appears.

  13. Click the Browse button in the Remote Server Home field.
  14. Specify the path to the directory that contains the remote server.
  15. Click the Finish button.

Verification steps

  1. Click the WindowShow ViewOther.

    The Show View window appears.

  2. Type Servers in the search field.
  3. Select Servers.
  4. Click the Open button.

    The Servers view appears.

Your newly added remote server is now listed in the Servers view.

8.3. Deploying an application

After configuring the local server, you can deploy applications to the server from the IDE using the server adapter. The server adapter enables runtime communication between the server and IDE for easy deployment of applications and server management.

The following section describes how to deploy an application to the server in CodeReady Studio.

Procedure

  1. Start CodeReady Studio.
  2. Start Project Explorer.
  3. Right-click the target projectRun asRun on Server.

    The Run on Server window appears.

  4. Ensure that the Choose an existing server box is checked.
  5. Expand localhost to select the server on which to deploy
  6. Click the Finish button.
  7. The Console view appears

Your application opens in the internal CodeReady Studio web browser.