Step 3 (Optional): Create stack instances

更新时间:
复制 MD 格式

To deploy stacks to destination accounts in different regions using a template from an existing stack group, create stack instances in the stack group. If you specified destination accounts and regions when you created the stack group, the ROS console automatically creates the stack instances.

Prerequisites

A stack group must already exist. For more information, see Step 2: Create a stack group.

Background

Before you create stack instances, prepare the following accounts:

  • management account (Account A): The account used to create stack instances. This must be the same account that created the stack group.

  • destination account (Account B): The account where the stacks will be deployed.

Note

The administrator account and the execution account can be the same Alibaba Cloud account. For more information about administrator and execution accounts, see Overview.

This topic describes how to use a management account (Account A) to create stack instances and deploy stacks to a destination account (Account B) in the China (Hangzhou) and China (Beijing) regions.

Procedure

  1. Log on to the ROS console using the management account (Account A).

  2. In the left navigation pane, click Stack Groups.

  3. In the top menu bar, select the region where the stack group is located from the region drop-down list.

  4. On the Stack Groups page, click the name of the stack group.

  5. In the upper-right corner of the page, choose View More > Add Stack.

  6. On the Set Deployment Options page, configure the following parameters and click Next.

    Parameter

    Description

    Accounts

    The accounts where you want to deploy stacks.

    Select a deployment location and set the corresponding accounts.

    • Deploy Stacks Within Accounts: If you use an Alibaba Cloud account to create stack instances, you can select this option to deploy stacks in other Alibaba Cloud accounts. For example, enter the ID of the destination account (Account B) to deploy stacks in that account.

      Note

      You can add multiple accounts. Separate account IDs with a comma (,). You can also include the management account (Account A) to deploy stacks within it.

    • Deploy Stacks Within Resource Directories: If you have enabled Resource Directory and use its management account to create stack instances, you can select this option. Then, select folders from the resource directory to deploy stacks in all member accounts within those folders.

    Regions

    The regions where you want to deploy stacks. For example, China (Hangzhou) and China (Beijing).

    Maximum Number of Concurrent Accounts

    The maximum number of accounts per region where stacks can be deployed concurrently.

    For more information about how to set this parameter, see Overview.

    Fault Tolerance

    The number of accounts where stack deployments can fail in each region. If this number is exceeded, the operation stops in that region. If the operation stops in one region, it will not proceed to other regions.

    For more information about how to set fault tolerance, see Overview.

    Region Concurrency

    The concurrency level for deploying stack instances across regions.

    • Sequential: Deploys stacks in each specified region in sequence. Stacks are deployed in only one region at a time.

    • Parallel: Deploys stacks in all specified regions at the same time.

    Expand modules in current account

    This parameter takes effect only if the template uses modules. If you expand modules in the current account, the modules must exist in the current account. If you do not expand modules in the current account, the modules must exist in all destination accounts.

  7. On the Specify Override Settings page, select the parameters to override, change their values using one of the following methods, and then click Next.

    • Method 1: Choose Edit Override Value > Override Stack Group Parameter Values to set the value.

    • Method 2: Choose Edit Override Value > Reset Override Field to enter a new value.

    Note

    After the stack instances are created, you can view the overridden parameter values in the destination account (Account B). To view these values, go to the Stacks page, click the stack ID, and then view the values on the Parameter tab.

  8. On the Check and Confirm page, verify the configuration of the stack instances and click Add.

Results

After the stack instances are created, go to the Stack Groups page and click the name of the stack group. Then, click the Instance tab to view the status of the stack instances for the destination account (Account B).

During deployment, the instance's status is Expired, indicating that the pre-existing version is now outdated. After the deployment succeeds, the status automatically changes to Current. You can then use the destination account (Account B) to log on to the ROS console and view the deployed stacks in the China (Hangzhou) and China (Beijing) regions.

Related documents