application::common
: Boring implementation details
application
: Declare an application to orchestrate deploymentsapplication::kind
: Declare a set of hooks for application deployment
activate
: Activate a deployment of an applicationdeploy
: Create a new deployment for an applicationlist
: List applications and deploymentsprune
: Prune old deployments of an applicationremove
: Remove a deployment from an application
Declare an application to orchestrate deployments
The following parameters are available in the application
defined type:
application
environment
path
deploy_user
deploy_group
user_mapping
group_mapping
kind
retention_min
retention_max
Data type: String[1]
Name of the application to deploy
Data type: String[1]
Environment of the application to deploy
Data type: Stdlib::Absolutepath
Path of the application
Data type: Optional[String[1]]
User used to deploy the application
Default value: undef
Data type: Optional[String[1]]
Group used to deploy the application
Default value: undef
Data type: Hash[String[1], String[1]]
User mapping for managing deployment file permissions
Default value: {}
Data type: Hash[String[1], String[1]]
Group mapping for managing deployment file permissions
Default value: $user_mapping
Data type: Optional[String[1]]
Kind of the application to deploy
Default value: undef
Data type: Integer[1]
Minimum number of deployments to keep on disk when pruning
Default value: 5
Data type: Optional[Integer[1]]
Maximum number of deployments to keep on disk after deploying a new deployment (enable auto-pruning)
Default value: undef
Hooks are run from the deployment directory as the user configured by deploy_user
in the application.
The following hooks are available:
- before_deploy
- after_deploy
- before_activate
- after_activate
A before_*
hook returning with a non-zero exit code aborts the operation.
The exit code of after_*
hooks is ignored.
The following environment variables are set for each hook invocation:
APPLICATION_NAME
- The name of the application (e.g. "acme")APPLICATION_PATH
- The path of the application (e.g. "/opt/acme")ENVIRONMENT
- The name of the environment (e.g. "production")DEPLOYMENT_NAME
- The name of the deployment (e.g. "d3")DEPLOYMENT_PATH
- The path of the deployment (e.g. "/opt/acme/d3")USER_MAPPING_*
- User mappingsGROUP_MAPPING_*
- Group mappings
Each hook can be set using the corresponding *_content
or *_source
parameter.
The following parameters are available in the application::kind
defined type:
before_deploy_content
before_deploy_source
after_deploy_content
after_deploy_source
before_activate_content
before_activate_source
after_activate_content
after_activate_source
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Data type: Optional[String[1]]
Default value: undef
Activate a deployment of an application
Supports noop? false
Data type: String[1]
The application to operate on
Data type: String[1]
The environment to operate on
Data type: String[1]
The name of the deployment to activate
Create a new deployment for an application
Supports noop? false
Data type: String[1]
The application to operate on
Data type: String[1]
The environment to operate on
Data type: String[1]
The url of the artifact of the deployment
Data type: Optional[String[1]]
The name of the deployment to create
Data type: Optional[Hash[String[1], String[1]]]
Extra HTTP headers
List applications and deployments
Supports noop? false
Prune old deployments of an application
Supports noop? false
Data type: String[1]
The application to operate on
Data type: String[1]
The environment to operate on
Data type: Integer[1]
The number of MRU deployments to keep
Remove a deployment from an application
Supports noop? false
Data type: String[1]
The application to operate on
Data type: String[1]
The environment to operate on
Data type: String[1]
The name of the deployment to remove