Build Plan steps

The following section describes SA Build Plan steps.

Run Script step

The Run Script step is a key Build Plan component. The vast majority of steps used in Build Plans make use of this step. The Run Script step executes a script either on the target server or in the SA Global Shell (OGFS). SA Provisioning provides an extensive library of scripts that perform many of the most common Build Plan tasks. In addition, you can create your own scripts by copying and modifying the scripts that HPE provides or by creating new scripts.

The following are some of the script types SA provides:

Build Plan scripts

Script Type

Description

OGFS scripts

Execute on the SA Core in the SA Global Shell. All other script steps run on the target server.

Note: Most of the OGFS scripts shipped with SA are not meant to be modified in any way. They provide vital functionality like booting target servers and monitoring tasks.

Python scripts

Execute on the target server. This is the only script step that can be run against any target server leveraging the platform independence of Python.

Standard UNIX/Linux shell scripts

Execute on the target server. These scripts make use of any interpreter that is installed on the server.

Standard Windows batch scripts

Execute on the target server.

Standard Windows Visual Basic scripts

Execute on the target server.

PowerShell

PowerShell script steps are not currently supported. As a workaround you can create a Windows batch script that calls the PowerShell interpreter.

OGFS scripts are started at the following location:

/opsw/.Server.Id/<<target server ID>>

From the Global Shell you can use the UAPI as the user under which the Build Plan runs. For more information about the UAPI and the Global Shell see “SA Global Shell" in the SA 10.51 Use section. Server scripts can also access the UAPI but will do so using the credentials of the target server, thus limiting operations to that server.

Install Zip step

The Install Zip step transfers a zip file from the SA Client Library to a target server and uncompresses it to a specified location. You can also specify pre-installation and post-installation scripts with the package which can execute before or after file extraction.

Note Zip packages installed using Build Plans are not added to the server's software inventory. If you want these packages to show up in the inventory, add the Zip to a Software Policy and use the "Attach Software Policy" and the "Remediate Server" steps (applicable to servers running the production SA Agent). There is no equivalent for servers running the service OS as the service OS is not persisted and the contents of the installed Zip are lost when the server is rebooted.

Upload and apply configuration file steps

Configuration text files are stored in the SA Client Library and are used for text-based data such as unattended installation files or hardware configuration files. The Apply Configuration file step takes the specified configuration file and writes it to a user-specified location on the target server. Such steps are often followed by a run script step that makes use of the configuration file. HPE provides many sample configurations. You can use these configurations or create your own.

The Upload Configuration file step captures a configuration text file from the target server and uploads it to the SA Client Library so that it can later be used as part of a Deploy Configuration File step.

See Add to Device Group step and Attach Software Policy and Attach Patch Policy steps.

Add to Device Group step

This script causes a server to join a static device group. This script is typically used to configure custom attributes on the device group and have them inherited by the server so they can be used during the provisioning process. Custom attributes defined on the device group will be accessible after the Add to Device Group step executes.

Attach Software Policy and Attach Patch Policy steps

The Attach Software Policy and Attach Patch Policy steps attach policies to the server, allowing integration with SA Patching and Software Management. These steps can only be executed against a server running a production SA Agent, so if the Build Plan also provisions an OS, these steps must be executed after the production OS is running.

Remediate Server step

Starts and waits for a remediation job to complete against the server according to the attached policies. Note that the policies will not take effect if this step is not run.