Skip to content

Commit

Permalink
Fixes #13137: Make plugin doc build with 5.0 doc
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Aug 22, 2018
1 parent 8bd49f8 commit 8773dec
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 52 deletions.
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
----

0 comments on commit 8773dec

Please sign in to comment.