Updated on 2024-05-28 GMT+08:00

Creating an Environment

Create an environment before deploying components.

Procedure

  1. Log in to ServiceStage.
  2. Choose Environment Management > Create Environment and configure the environment. Parameters marked with an asterisk (*) are mandatory.

    Parameter

    Description

    *Environment

    Environment name.

    *Enterprise Project

    Enterprise projects let you manage cloud resources and users by project.

    It is available after you enable the enterprise project function.

    Description

    Environment description.

    1. Click and enter the environment description.
    2. Click to save the description.

    *VPC

    NOTICE:

    After the environment is created, the VPC cannot be modified during Modifying an Environment.

    Select the VPC where the environment is located based on your service requirements.

    VPC where the environment resources are located.

    • To use a created VPC, select a VPC created under the current account from the drop-down list.
    • To use a shared VPC, select a VPC that another account shares with the current account from the drop-down list.

      VPC owners can share the subnets in a VPC with one or multiple accounts through Resource Access Manager (RAM). Through VPC sharing, you can easily configure and manage multiple accounts' resources at low costs. For more information about VPC and subnet sharing, see VPC Sharing.

    • To use a new VPC, click Create a VPC. For details, see Creating a VPC.

    *Environment Type

    Environment type.

    • VM: applicable to VM-based deployment. Components are deployed on VMs using software packages.
    • Kubernetes: applicable to container-based deployment (CCE). Components are deployed using container images and scheduled by Kubernetes.
    NOTE:
    • For details about the component deployment mode, see Deploying a Component.
    • If the environment type is Kubernetes and CCE is used for deployment, you are advised to run the following command on the CCE node to add a firewall:

      iptables --append OUTPUT --proto tcp --destination 169.254.169.254 --match owner ! --uid-owner root -j REJECT

      169.254.169.254 is a special address in OpenStack and is used to provide instance metadata and user data services. This command prevents non-root users from obtaining sensitive information or performing unauthorized operations using this address.

    Figure 1 Configuring an environment

  3. Click Create Now.

    After the environment is created, go to the environment details page to view the environment details and configure environment resources.

    If CCE clusters and VMs are managed in an earlier version, the environment type is VM + Kubernetes after the upgrade to the current version.

Follow-Up Operations

  • After a Kubernetes environment is created, bind a CCE cluster to the environment before using the environment to deploy components. For details, see CCE Resource Management.
  • After an environment is created, the compute resources (excluding CCE clusters), network resources, and middleware need to be managed together to form an environment. For details, see Managing Resources.