Updated on 2025-05-16 GMT+08:00

Configuring an Environment

During digital transformation, many applications need to be deployed quickly. In this case, an effective deployment method is required. The concept of environment arises accordingly. An environment is a set of one or more hosts running the same operating system. The environment is a deployment object in an application. It integrates multiple hosts to deploy applications in batches. This approach eliminates the need to deploy applications separately on each host. By running deployment commands once for the environment, applications can be efficiently and consistently deployed across multiple hosts. This method improves deployment efficiency and reduces the risk of human errors.

For host deployment scenarios, you can add, delete, and modify the environment of the application on the Environment Management tab page. You can also import, query, and delete hosts in the environment. The environment is important components of service deployment. This section describes how to configure an environment in an application.

Procedure

  1. Select the target application, click , and click Edit. The Deployment Actions page is displayed.
  2. Click the Environment Management tab.
  3. Create an environment.

    1. Click Create Environment, set the following parameters, and click Save.

      Parameter

      Mandatory

      Description

      Environment

      Yes

      Enter a user-defined environment name.

      Enter 3 to 128 characters. Use digits, letters, hyphens (-), underscores (_), and periods (.).

      Resource Type

      Yes

      You can choose Host based on the environment requirements.

      OS

      Yes

      Choose Linux or Windows as the operating system for the host.

      Description

      No

      Enter a description of the environment.

      Max. 500 characters.

    2. Click Import Host. The system automatically filters all clusters that meet the requirements of the current environment. Select a target host cluster and import a host to the environment in either of the following ways:

      Import separately: Click in the Operation column of a host to import the host to the environment.

      Import in batches: Select multiple hosts and click Import.

      If you import a target host bound to a proxy host, the proxy host will be imported to the environment automatically.

    3. (Optional) After the host is imported, click on the page to verify the connectivity.

  4. Modify the environment.

    1. Edit the environment.
    2. Edit the host cluster.
      • Editing an environment: Click in the Operation column of an environment to modify the environment name and description.
      • Deleting an environment: Click in the Operation column of an environment, and click Yes.
      • Managing permissions: Click in the Operation column of an environment to configure operation permissions for each role. Enable or disable permissions as required.

        For details about the permissions of each role, see the environment permissions table in Purchasing and Authorizing CodeArts Deploy.

    3. Edit a host in the environment.
      • Verify host connectivity in batches: Select multiple hosts and click .
      • Enable network connectivity verification: Click in the Operation column of a host.
      • Delete a host: Click in the Operation column of a host, click Delete, and click OK.

        A proxy host cannot be deleted directly. A proxy host is deleted, when its last target host is deleted from the environment.

  5. Click Save.