Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Templates from gems #261

Open
mipearson opened this issue Dec 18, 2018 · 4 comments
Open

Proposal: Templates from gems #261

mipearson opened this issue Dec 18, 2018 · 4 comments

Comments

@mipearson
Copy link
Contributor

mipearson commented Dec 18, 2018

(unlike the other proposals, this one is for stack_master 1, not 2)

I want to be able to ship CFN templates (.yml) as part of a private gem for others to use.

The workflow would be:

  1. Add to Gemfile, lock to patch version
  2. Reference template(s) in gem in stack_master.yml as normal
  3. Update incrementally & carefully if desired

stack_master.yml would look like:

stacks:
  us-east-1:
    my-vpc:
      gem-template: mygem:vpc.yml

mygem would be discovered and an error displayed if the gem is not found or the template does not exist. mygem would only consist of a mostly-empty mygem.gemspec and a templates directory.

Optionally other stack_master compiled formats (eg sparkleformation, cfndsl) could be supported.

This would also allow people wishing to modify / contribute back to the templates in the gem to vendor it locally using the existing Bundler mechanisms for working on code locally

@rbayerl
Copy link
Contributor

rbayerl commented Dec 18, 2018

I would rather see it as mygem:vpc.yml rather than taking over the idea of a local path. Other than that no opinion. Another option would be something like:

stacks:
  us-east-1:
    my-vpc:
      gem-template:
        mygem: vpc.yml

@mipearson
Copy link
Contributor Author

@rbayerl yeah, mygem:vpc.yml is better. Ta. Editing original issue.

@patrobinson
Copy link
Contributor

Are Rubygems the right packaging format? Should we support just plain Git instead (with tags support)? Or perhaps tarballs fetched via HTTP (and possibly S3 for private access)?

@viraptor
Copy link
Contributor

viraptor commented Feb 5, 2020

If there's still a need for distributed yml templates, it may be worth checking if sparkle_pack support can be extended to do the same. Gem-distributed rb files are already possible: https://github.com/envato/kms_sparkle_pack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants