Online Help

This help article applies to CloudShell 9.3. To see the latest, click here.

You are here: Blueprints > Creating Blueprints > Configure Blueprint Orchestration

Configure Blueprint Orchestration

Sandbox environment automation and enhanced orchestration is available with CloudShell Premium Tier.

This section explains how to configure the blueprint (orchestration) commands that will run on the sandbox and should be used when working on a blueprint that is not based on the default CloudShell Sandbox Template, which provides common setup, teardown, save, and restore orchestration commands. For resource automation, see Managing Scripts.

In this article:

Add blueprint scripts

You can add Python scripts that contain orchestration commands. However, the blueprint scripts first need to be added to CloudShell - see Adding scripts.

To add blueprint scripts:

  1. From the Blueprint menu, select Properties.
  2. In the Scripts area, click Add Scripts.
  3. Select the scripts you want to add and click Done.

    The scripts are listed in the Scripts area.

  4. To apply the changes, click Update.

    The properties page closes and the diagram workspace is displayed.

Use scripts to set up and tear down blueprints

CloudShell provides CloudShell Sandbox Template, an out-of-the-box template, which includes common setup and teardown orchestration. If you have an existing blueprint or you created a new blueprint not based on the out-of-the-box template, you can add out-of-the-box orchestration to your blueprint in the blueprint properties page.

You can also create your own scripts that will setup and teardown a sandbox or customize the out-of-the-box scripts. For more information, see CloudShell Dev Guide's Getting Started with Orchestration Scripts article.

Note: The Python Setup & Teardown driver is provided to automatically run setup and teardown scripts.

To add set up and teardown scripts to a blueprint:

  1. In the Manage dashboard, upload the orchestration script (as described above). (For more details about adding and editing scripts, see Managing Scripts.)
  2. In the Edit Script dialog box for the required script, set the Script Type to be Setup or Teardown.
  3. In the blueprint's properties page, select the Python Setup & Teardown driver, which is provided with CloudShell.
  4. Click Add Scripts.
  5. Select the required Setup or Teardown scripts and save it to the blueprint.

Add Setup and Teardown scripts

Add a blueprint driver only if you are not using the out-of-the-box CloudShell Sandbox Template and want to add setup and teardown scripts. If you want to add automation to your blueprint, other than setup and teardown, you should add the python scripts directly, without a driver.

The default driver included in the out-of-the box CloudShell Sandbox Template is used for sandbox setup and teardown and for sandbox save and restore and it applies to the four out-of-the-box scripts.

To add Setup and Teardown scripts to the blueprint:

  1. From the Blueprint menu, select Properties.
  2. From the Driver dropdown list, select the required driver. To use blueprint commands developed in Python scripts, select the Python Setup & Teardown driver, and then add the orchestration scripts, which are explained in the following section.

  3. If you're using Setup and Teardown scripts in the blueprint, define their durations:

    • In the Estimated setup duration section, use the Up/Down arrows to define the setup duration.
    • In the Estimated teardown duration section, use the Up/Down arrows to define the teardown duration.

    Note: Setting either of these values to a duration of '0' hours and minutes will disable the Setup and Teardown script's execution.

  4. To apply the changes, click Update.

    The properties page closes and the diagram workspace is displayed.

Add save and restore orchestration scripts

The CloudShell Sandbox Template is provided out-of-the-box and includes save and restore orchestration. If you have a new or existing blueprint that is not based on the out-of-the-box template, you can add out-of-the-box orchestration to your blueprint in the blueprint's Properties page. For additional customizations related to the Save and Restore add-on, see Save Sandbox Configurations

Developers can also customize the out-of-the-box Save and Restore scripts that save and restore sandboxes. For more information, see the CloudShell Developer’s Guide Getting Started with Orchestration Scripts article.

To add save and restore orchestration scripts:

  1. From the Blueprint menu, select Properties.
  2. In the Save Sandbox area, make sure the Enable Sandbox Save check box is enabled.
  3. In the Scripts area, click Add Scripts.
  4. Select the Save and Restore scripts you want to add and click Done.

    The scripts are listed in the Scripts area.

  5. To apply the changes, click Update.

    The properties page closes and the diagram workspace is displayed.

Related Topics