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 #13137: Make plugin doc build with 5.0 doc #489

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/reference/Makefile
Expand Up @@ -9,7 +9,7 @@ GRAPHVIZ_IMAGES = $(addprefix modules/ROOT/assets/images/graphviz/, $(notdir $(G

MODULES = ROOT installation usage administration plugins reference

content: $(GRAPHVIZ_IMAGES) $(ADOC_DYN_FILES) nav
content: $(GRAPHVIZ_IMAGES) $(ADOC_DYN_FILES) plugins nav

## Dynamic content

Expand All @@ -28,6 +28,10 @@ hooks.adoc:
mkdir -p modules/usage/pages/_partials/dyn/
cp dependencies/$@ modules/usage/pages/_partials/dyn/$@

plugins:
cd dependencies && make $@
cp -r dependencies/$@/* modules/plugins/

nav: $(ADOC_SRC_FILES)
./tools/generate-nav.py ROOT "Introduction" > modules/ROOT/nav.adoc
# installation has a custom nav
Expand All @@ -53,3 +57,5 @@ clean:
rm -rf modules/*/nav.adoc
rm -f modules/*/pages/_partials/dyn/*
rm -rf modules/*/assets/images/graphviz
rm -rf modules/plugins/assets
find modules/plugins/pages ! -name 'index.adoc' -type f -exec rm -f {} +
4 changes: 3 additions & 1 deletion src/reference/dependencies/.gitignore
Expand Up @@ -8,4 +8,6 @@ rudder.8
/ncf-repo/
/rudder-agent-windows-repo/
/rudder-repo/

/plugins/
/rudder-plugins-repo/
/rudder-plugins-private-repo/
23 changes: 19 additions & 4 deletions src/reference/dependencies/Makefile
Expand Up @@ -2,8 +2,8 @@

RUDDER_VERSION = 5.0

.PHONY: clean generic_methods.adoc rudder.adoc hooks.adoc
all: generic_methods.adoc hooks.adoc rudder.adoc
.PHONY: clean generic_methods.adoc rudder.adoc hooks.adoc plugins
all: generic_methods.adoc hooks.adoc rudder.adoc plugins

## Repos

Expand All @@ -20,6 +20,13 @@ rudder-agent-windows-repo:
# Allow failing if builder has no access to agent-windows-repo
git clone git@github.com:Normation/rudder-agent-windows.git rudder-agent-windows-repo || mkdir rudder-agent-windows-repo

rudder-plugins-repo:
git clone https://github.com/Normation/rudder-plugins.git rudder-plugins-repo

rudder-plugins-private-repo:
# Allow failing if builder has no access to agent-plugins-private
git clone git@github.com:Normation/rudder-plugins-private.git rudder-plugins-private-repo || mkdir rudder-plugins-private-repo

## Dynamic content

rudder.adoc: rudder-agent-repo
Expand Down Expand Up @@ -49,10 +56,18 @@ generic_methods.adoc: ncf-repo rudder-agent-windows-repo
sed -i 's/```.*/```/' generic_methods.md
pandoc -t asciidoc -f markdown generic_methods.md > generic_methods.adoc

plugins: rudder-plugins-repo rudder-plugins-private-repo
cd rudder-plugins-private-repo && git checkout branches/rudder/$(RUDDER_VERSION) 2>/dev/null || git checkout master
cd rudder-plugins-private-repo && git pull && make clean && make doc
cd rudder-plugins-repo && git checkout branches/rudder/$(RUDDER_VERSION) 2>/dev/null || git checkout master
cd rudder-plugins-repo && git pull && make clean && make doc
cp -r rudder-plugins-repo/doc/* plugins/
cp -r rudder-plugins-private-repo/doc/* plugins/

## Clean

clean:
rm -f generic_methods.{adoc,md} hooks.adoc rudder.adoc
rm -f generic_methods.{adoc,md} hooks.adoc rudder.adoc plugins

veryclean: clean
rm -rf rudder-agent-repo rudder-repo ncf-repo rudder-agent-windows-repo
rm -rf rudder-agent-repo rudder-repo ncf-repo rudder-agent-windows-repo rudder-plugins-repo rudder-plugins-private-repo
37 changes: 0 additions & 37 deletions src/reference/modules/administration/pages/server.adoc
Expand Up @@ -159,43 +159,6 @@ Reload dynamic groups, so that new nodes and their inventories are taken into
account. Normally, dynamic group are automatically reloaded unless that feature
is explicitly disable in Rudder configuration file.

[[plugins-management]]
== Plugins

Rudder is an extensible software. The *Administration > Plugin Management*
section sum-up information about loaded plugins, their version and their
configuration.

A plugin is an `.rpkg` file (for "Rudder package").

=== Install a plugin

To install a plugin, copy the `.rpkg` file on your server, and run:

----
/opt/rudder/bin/rudder-pkg install-file <package.rpkg>
----

You can list currently installed plugins using:

----
/opt/rudder/bin/rudder-pkg list
----

You can also enable or disable, or remove a plugin with:

----
/opt/rudder/bin/rudder-pkg plugin enable <plugin>
/opt/rudder/bin/rudder-pkg plugin disable <plugin>
/opt/rudder/bin/rudder-pkg remove <package>
----

See all available commands with:

----
/opt/rudder/bin/rudder-pkg --help
----

== Basic administration of Rudder services

=== Restart the agent of the node
Expand Down
42 changes: 33 additions & 9 deletions src/reference/modules/plugins/pages/index.adoc
@@ -1,12 +1,36 @@
[[extending-and-integrating-rudder]]
= Rudder extension and integration with third party software
[[plugins-management]]
= Plugins

Rudder was thought from the begining to be a good citizen in you infrastructure.
Part of that good will intent is translated into the fact that everything is done
so that Rudder is able to inter-operate well with the other parts of your
infrastructure.
Rudder is an extensible software. The *Administration > Plugin Management*
section sum-up information about loaded plugins, their version and their
configuration.

For that, there is two mains way of integrating Rudder with your
existing infrastructure components: you can either extend Rudder with plugins,
or you can extend your existing tools or process to take advantage of Rudder.
A plugin is an `.rpkg` file (for "Rudder package").

== Install a plugin

To install a plugin, copy the `.rpkg` file on your server, and run:

----
/opt/rudder/bin/rudder-pkg install-file <package.rpkg>
----

You can list currently installed plugins using:

----
/opt/rudder/bin/rudder-pkg list
----

You can also enable or disable, or remove a plugin with:

----
/opt/rudder/bin/rudder-pkg plugin enable <plugin>
/opt/rudder/bin/rudder-pkg plugin disable <plugin>
/opt/rudder/bin/rudder-pkg remove <package>
----

See all available commands with:

----
/opt/rudder/bin/rudder-pkg --help
----
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
171 changes: 0 additions & 171 deletions src/reference/modules/usage/pages/configuration_management.adoc
Expand Up @@ -260,177 +260,6 @@ Based on these facts, the compliance of a Rule is calculated like this:
Number of Nodes for which conformity is reached for every Directive of the
Rule / Total number of Nodes on which the Rule has been applied


== Validation workflow in Rudder

The validation workflow is a feature whose purpose is to hold any change (Rule, Directive, Group) made by users in the web interface,
to be reviewed first by other users with the adequate privileges before actual deployment.

The goal is to improve safety and knowledge sharing in the team that is using Rudder.

To enable it, you only have to tick "Enable Change Requests" in the Administration - Settings tab of the web interface. (This feature
is optional and can be disabled at any time without any problem, besides risking the invalidation of yet-unapproved changes)

image::workflows/Enabling.png[]

=== What is a Change request ?

A Change request represents a modification of a Rule/Directive/Group from an old state to a new one.
The Change is not saved and applied by the configuration, before that, it needs to be reviewed and approved by other members of the team.

A Change request has:

- An Id (an integer > 0)
- A title.
- A description.
- A creator.
- A status.
- Its own history.

This information can be updated on the change request detail page.
For now, a Change request is linked to one change at a time.

==== Change request status

There is 4 Change request status:

Pending validation::
- The change has to be reviewed and validated.
- Can be send to: Pending deployment, Deployed, Cancelled.

Pending deployment::
- The change was validated, but now require to be deployed.
- Can be send to: Deployed, Cancelled.

Deployed::
- The change is deployed.
- This is a final state, it can't be moved anymore.

Cancelled::
- The change was not approved.
- This is a final state, it can't be moved anymore.

Here is a diagram about all those states and transitions:

image::workflows/States.png[]

=== Change request management page

All Change requests can be seen on the /secure/utilities/changeRequests page.
There is a table containing all requests, you can access to each of them by clicking on their id.
You can filter change requests by status and only display what you need.

image::workflows/Management.png[]

==== Change request detail page

Each Change request is reachable on the /secure/utilities/changeRequest/id.

image::workflows/Details.png[]

The page is divided into two sections:

Change request information::

display common information (title, description, status, id) and a form to edit them.

image::workflows/Informations.png[]

Change request content::

In this section, there is two tabs:
- History about that change request

image:workflows/History.png[]

- Display the change proposed

image:workflows/Rule_Update_Diff.png[]


=== How to create a Change request ?

If they are enabled in Rudder, every change in Rudder will make you create a Change request.
You will have a popup to enter the name of your change request and a change message.

The change message will be used as description for you Change Request, so we advise to fill it anyway to keep an explanation ab out your change.

image::workflows/Popup.png[]

Change request are not available for Rule/Directive/Groups creation, they are only active if the Rule/Directive/Groups existed before:

Here is a small table about all possibilities:

image::workflows/Table.png[]

=== How to validate a Change request ?

==== Roles

Not every user can validate or deploy change in Rudder.
Only those with one of the following roles can act on Change request:

Validator::
Can validate Change request

Deployer::
To deploy Change Request

Both of those roles:

- Give you access to pending Change requests
- Allow you to perform actions on them (validate or cancel)

You have to change users in */opt/rudder/etc/rudder-users.xml* and include those rights.
Without one of those roles, you can only access Change Request in 'Deployed' or 'Cancelled' and those you opened before.

You can deploy directly if you have both the validator and deployer roles.
The *administrator* Role gives you both the deployer and valdiator role.

There is also the possibility to access Change requests in Read only mode by using the role 'validator_read' or 'deployer_read'.

image::workflows/Validation.png[]

==== Self Validations

Using Change requests means that you want your team to share knowledge, and validate each other change.
So by default:

- *Self validation* is disabled.
- *Self deployment* is enabled.

Those two behaviours can be changed in the property file */opt/rudder/etc/rudder-web.properties*.
'rudder.workflow.self.validation' and 'rudder.workflow.self.deployment' are the properties that define this behaviour.

=== Change request and conflicts

When the initial state of a Change request has changed (i.e.: you want to modify a Directive, but someone else changes about that Directive has been accepted before yours), your change can't be validated anymore.

image::workflows/Conflict.png[]

For now, we decided to reduce to the possibility of an error or inconsistency when there are concurrent changes.
In a future version of Rudder, there will be a system to handle those conflicts, and make sure actual changes are not overwritten.

=== Notifications

In several parts of Rudder webapp there are some Notifications about Change requests.

==== Pending change requests

This notification is displayed only if the validator/deployer role is active on your user account.
It shows you how many Change requests are waiting to be reviewed/deployed.
Clicking on it will lead you to the Change request management page, with a filter already applied.

image::workflows/Notification.png[]

==== Change already proposed on Rule/Directive/Group

When there is a change about the Rule/Directive/Group already proposed but not deployed/cancelled, you will be notified that there are some pending Change requests about that element.
You will be provided a Link to those change request, So you can check if the change is already proposed.

image::workflows/Warning.png[]


[[_policy_mode_audit_enforce]]
== Policy Mode (Audit/Enforce)

Expand Down