Coder Social home page Coder Social logo

puppetlabs-cd4pe_deployments's Introduction

cd4pe_deployments

//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?

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Reference
  4. Development - Guide for contributing to the module

Description

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.

Usage

  1. Get started with a custom deployment policy by creating a Puppet Plan in the plans/ directory.
  2. 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)
  3. Deployment policies will run inside a CD4PE context with certain environment variables available.
myplan.yaml

plan cd4pe_deployments::myplan(

) {


}

Reference

CD4PEFunctionResult

Most functions available in this module will always return a CD4PEFunctionResult that contains:

  • result
  • error: { message, code }

Example success result

{
  result: {
    approvalDecision: "APPROVED"
  },
  error: nil
}

Example error result

{
  result: nil,
  error: {
    message: "Something went wrong",
    code: "SomeErrorCode",
  }
}

Error Codes

  • 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)

Usage

$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.

Development

TBD

puppetlabs-cd4pe_deployments's People

Contributors

ziaunys avatar eputnam avatar ccaum avatar ericwilliamson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.