Updating an Orchestration v2

The web console allows you to update each object of an orchestration separately. You can add or remove objects, modify general attributes of objects such as persistence and dependencies, or update the object-specific attributes.

You can update an orchestration in either of the following ways:

  • By downloading the orchestration file to your local host and updating it using a text editor.

    You’ll have to delete the existing orchestration before you can upload the modified orchestration. Alternatively, you can upload the modified orchestration with a new name. See Downloading an Orchestration v2, Deleting an Orchestration v2, and Uploading an Orchestration v2

  • Directly in the web console, by selecting the Update option, as described in the following procedure.

Prerequisites

  • To complete this task, you must have the Compute_Operations role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

Note:

When an orchestration is stopped, all objects created by that orchestration are deleted, so all the attributes of an object can be updated. When you start the orchestration, the objects are created with the updated attributes.

When an orchestration is suspended, nonpersistent objects have the status Inactive and all attributes of those objects can be updated. Those objects are created with the updated attributes when you start the orchestration or when you change the object’s properties from nonpersistent to persistent.

When an orchestration is suspended, persistent objects aren’t deleted. Those objects have the status Active and some attributes of those objects can’t be updated. For example, you can’t update the name of a storage volume while the storage volume is online. Updates to attributes of persistent objects take effect immediately. Attempting to modify attributes that can’t be modified while an object has the status Active might cause the orchestration to go into a terminal error state, indicating that the update failed.

The following table displays the situations in which some or all of an object’s attributes can be modified and the actions required for the updates to be effective.

Orchestration Status Object Persistence Object Status Modifiable Attributes of an Object Updates Effective
Ready Persistent Active Some Immediately.
Ready Nonpersistent Active Some Immediately.
Suspended Persistent Active Some Immediately.
Suspended Nonpersistent Inactive All When orchestration is started or object is updated to be persistent.
Stopped Persistent Inactive All When orchestration is started.
Stopped Nonpersistent Inactive All When orchestration is started.

Procedure

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. Click the Orchestrations tab.
  3. Go to the orchestration that you want to update. From the menu icon menu, select Update.
  4. On the orchestration details page, go to the object that you want to update.
    • To add an instance, in the Instance section, click Add. An instance with default configuration is added to the orchestration with the status Inactive. When you start the orchestration, the instance is created.
    • To add any other object type, go to the appropriate section and click Add. For example, to create an access control list (ACL), click Add in the ACL section. The Create dialog box appears. Enter the required information and click Create. The object is added to the orchestration with the status Inactive. When you start the orchestration, the object is created.
    • To update the general properties of an object, from the menu icon menu, select Properties. The Object Properties dialog box appears. You can update the description, persistence, and dependencies of the object.
    • To update the general properties or attributes of an object by editing the JSON, from the menu icon menu, select Edit JSON. The Edit Orchestration Object JSON dialog box appears, with the JSON for the general properties as well as the object-specific attributes. You can update the JSON for the specified object as required and then click Update. The changes are saved in the orchestration.
    • To change the shape of an instance, ensure that the status of the instance is Inactive. From the menu icon menu, select Resize Instance. In the Resize an Instance dialog box, select the shape you want to use and click Resize. The instance configuration is updated in the orchestration.
    • To update attributes of an instance, go to the appropriate instance and from the menu icon menu, select Update. The instance details page is displayed. You can update the instance attributes as required. When you’re done, click Back to Orchestration Details. The instance attributes are updated in the orchestration.

      Note:

      It is recommended that you ensure that an instance is nonpersistent before updating its attributes. Nonpersistent instances are deleted when the orchestration is suspended and all attributes can be modified. Persistent instances are still running when the orchestration is suspended and many attributes can’t be modified while the instance is running. Attempting to modify attributes that can’t be modified might cause the orchestration to go into an error state.

    • To update attributes of any other object, from the menu icon menu, select Update. The Update dialog box appears. Update the information as required and click Update. The object attributes are updated in the orchestration.
    • To remove an object from the orchestration, from the menu icon menu, select Delete. The Delete Orchestration Object dialog box appears. When you confirm the deletion, the object is removed from the orchestration.
  5. When you’re done making changes to the objects in the orchestration, use the buttons at the top of the page to do the following:
    • If the orchestration is in the Suspended state, you can start the orchestration to create all objects, or stop the orchestration to delete all persistent objects.
    • If the orchestration is in the Stopped state, you can start the orchestration to create all objects.

    Note:

    If the changes you made cause the orchestration to go into an Error state, you can update the orchestration to undo your changes.

To update an orchestration using the API, download the orchestration, modify it, and then upload the modified JSON.

To download an orchestration using the CLI, use the opc compute orchestration-v2 get command. After editing an orchestration, to upload it using the CLI, use the opc compute orchestration-v2 update command. For help with these commands, run each command with the -h option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.

To download orchestrations v2 using the API, use the GET /platform/v1/orchestration/orchestrationName/ method. After modifying an orchestration, to upload it using the API, use the PUT /platform/v1/orchestration/orchestrationName method. See REST API for Oracle Cloud Infrastructure Compute Classic.

Note:

When you use the API to update an orchestration, you don’t need to stop the orchestration to update it. However, you can update an orchestration only if the orchestration is not in a transient state (activatingsuspending, or deactivating).

When you update an orchestration without stopping it, the orchestration attempts to update the objects that you’ve modified. Remember, however, that various attributes of any object are immutable and modifying those attributes isn’t permitted. For example, the name of an object, the bootable attribute of a storage volume, or the shape of a running instance are immutable. If you attempt to modify immutable attributes of any object, the update will fail and the orchestration will go into the terminal_error state. If this happens, you must identify and fix the issues and then update or activate the orchestration again.

When you stop an orchestration, all the objects created by the orchestration are deleted. You can then update any attribute of any object. The objects are created afresh when the updated orchestration starts.