-
Notifications
You must be signed in to change notification settings - Fork 0
Harp Script Syntax
A harp script (.harp) describes how resources on a cloud should be constructed, in what order, and with what interconnections.
The basic format has 3 sections: configuration, resource definition, and orchestration. Not all sections must be present in a harp script; some sections may be included by URL, or rely on defaults.
The configuration section provides meta-data that can be used by resources or orchestration to customize a particular run. This allows a resource or script to be re-used in different circumstances, with only changes to the configuration section.
Resource definition makes the raw materials available to the harp runtime that will be used during orchestration. These are typically JSON formatted definitions of resources. See [Supported-Resources] for details.
The orchestration portion of the script is where the magic happens. Orchestrations are segregated into lifecycle functions, by convention.
The typical lifecycle methods are:
- create
- destroy
- online
- offline
However, you can specify any additional lifecycle methods as needed. For example, a script might include a hot_deploy
lifecycle for deploying new code, or disaster_recovery
lifecycle for migrating to a DR instance.