All Products
Search
Document Center

Elastic Compute Service:Use Cloud Assistant plug-ins

Last Updated:Sep 10, 2024

Cloud Assistant can remotely run commands and upload files. Cloud Assistant also provides plug-ins. You can use Cloud Assistant plug-ins to make complex configurations by running simple commands. This improves O&M efficiency.

Limits

The following Cloud Assistant Agent versions support Cloud Assistant plug-ins. If you want to use Cloud Assistant plug-ins, make sure that your Cloud Assistant Agent version is not earlier than the following versions. For more information, see Upgrade or disable upgrades for Cloud Assistant Agent.

  • Windows: 1.0.0.137

  • Linux: 1.0.2.510

Methods to run plug-ins

You can use the following methods to run Cloud Assistant plug-ins:

  • Connect to an Elastic Compute Service (ECS) instance as a user that has the sudo permissions and run commands on the instance. This method is applicable only to Linux instances.

    For information about how to connect to an instance, see Connection method overview.

  • Go to the Cloud Assistant page in the ECS console.

Query plug-ins

Before you use a Cloud Assistant plug-in, you must query the name of the plug-in.

Query all online Cloud Assistant plug-ins

acs-plugin-manager --list

Query locally installed Cloud Assistant plug-ins

acs-plugin-manager --list --local

The following table describes the parameters of Cloud Assistant plug-ins.

Parameter

Description

Name

The name of the plug-in.

Version

The version of the plug-in.

Publisher

The provider of the plug-in.

OsType

The operating system type that is supported by the plug-in. Valid values:

  • LINUX

  • WINDOWS

  • BOTH (LINUX and WINDOWS)

Arch

The architecture that is supported by the plug-in. Valid values:

  • X64

  • X86

  • ARM

  • ALL

PluginType

The type of the plug-in. Valid values:

  • Once: one-time plug-in. A one-time plug-in is terminated after the execution is complete.

  • Persist: long-running plug-in. A long-running plug-in runs as a resident process.

Run plug-ins

Run a Cloud Assistant plug-in

acs-plugin-manager --exec --plugin <plugin name>

Run a locally installed Cloud Assistant plug-in

acs-plugin-manager --exec --local --plugin <plugin name>
Note
  • Replace <Plug-in name> with the name of the plug-in that you want to run. For information about how to query plug-ins, see the Query plug-ins section of this topic.

  • By default, when you use the preceding command to run a specific plug-in, the system checks whether the plug-in is locally installed. If the plug-in is not locally installed or the version number of the installed plug-in is earlier than the online version, the system downloads the online version and then installs and runs the plug-in. You can specify the --local parameter in the command to run only locally installed plug-ins. If a specified plug-in is not installed, an error is returned.

Delete a locally installed Cloud Assistant plug-in

Run the following command to delete a locally installed Cloud Assistant plug-in:

acs-plugin-manager --remove --plugin <plugin name>
Note

Replace <Plug-in name> with the name of the plug-in that you want to delete. For information about how to query locally installed plug-ins, see the Query plug-ins section of this topic.

Common plug-ins

Cloud Assistant provides a variety of plug-ins. This section provides examples on how to use common Cloud Assistant plug-ins.

Configure kdump

kdump is a Linux kernel feature that creates core dumps when kernel errors occur. The ecs_dump_config plug-in can be used to enable and disable the kdump feature, and query the status of the feature.

  • Enable the kdump feature.

    acs-plugin-manager --exec --plugin=ecs_dump_config --params --enable
  • Disable the kdump feature.

    acs-plugin-manager --exec --plugin=ecs_dump_config --params --disable
  • Query the status of the kdump feature.

    acs-plugin-manager --exec --plugin=ecs_dump_config --params --status

Automatically configure an ENI

In most cases, you must manually make network configurations for an elastic network interface (ENI) after you add the ENI. The multi-nic-util plug-in can be used to automatically make network configurations for an ENI.

acs-plugin-manager --exec --plugin=multi-nic-util

Configure IPv6 addresses

The ecs-utils-ipv6 plug-in can configure IPv6 addresses for ENIs on ECS instances that are assigned IPv6 addresses, or clear IPv6 configurations for ECS instances that are not assigned IPv6 addresses. The ecs-utils-ipv6 plug-in can be used to enable IPv6, disable IPv6, and automatically or manually configure IPv6 addresses for instances. By default, the plug-in automatically configures IPv6 addresses. The ecs-util-ipv6 tool is integrated into the ecs-utils-ipv6 plug-in. For more information, see Configure an IPv6 address for an ECS instance.

  • Enable IPv6.

    acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --enable
  • Disable IPv6.

    acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --disable
  • Automatically configure IPv6 addresses.

    acs-plugin-manager --exec --plugin=ecs-utils-ipv6
  • Manually configure IPv6 addresses.

    acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --static,<dev>,<ip6s>,<prefix_len>,<gw6>

    Sample command:

    acs-plugin-manager --exec --plugin=ecs-utils-ipv6 --params --static,eth0,fe80::216:3eff:****:****,64,2408:400a:108:8300:ffff:ffff:****:****

Configure NIC multi-queue

Network interface controller (NIC) multi-queue enables an ECS instance to use multiple NIC queues to improve network performance. Performance bottlenecks may occur when a single vCPU of an instance is used to process NIC interrupts. To resolve this issue, you can use NIC multi-queue to distribute NIC interrupts across different vCPUs. You can run the ethtool -l ehtname command to query the current number of NIC queues and the supported number of NIC queues.

The ecs_tools_multiqueue plug-in can be used to set the number of queues on all NICs to the supported maximum number of queues.

acs-plugin-manager --exec --plugin=ecs_tools_multiqueue

Manage Intel Hyper-Threading

ECS bare metal instances require Intel Hyper-Threading (HT) to be disabled for specific business scenarios. The ecs_disable_intel_hyper-threading plug-in can be used to disable the feature.

To use the plug-in, you must add the nr_cpus kernel parameter to the grub file and set the parameter to half the number of vCPUs of the instance type. The nr_cpus parameter limits the maximum number of vCPUs that is supported by the kernel and disables HT.

After the kernel parameter is added, you must restart the instance for the parameter to take effect. After the plug-in is run, the output prompts you to restart the instance.

Note

The plug-in can disable HT only on ECS bare metal instances. If you run the plug-in on an ECS instance that is not an ECS bare metal instance, the system prompts you that the instance is not an ECS bare metal instance and then exits the plug-in.

acs-plugin-manager --exec --plugin=ecs_disable_intel_hyper-threading

Manage security patches

Security vulnerabilities on ECS instances must be fixed at the earliest opportunity. Otherwise, serious risks may arise. The patch_manager plug-in can be used to scan for and install security patches on ECS instances.

  • Scan for security patches.

    acs-plugin-manager --exec --plugin=patch_manager --params --operation,scan
  • Install security patches and have the instance restarted if required.

    acs-plugin-manager --exec --plugin=patch_manager --params --operation,install,--reboot,ifneed
  • Install security patches without restarting the instance.

    acs-plugin-manager --exec --plugin=patch_manager --params --operation,install,--reboot,no