搜索

此内容没有您所选择的语言版本。

Chapter 3. Application deployment in CodeReady Studio

download PDF

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.

3.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. Click Window Preferences.

    The Preferences window appears.

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

    The JBoss Runtime Detection window appears.

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

Verification steps

  1. Click Window Show View Other.

    The Show View window appears.

  2. Enter 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.

3.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. Select the Remote check box.
  9. Select one of the Controlled by options.
  10. Select the Server lifecycle externally managed check 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 Window Show View Other.

    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.

3.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. Right-click the target project Run as Run on Server.

    The Run on Server window appears.

  3. Select the Choose an existing server check box.
  4. Expand localhost to select the server for deployment.
  5. Click the Finish button.

    The Console view appears.

Your application opens in the internal CodeReady Studio web browser.

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.