Workflows

An application manifest is defined in terms of the workflows that are executed by the application instance in response to user actions. Workflows have names that are unique to the application.

There are two workflows that are required to be present in the manifest: launch and destroy. launch is triggered when a user attempts to launch a new instance of the application. destroy is triggered when a user attempts to destroy a running instance.

A workflow contains a list of steps that will be executed whenever workflow execution is triggered. Steps are executed in a certain order, which is determined by the action’s phase.

Note

In YAML terms, a manifest is a dictionary whose workflow names are keys.

Every workflow (except for destroy) can accept parameters and modify instance properties.

Syntax

launch:
  parameters: ...  # List of input parameters
  steps: ...       # List of actions
  return: ...      # List of properties that are modified after execution

destroy:
  steps: ...   # List of actions
  return: ...  # List of properties that are modified after execution

Launch Workflow

The launch workflow is required for all application manifests. You can add as many phases as you’d like. In the example below, we have created five phases for the instance launch.

  • provision: Actions that provision physical or virtual resources (e.g. VMs) will be executed.
  • install: Actions that install software will be executed.
  • deploy: Actions that deploy source code, database schema, etc. will be executed.
  • configure: Actions that configure services, populate databases with data, etc. will be executed.
  • post-configure: Actions that start services, change load balancing rules, etc. will be executed.

Phases can be added by manipulating the phase and precedingPhases action parameters.

Destroy Workflow

The destroy workflow is required for all application manifests. An instance destroy does not have any phases. If needed, phases can be added by manipulating the phase and precedingPhases action parameters.