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

Fixes #10255: Document plugin package format #292

Conversation

peckpeck
Copy link
Member


Rudder has a specific package format for plugins.

You can manage Rudder packages with the rudder-pkg command. This is the documentation of how theyr are created.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they


The metadata file is a JSON file and is named 'metadata':
```
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should clearly state which fields are optional.

# this is purely informative
"build-date": "2017-01-20",
# the list of jar files to enable if this is a webapp plugin
"jarfiles": [ "test.jar" ],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jar-files to stay consistent with build-date

# the list of packages or other plugins that this package depends on
# this is currently only informative
"depends": {
# dependencies on dpkg based systemd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

system?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or a new systemd component I'm no aware of? ;))

"rudder": [ "new-plugin" ]
},
# the plugin content
"content": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script uses metadata['files']

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not defined here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

files is not in the medata, it is only used by the package manager internaly

@peckpeck
Copy link
Member Author

Commit modified

@peckpeck peckpeck force-pushed the ust_10255/document_plugin_package_format branch from a21fb27 to 6b99adb Compare February 21, 2017 17:10
"sles-11": [ ],
# rudder dependency, ie this is a Rudder format package
"rudder": [ "new-plugin" ]
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cript uses metadata['files'] which does not seem defined here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

files is not in the medata, it is only used by the package manager internaly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means removing the example plugin will lead to delete /opt/rudder/share and /var/rudder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No only empty directories installed by the plugin are removed

{
# the only currently supported type in "plugin" (mandatory)
"type": "plugin",
# the plugin name must consist of ascii characters without whitespace (mandatory)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package name if we want to be generic

# the plugin version has the form "rudder_major-version_major.version_minor" (mandatory)
"version": "4.1-1.0",
# this is purely informative (optional)
"build-date": "2017-01-20",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • build-commit

@peckpeck
Copy link
Member Author

Commit modified

@peckpeck peckpeck force-pushed the ust_10255/document_plugin_package_format branch from 6b99adb to 1a58247 Compare February 22, 2017 16:11

Note that ar r inserts or replaces files so you can create your package with incremental inserts.

To extract files, 'use ar x' instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an empty line here? (needed for asciidoc inclusion..)

@peckpeck
Copy link
Member Author

Commit modified

@peckpeck peckpeck force-pushed the ust_10255/document_plugin_package_format branch from 1a58247 to 9f2f8f9 Compare February 22, 2017 16:27
@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit 9f2f8f9 into Normation:branches/rudder/4.1 Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants