Hi,
I am looking for some guidance on how easy it might be to add a new source
type to the File puppet type in the puppet code base.
Essentially it would work something like:
node 'aws-ec2-instance' {
file { "/etc/puppet/secure/keys/private_key.pkcs7.pem":
owner => puppet,
group => puppet,
mode => 0400,
*source **=> "s3://myorg-puppetmaster/hiera-eyaml.key"*
}
}
(I assume that this would run locally on the agent "aws-ec2-instance' and
not the puppetmaster. So the agent could leverage the credentials provided
by the IAM role).
Using the AWS SDK for Ruby it seems like it would be straight forward to
add to puppet. However I am new to the puppet code base (and have limited
Ruby programming experience).
I have been trying to find areas of the code base I think I would either
need to modify or add files to. Here is a list of files I believe I would
need to extend:
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/file_serving/terminus_selector.rb
- Add the new s3 terminus
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/indirector/request.rb
- Update set_uri_key to detect the new s3 URI scheme
- Make changes to do_request?
https://github.com/puppetlabs/puppet/tree/master/lib/puppet/indirector
- Add a new s3.rb file describing how to interact with the s3 service
Is there other areas I would need to modify?
Is this something that would ultimately make it into the application?
I have looked
at https://docs.puppetlabs.com/guides/install_puppet/from_source.html is
there any other good references (blog posts) which would assist with
developing puppet.
Thanks,
Peter
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-dev/c195c20e-eb79-4b37-b906-cca595aa03f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.