Jira (PUP-6175) Extension point for environment providers

3 views
Skip to first unread message

Erik Dalén (JIRA)

unread,
Apr 14, 2016, 11:21:48 AM4/14/16
to puppe...@googlegroups.com
Erik Dalén created an issue
 
Puppet / New Feature PUP-6175
Extension point for environment providers
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2016/04/14 8:20 AM
Priority: Normal Normal
Reporter: Erik Dalén

I would like to have an extension point for environment providers that puppet would ask for a list of modules before compilation (and API calls like listing environments or getting classes from them).

The API needs to be more flexible than the current API that exists with the environment providers (implemented for directory environments). It would be good if it was changed to allow them to provide a list of paths to individual modules instead of a list of modulepaths. That way I could implement something like https://github.com/dalen/spikor as an environment provider instead of copying/linking stuff around on the filesystem. IMHO this is an extension point that is really missing in puppet (even librarian-puppet or r10k could be implemented in much nicer ways if they didn't have to copy all modules into a single directory ahead of time).

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Chris Price (JIRA)

unread,
Apr 14, 2016, 11:38:02 AM4/14/16
to puppe...@googlegroups.com
Chris Price commented on New Feature PUP-6175
 
Re: Extension point for environment providers

I like this idea but I wonder what implications it might have on the caching logic or environment isolation. Would be very interested to hear Henrik Lindberg's thoughts!

Henrik Lindberg (JIRA)

unread,
Apr 14, 2016, 12:17:22 PM4/14/16
to puppe...@googlegroups.com

The main reason for the current implementation (a file layout) is the puppet runtime relies on the layout on disk and file paths to a very high degree. While there could be an API for an environment provider, without quite extensive changes, that environment provider would have to lay down the information on disk and essentially construct a module path that consists of roots of all modules.

I think it is well worth exploring as the knowledge about mapping names to paths is both complicated and implemented in multiple places (autoloader, 4.x loaders, module tooling, puppet server). There is one complication with an API approach as it requires that the environment providers are available in Ruby (later C++) as well as in the JVM (in an efficient way). Now, this is not required since the API is the paths in the file system (plus modulepath). (Imagine an environment provider that is served from in-memory, or from a DB.

If the intent here is to provide "on demand file system layout for an env" then that may be completely doable without extensive changes. I don't see how such an API would have an impact on caching logic or env isolation - it would basically just automate the copying/linking into the right file system location on demand instead of a-priori. There may be a small performance penalty as the module path would grow in size.

Erik Dalén (JIRA)

unread,
Apr 15, 2016, 6:03:17 AM4/15/16
to puppe...@googlegroups.com
Erik Dalén commented on New Feature PUP-6175

Consider that you had the following on disk:

/modules/puppetlabs-postgresql-4.7.1
/modules/puppetlabs-postgresql-3.4.2
/modules/puppetlabs-puppetdb-5.1.2

It would be nice if the environment provider could respond to puppetdb with ["/modules/puppetlabs-postgresql-4.7.1", "/modules/puppetlabs-puppetdb-5.1.2"] and to old_postgres with ["/modules/puppetlabs-postgresql-3.4.2"]

Today they instead have to create environment paths on disk:

/environments/puppetdb/postgresql -> /modules/puppetlabs-postgresql-4.7.1
/environments/puppetdb/puppetdb -> /modules/puppetlabs-puppetdb-5.1.2
/environments/old_postgres/postgresql -> /modules/puppetlabs-postgresql-3.4.2

And respond to puppetdb with ["/environments/puppetdb"] and to old_postgres with ["/environments/old_postgres"].

I think the first option would be nicer. But just having the option to provide your own plugin at all would be a step forward

Ethan Brown (JIRA)

unread,
May 16, 2017, 5:09:04 PM5/16/17
to puppe...@googlegroups.com
Ethan Brown updated an issue
 
Change By: Ethan Brown
Labels: triaged
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Sean McDonald (JIRA)

unread,
May 16, 2017, 5:09:05 PM5/16/17
to puppe...@googlegroups.com

Ethan Brown (JIRA)

unread,
May 16, 2017, 5:09:06 PM5/16/17
to puppe...@googlegroups.com

Erik Dalén (JIRA)

unread,
May 17, 2017, 10:57:02 AM5/17/17
to puppe...@googlegroups.com
Erik Dalén commented on New Feature PUP-6175

Ethan Brown no, this would not be to query for information, it is to be able to provide an alternative implementation of the directory environment provider as a plugin.

Josh Cooper (JIRA)

unread,
Mar 16, 2018, 4:31:03 PM3/16/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Sub-team: Language
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (Jira)

unread,
Jun 11, 2021, 2:03:03 AM6/11/21
to puppe...@googlegroups.com
Josh Cooper commented on New Feature PUP-6175
 
Re: Extension point for environment providers

We don't plans on working on this anytime soon, so I'm going to close this due to lack of activity. Please reopen if this is still needed.

This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages