All Products
Search
Document Center

CloudOps Orchestration Service:Manage custom software on multiple ECS instances

Last Updated:Feb 07, 2024

In addition to managing Alibaba Cloud agents or software package management tools, you can use the My Software feature of CloudOps Orchestration Service (OOS) to manage custom software on multiple Elastic Compute Service (ECS) instances. You can upload regular software packages such as .rpm, .deb, and .msi packages. By using the My Software feature, you can efficiently manage software of various operating systems and architectures. This topic describes how to create and manage custom software on multiple ECS instances.

Prerequisites

  1. You can install or uninstall custom software only on ECS instances that reside in virtual private clouds (VPCs). Make sure that the network type of the ECS instances where custom software is to be installed or uninstalled is VPC.

  2. Before you install or uninstall custom software on an ECS instance, make sure that a Resource Access Management (RAM) role has been assigned to the instance and the permission policy in the following JSON script is attached to the RAM role. For more information about the authorization method, see Bind an instance RAM role.

Permission policy in a JSON script:

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "oos:GetTemplate"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oss:GetObject",
                "oss:GetBucketAcl"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}

Check the network type of an ECS instance

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. Verify that the network type of the ECS instance where custom software is to be installed is VPC.

Assign a RAM role to an ECS instance

  1. In the instance list, click the ID of the target ECS instance to check the instance details. Check whether a RAM role has been assigned to the instance.

  2. In the Basic Information section, check the value of the RAM Role field. If the value is empty, no RAM role has been assigned to the instance.

  3. Create and assign a RAM role with required permissions to the instance. Perform the following steps:

  4. Log on to the RAM console.

  5. In the left-side navigation pane, choose Permissions > Policies.

  6. On the Policies page, click Create Policy. On the Create Custom Policy page, enter a name in the Policy Name field.

  1. Select Script for Configuration Mode.

  2. Copy the JSON script in the Prerequisites section and paste it to the script editor.

  3. Click OK.

  4. In the left-side navigation pane, click RAM Roles. On the RAM Roles page, click Create RAM Role.

  5. In the Create RAM Role pane, select Alibaba Cloud Service for Trusted entity type.

  6. Click Next.

  7. Select Normal Service Role for Role Type.

  8. Enter a name in the RAM Role Name field.

  9. Select Elastic Compute Service from the Select Trusted Service drop-down list.

  10. Click OK.

  11. Click Add Permissions to RAM Role.

  12. Click Custom Policy under Select Policy.

  13. Search for the created policy and select it.

  14. Click OK. You have created a RAM role and attached the corresponding permission policy to the role.

  15. Return to the Instances page of the ECS console.

  16. Find the target ECS instance and choose More > Instance Settings > Bind/Unbind RAM Role.

  17. In the Bind/Unbind RAM Role dialog box, select the created RAM role.

  18. Click OK. You have assigned a RAM role to the instance.

  19. Click the ID of the instance. On the Instance Details page, verify that a RAM role has been assigned to the instance.

Create an OSS bucket

  1. Log on to the OSS console.

    Create an Object Storage Service (OSS) bucket to store custom software in OOS.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, click Create Bucket.

  3. In the Create Bucket pane, enter a name in the Bucket Name field.

  4. Set the Region parameter based on the region where you use OOS. Set other parameters such as Storage Class based on your business requirements or use the default values.

  5. Click OK.

Create custom software

  1. Log on to the OOS console.

  2. In the left-side navigation pane, click My Software. On the My Software page, click Create Software.

  3. On the Create Software page, click Software Information.

  4. Enter a name in the Software Name field.

  5. Click Package.

  6. Click Add Package Configuration.

    You can upload .rpm, .deb, and .msi software packages. The following table describes the operating systems and architectures supported by different types of software packages.

    Software package type

    Operating system

    Architecture

    .msi

    Windows

    x86_64386

    .rpm

    Alibaba Cloud Linux, Red Hat, CentOS, and SUSE

    x86_64386 and ARM64

    .deb

    Debian and Ubuntu

    x86_64386 and ARM64

  7. Select an OSS bucket from the Select OSS Bucket drop-down list, set Select OSS Package to /, and then select a local software package to upload.

    You can also select an uploaded software package from the Select OSS Package drop-down list. In this example, an .rpm software package is uploaded. You can also upload a .deb or an .msi software package and set the operating system and architecture based on your business requirements.

  8. Set Installation Execution Script and Uninstallation Execution Script for the uploaded software package.

  9. Set Operating System Type and Architecture for the software to be installed.

  10. Click Create Package.

Install custom software

  1. Before you begin, make sure that the target ECS instances meet the prerequisites. You can install custom software by using the My Software or Batch Software Management feature. This example describes how to install custom software by using the Batch Software Management feature.

  2. In the left-side navigation pane, choose Common O&M Tasks > Batch Software Management.

  3. On the Batch Software Management page, click Create.

  4. In the Select Task Type section, select My Software for Software Type.

  5. Select Install for Operation and select the name of the software to be installed.

  6. Click Select Instances. In this example, select Manually Select Instances and select an instance whose network type is VPC from the instance list.

  7. Click Execute Now.

  8. Check the installation status on the Batch Software Management page.

Uninstall custom software

  1. Before you begin, make sure that the target ECS instances meet the prerequisites. In the left-side navigation pane, choose Common O&M Tasks > Batch Software Management.

  2. On the Batch Software Management page, click Create.

  3. In the Select Task Type section, select My Software for Software Type.

  4. Select Uninstall for Operation and select the name of the software to be uninstalled.

  5. Click Select Instances. In this example, select Manually Select Instances and select an instance whose network type is VPC from the instance list.

  6. Click Execute Now.

  7. View the uninstallation status on the Batch Software Management page.