Cloud Scripting

Cloud Scripting Overview

Cloud Scripting is a tool for programming application-lifecycle behavior, automating routine operations, building complex CI/CD workflows and creating reusable clustering configurations.

Cloud Scripting Overview

Cloud Scripting enables developers and platform users to describe deployment and lifecycle logic as reusable scripts. It can automate environment creation, configuration changes, scaling operations, service actions, deployment steps and other platform tasks.

Cloud Scripting overview
Cloud Scripting combines lifecycle events, actions and reusable package definitions.

Main Cloud Scripting Concepts

Actions

Scripted logic that executes commands and platform operations. Actions can use API calls, Linux shell commands, JavaScript, Java and predefined platform actions.

Events

Lifecycle triggers that start actions at a specific stage, such as installation, scaling, updating or another environment event.

Injection

Built-in access to default actions, placeholders, platform API methods, environment variables, request parameters and input settings inside custom scripts.

How the pieces fit together

An event triggers one or more actions, while placeholders and injected platform data provide the values needed by those actions at runtime.

Cloud Scripting Packages and Manifests

Cloud Scripting solutions are wrapped into packages and distributed through manifest files. A manifest describes the required environment topology, lifecycle events, actions, variables, external resources and visual settings needed to deploy or update a solution.

ManifestDefines the complete scripted solution and its lifecycle behavior.
JSON / YAMLManifest logic can be represented in structured formats suitable for automated deployment and maintenance.
ImportPrepared packages can be deployed through the platform Import functionality.
Add-onsReusable packages can extend existing environments without rebuilding them from scratch.

Quick Start Workflow

  1. Decide which workflow or application scenario should be automated.
  2. Identify the properties required for the application to work correctly.
  3. Declare the required topology, values, actions and events in the manifest.
  4. Import the completed manifest into the platform.
  5. Review the deployment result and logs.
i

Hello World is a useful starting point

A minimal example can create an application environment and deploy an application archive automatically, which makes it suitable for learning the basic Cloud Scripting structure.

Basic Manifest Structure

A simple manifest can declare the installation type, solution name, node topology and deployment actions.

type: install name: Hello World nodes: nodeType: application-server cloudlets: 16 onInstall: deploy: archive: https://example.com/HelloWorld.zip name: Hello World context: ROOT

In this example, the platform creates the requested application node and then downloads and deploys the application archive during the installation event.

Automation Capabilities

Resource ManagementIncrease or decrease CPU, RAM and other resource allocations.
ConfigurationUpdate application or service configuration files automatically.
Service ControlRestart services or containers as part of a scripted workflow.
Database OperationsRun database patches, imports or maintenance operations.
Topology ManagementCreate, update, scale or reconfigure application nodes.
Custom ScriptsExecute shell commands, JavaScript or Java logic and call platform APIs.

Custom Scripts

Custom logic can be executed inside containers or at the top level of a manifest. Shell commands can be sent to target containers, while JavaScript and Java can be used for higher-level platform automation.

cmd [cp]: curl -fsS https://example.com/script.sh | /bin/bash

Visual Settings and Custom Responses

Packages can define user-facing forms, fields, buttons, messages and other UI elements. This allows a manifest to collect installation parameters and present meaningful status or error messages during execution.

FieldsCollect user input required by the package.
Forms and MenusOrganize installation or configuration options.
Custom ResponsesDisplay success, information, warning or error messages based on action results.
LocalizationProvide user-facing text in multiple supported languages.

Samples and Troubleshooting

The Cloud Scripting documentation includes reusable examples for common platform operations and complete automation packages.

Automatic Vertical ScalingAdjust application configuration according to allocated resources.
Automatic Horizontal ScalingCreate load-based triggers that add or remove application nodes.
Application ClusteringBuild highly available and scalable application configurations.
Migration AutomationMove or reconfigure environments automatically after lifecycle events.
Shared StorageMount storage directories into application servers through scripted actions.
Add-onsExtend existing environments with SSL, security, load balancing and management tools.

For troubleshooting, use the Cloud Scripting execution log to inspect action output, placeholders and errors produced during package execution.

!

Check the first failed action

When a package fails, start troubleshooting from the first error in the execution log. Later failures are often consequences of the original issue.

Important Notes

  • Define the automation scenario before writing the manifest.
  • Use lifecycle events to control when actions are executed.
  • Use placeholders and environment variables instead of hard-coding dynamic values.
  • Test custom scripts and package logic in non-production environments first.
  • Use reusable actions and add-ons to simplify larger automation projects.
  • Check platform and Cloud Scripting version compatibility when using advanced features.