Jira (BOLT-1449) Load Task based Plugins from the modulepath

9 views
Skip to first unread message

Alex Dreyer (JIRA)

unread,
Jul 2, 2019, 10:53:03 AM7/2/19
to puppe...@googlegroups.com
Alex Dreyer created an issue
 
Puppet Task Runner / New Feature BOLT-1449
Load Task based Plugins from the modulepath
Issue Type: New Feature New Feature
Assignee: Unassigned
Created: 2019/07/02 7:52 AM
Priority: Normal Normal
Reporter: Alex Dreyer

Users should be able to implement plugin hooks as tasks that are loaded from the modulepath and configure those plugins in bolt.yaml.

Implementation:

  • The plugin name is the same as the module name.
  • Bolt should look for a task name matching the hook name to run.(ie my_plugin::inventory_targets)
  • Plugins have metadata at the top level of the module bolt_plugins.json
  • bolt_plugins.json has a config key that describes the schema of the plugins bolt.yaml configuration.
  • If there is a config key than a configuration hash will be passed to all hooks as the metaparameter _config
  • _boltdir will be passed as a metaparameter to the plugin tasks.

Hook Formats:
inventory_targets:
arbitrary plugin specific parameters(based on task's metadata)

inventory_config:
arbitrary plugin specific parameters(based on task's metadata)

createkeys:
no parameters

encrypt:
encrypted_value: encoded encrypted value ie ENC[GPG]<base64>

decrypt:
plaintext_value: base 64 encoded plain text value to encrypt.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Alex Dreyer (JIRA)

unread,
Jul 2, 2019, 10:58:02 AM7/2/19
to puppe...@googlegroups.com
Alex Dreyer updated an issue
Change By: Alex Dreyer
Users should be able to implement plugin hooks as tasks that are loaded from the modulepath and configure those plugins in bolt.yaml.

h2. Implementation :
* The plugin name is the same as the module name.
* Bolt should look for a task name matching the hook name to run.(ie my_plugin::inventory_targets)
* Plugins have metadata at the top level of the module {{
bolt_plugins bolt_plugin .json}}
* {{
bolt_plugins bolt_plugin .json}} has a {{config}} key that describes the schema of the plugins {{bolt.yaml}} configuration.
* If there is a config key than a configuration hash will be passed to all hooks as the metaparameter {{_config}}
* {{_boltdir}} will be passed as a metaparameter to the plugin tasks.
* plugin tasks will only support running on {{localhost}} and should use the same PAL/executor as the task plugin


h2.
Hook Formats :

h3.
inventory_targets :
arbitrary plugin specific parameters(based on task's metadata)

h3. inventory_config :
arbitrary plugin specific parameters(based on task's metadata)

h3. validate_inventory_config
arbitrary plugin specific parameters
If no hook is provided the parameters should be validated against the inventory_config task metadata.

h3.
createkeys :
no parameters

h3. encrypt :
encrypted_value: encoded encrypted value ie ENC[GPG]<base64>

h3. decrypt :
plaintext_value: base 64 encoded plain text value to encrypt.

h2. Questions
Do we need to version the hook formats immediately?
Can a module be a plugin without a {{bolt_plugin.json}}
Should we support {{bolt_plugin.yaml}}? No this should not happen unless we want to support task metadata.yaml




Lucy Wyman (JIRA)

unread,
Jul 2, 2019, 12:56:02 PM7/2/19
to puppe...@googlegroups.com
Lucy Wyman updated an issue
Change By: Lucy Wyman
Users should be able to implement plugin hooks as tasks that are loaded from the modulepath and configure those plugins in bolt.yaml.

h2. Implementation
The plugin name is the same as the module name.
* Bolt should look for a task name matching the hook name to run.(ie my_plugin::inventory_targets)
* Plugins have metadata at the top level of the module {{bolt_plugin.json}}
* {{bolt_plugin.json}} has a {{config}} key that describes the schema of the plugins {{bolt.yaml}} configuration.

* If there is a config key than a configuration hash will be passed to all hooks as the metaparameter {{_config}}
* {{_boltdir}} will be passed as a metaparameter to the plugin tasks.
* plugin tasks will only support running on {{localhost}} and should use the same PAL/executor as the task plugin

h2. Hook Formats

h3. inventory_targets
arbitrary plugin specific parameters(based on task's metadata)

h3. inventory_config
arbitrary plugin specific parameters(based on task's metadata)

h3. validate_inventory_config
arbitrary plugin specific parameters
If no hook is provided the parameters should be validated against the inventory_config task metadata.

h3. createkeys
no parameters

h3. encrypt
encrypted_value: encoded encrypted value ie ENC[GPG]<base64>

h3. decrypt
plaintext_value: base 64 encoded plain text value to encrypt.

h2. Questions
Do we need to version the hook formats immediately? No. We can add new parameters without requiring users to specify a new version.
Can a module be a plugin without a {{bolt_plugin.json}}? A module doesn't need a bolt_plugin.json (for now...).
Should we support {{bolt_plugin.yaml}}? No this should not happen unless we want to support task metadata.yaml




Lucy Wyman (JIRA)

unread,
Jul 2, 2019, 12:56:03 PM7/2/19
to puppe...@googlegroups.com

Lucy Wyman (JIRA)

unread,
Jul 25, 2019, 2:26:07 PM7/25/19
to puppe...@googlegroups.com

Alex Dreyer (JIRA)

unread,
Jul 29, 2019, 1:50:03 PM7/29/19
to puppe...@googlegroups.com
Alex Dreyer commented on New Feature BOLT-1449
 
Re: Load Task based Plugins from the modulepath

This will end up needing a PUP ticket.

Alex Dreyer (JIRA)

unread,
Jul 29, 2019, 1:50:03 PM7/29/19
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages