Giter Site home page Giter Site logo

junydania / aws-systems-manager-document-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from awslabs/aws-systems-manager-document-generator

0.0 1.0 0.0 126 KB

A utility to convert your Python or Bash programs into SSM documents (and optionally - CloudFormation templates, containing those documents).

License: Apache License 2.0

Python 94.31% Shell 5.69%

aws-systems-manager-document-generator's Introduction

AWS Systems Manager Document Generator

A library + DSL that allows you to easily define SSM documents and convert you your Python or Bash programs into SSM documents (and optionally - CloudFormation templates, containing those documents).

You can find examples of command definitions in src/ssm_document_generator/examples.

Workflow

Option 1. Calling the generator directly:

  1. Create a definition file.
    The file can either directly contain the commands you want to execute or can point to a Python or a Bash file that serves as entry point for your program. You can find an example of definition file here
  2. Run the program and point it at the definition file you've created. I.e. if we are to use it with the definition mentioned above we'd do something like:
    python main.py get_file_definition.py get_file.json
    get_file.json here is the output file where the resulting SSM document would be written to. You can see the description of other available options below.

Option 2. Integrate the document creation into your package build process:

If you have a Python package with several SSM command definitions present - you can integrate the document creation into your build process by using build tasks provided with this package.
You would do that by adding the following into your setup.py:

#...
setup(
#...
cmdclass={
          'ssm_generator': SSMGenerator,
          'install_scripts': SSMGeneratorBuild
      },
#...
)

Command usage:

usage: main.py [-h] [-cf] [--indent INDENT] input output

positional arguments:
  input                 A definition file or a directory containing multiple definition files.
  output                Output file or directory. Should match to input (e.g.
                        if input is a file - this expected to be a file,
                        correspondingly if input is directory - this is
                        expected to be a directory).

optional arguments:
  -h, --help            show this help message and exit
  -cf, --cloud-formation
                        Generate CloudFormation template instead of just SSM
                        document
  --indent INDENT       Indent for resulting json for SSM document

License

This library is licensed under the Apache 2.0 License.

aws-systems-manager-document-generator's People

Contributors

hyandell avatar stvad avatar

Watchers

 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.