//TODO:
- get information about the environment deployments will be running in (available vars, restrictions, secrets manaagement, etc)
- figure out the development section, how will others develop new policies and test them?
- Description
- Usage - Configuration options and additional functionality
- Reference
- Development - Guide for contributing to the module
This module provides a set of tools, via CD4PE, for creating your own custom CD4PE deployment policies. It is also a place to find a set of generic policies.
- Get started with a custom deployment policy by creating a Puppet Plan in the
plans/
directory. - You'll have access to all of the functions listed in our REFERENCE.md to perform deployment operations (e.g. pinning nodes to an environment group or getting information about an environment group)
- Deployment policies will run inside a CD4PE context with certain environment variables available.
myplan.yaml
plan cd4pe_deployments::myplan(
) {
}
Most functions available in this module will always return a CD4PEFunctionResult that contains:
- result
- error: { message, code }
{
result: {
approvalDecision: "APPROVED"
},
error: nil
}
{
result: nil,
error: {
message: "Something went wrong",
code: "SomeErrorCode",
}
}
ParameterMissing
- The CD4PE API was expecting a parameter that was not provided.
ParameterParsing
- The CD4PE API was unable to parse the provided parameter value.
FunctionFailure
- CD4PE was unable to complete the function's primary purpose (e.g. run_puppet() failed to run Puppet)
$result = get_node_group('abcd-1234-efgh-56789')
if($result[error]){
fail_plan("Could not get node group! ${result[error][message]}")
}
See our REFERENCE.md for reference documentation.
TBD