Git Product home page Git Product logo

pulumi-auto_api-stack_factory's Introduction

Studies in Auto API and Stack Patterns

Playing with automation API and creating stacks based on config yaml files and some patterns. Also uses component resources.

Big Picture

  • auto_api.py: This is the main entry point and is called with a given yaml config file (and an optional "destroy" flag).
  • stack_factory.project_stack.py: This is a (mostly) stack-agnostic factory that contains the if-then logic to call the right project/stack/pattern module based on the yaml config file settings. Currently, there is an explicity "pattern" property in the yaml but the pattern could be inferred in the factory to figure out which pattern module to call.
  • projects: Contain modules where each module captures all the knowledge for the given project/pattern. This knowledge includes the inline pulumi program itself that stands up the stack as well any config and plugins management needed for the given project/pattern.

To Use:

  • Use one of the example config yaml files or create your own.
  • Run python ./auto_api.py -c ./config_XXX.yaml to create the project (if not already existing) and create or update the stack.
  • To destroy, run python ./auto_api.py -c ./config_XXX.yaml -d

Possible Future Updates

  1. There may (is?) a use-case where the user's request needs to create/update multiple Pulumi stacks. Currently the code handles a single pattern which represents a single stack. But it wouldn't be hard to put a loop around that to create multiple stacks if needed.

  2. Currently most of the config from the YAML is inserted directly into the resources. I think it would be good to insert the config into Pulumi config so that it shows up in the Pulumi SaaS for the given update.

  • stack.set_config(yamlconfig_property_key, auto.ConfigValue(value=yamlconfig_property_value)))
  1. Support a parmeter to remove the stack completely.

pulumi-auto_api-stack_factory's People

Contributors

mitchellgerdisch avatar

Watchers

 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.