Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method of creating a cloud helper command in an ECS instance

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The editor will share with you the method of creating cloud assistant commands in ECS instances. I hope you will learn a lot after reading this article. Let's discuss it together.

Create command

Cloud assistant commands can quickly complete some daily tasks in ECS instances, such as running automated OPS scripts, polling process, resetting user passwords, installing or uninstalling software, updating applications, and installing patches. Command types can be Windows PoweShell scripts, Bat batch commands, and Linux Shell scripts.

Use restriction

In an Ali cloud region, you can create up to 100 cloud assistant commands.

The script created cannot exceed the size of 16KB after Base64 encoding.

Create command

The steps to create a command on the ECS management console are as follows:

Log in to the ECS Management console.

In the left navigation bar, select Cloud Assistant.

Select the region.

Click the create command, and in the right pop-up window:

Enter a command name, such as HelloECS.

Enter a description of the command, such as UserGuide.

Click the icon and select the command type in the drop-down list. Windows instances can choose Bat or Power Shell, while Linux instances need to select Shell.

Edit or paste the contents of your command, such as:

Echo hello ECS!

Echo root:NewPasswd9! | chpasswd

Echo Remember your password!

Determine the path to execute the command. The Bat or PowerShell command is located in the directory where the cloud helper client process resides by default, for example, C:\ ProgramData\ aliyun\ assist\ $(version). The Shell command defaults to the / root directory.

Sets the maximum timeout of the command in the instance, in seconds, with a default of 3600 seconds. A timeout occurs when the command you create cannot be run for some reason. After the timeout, the command process is forcibly terminated.

After confirming the command, click OK.

You can also use ECS API CreateCommand to create a cloud helper command.

Next step

Execute a command

After reading this article, I believe you have a certain understanding of the method of creating cloud assistant commands in ECS instances. If you want to know more about it, welcome to follow the industry information channel. Thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report