What is Script Library

The script library stores and manages script files centrally. By executing scripts on VM instances, you can complete complex O&M operations and automated jobs.

Figure 1. Script Library


Advantages

The script library feature provided by ZStack Cloud has the following advantages:
  • Simple and User-Friendly
    • Allows you to conveniently create a script in a visualized way and realize flexible script configurations by adding custom parameters.
    • You can include complex commands in a script. By executing this script, VM instances can complete complex operations, thus reducing the difficulty of manual O&M.
  • Convenient O&M
    • Provides a dedicated page, Script Library, for the central management of multiple scripts. On the Script Library page, you can flexibly create scripts and delete or modify existing scripts.
    • A script can be stored in the script library for long-term reuse. In addition, a script can be executed on multiple VM instances simultaneously without interference, thus effectively improving your O&M efficiency on large-scale scenarios.
    • Provides detailed script execution records, recording the VM instances that executed this script, execution start time, execution completion time, and execution result, facilitating your operation tracking and troubleshooting.
  • Diversity: Supports diversified command types, including Shell, Python, Perl, Bat, and Powershell. You can select a command type as you need.

Create a Script

On the main menu of ZStack Cloud, choose Platform O&M > Automated O&M > Script O&M > Script Library. On the Script Library page, click Create Script. Then, the Create Script page is displayed.

On the displayed page, set the following parameters:
  • Name: Enter a name for the script. The name must be 1 to 128 characters in length and can contain Chinese characters, letters, digits, spaces, hyphens (-), underscores (_), periods (.), parenthesis (), colons (:), and plus signs (+) and cannot begin or end with spaces.
  • Description: Optional. Enter a description for the script.
  • Platform Type: Select a platform type. The script can be executed on the VM instances whose operating systems are consistent with this platform type. Currently, two platform types are supported: Linux and Windows.
  • Script Type: Select a command type.
    • If you set the script platform type as Linux, the following command types are supported: Shell, Python, and Perl.
    • If you set the script platform as Windows, the following command types are supported: Bat and Powershell.
  • Script Content: Enter the script content. If you want to pass custom parameters, make sure that your script content follows the Jinja2 template syntax.
  • Timeout Period: Set a timeout period for the script. When you execute this script, if the time consumption exceed this value without completing, this execution will be considered as failed due to timeout. Default value: 60 seconds. Unit: second, minute, and hour.
  • Custom Parameter: Optional. If you want to pass custom parameters to the script, click Add Custom Parameter and set the following parameters:
    • Parameter Name: Enter the parameter name. The name must be 1~64 characters in length.
    • Parameter Value: Enter the parameter value. The value must be 1~64 characters in length.
    • Description: Optional. Enter the description for the script.

    You can add up to 20 custom parameters to a script.

Figure 1. Create a Script













Archives

Download Document Archives

Back to Top

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.