Skip to content

Commit 0e69ef4

Browse files
committed
Update proposal based on feedback
Signed-off-by: Jeff Mesnil <jmesnil@ibm.com>
1 parent 57d9452 commit 0e69ef4

File tree

1 file changed

+38
-35
lines changed

1 file changed

+38
-35
lines changed

provisioning/WFGP-292_doc_galleon-pack.adoc

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ feature-team:
1515
---
1616
= Generate documentation for Galleon feature packs
1717
:author: Jeff Mesnil
18-
:email: jmesnil@redhat.com
18+
:email: jmesnil@ibm.com
1919
:toc: left
2020
:icons: font
2121
:idprefix:
2222
:idseparator: -
2323

24-
| *_"Javadoc" for feature packs_*
24+
*_"Javadoc" for feature packs_*
2525

2626
The goal of that proposal is to provide documentation of the capabilities and resources that are provided by WildFly and its ecosystem of Galleon feature packs.
27-
This documentation is self-contained and automatically generated when the featuer pack are built ).
27+
This documentation is self-contained and automatically generated when the feature packs are built.
2828

2929
== Overview
3030

@@ -38,8 +38,8 @@ However, over time, this approach has shown some cracks:
3838

3939
* Some new subsystems are provided by other configurations (e.g. standalone-microprofile.xml). This was worked around by adding additional extensions when the model referenced is generated (in WildFly's `docs` module) but is out of sync.
4040
* WildFly is now composed of 2 Galleon packs (wildfly-ee-galleon-pack & wildfly-galleon-pack). Each Galleon pack provides different extensions and resources but this is not clear from the management model (e.g. which Galleon pack provides the `microprofile-config-smallrye` subsystem?)
41-
* Additional capabilities for WildFly are provided by other feature packs (mvc-krazo, grpc, wildfly-preview, etc.) that do not provide their model references and makes it more difficult for the users to understand which resources, attributes and operations are available to configure their installations. They have to rely on jboss-cli to get the information and while it is available, it does not make it very user friendly.
42-
* More generally, the tool that is used to generate this model reference (wildscribe) is lagging behind new WildFly management features (stability level was added recently while its been in WildFly for some time)
41+
* Additional capabilities for WildFly are provided by other feature packs (mvc-krazo, grpc, wildfly-preview, etc.) that do not provide their model references and makes it more difficult for the users to understand which resources, attributes and operations are available to configure their installations. They have to rely on jboss-cli to get the information and while it is available, it does not make it very user-friendly.
42+
* More generally, the tool that is used to generate this model reference (wildscribe) is lagging behind new WildFly management features (stability level was added recently while it's been in WildFly for some time)
4343

4444
We can improve the user experience for WildFly users by consolidating our tooling and providing consistent documentation for the WildFly ecosystem.
4545

@@ -62,18 +62,19 @@ This documentation should be generated when the feature pack is built and made a
6262
=== Affected Projects or Components
6363

6464
* WildFly Galleon Plugins - https://github.com/wildfly/galleon-plugins
65-
** Add a `doc` goal to the maven plugin to generate a companion doc archive next to the feature pack itself
65+
** Generate documentation when the `build-feature-pack` goal is invoked. It generates a companion doc archive next to the feature pack itself
6666
* Galleon - https://github.com/wildfly/galleon
6767
** Might be impacted if we are missing any metadata from the feature pack to generate its documentation
6868
* Wildscribe - https://github.com/wildfly/wildscribe
69-
** Reuse its site-generator to generate the Model reference of the feature packs
69+
** This RFE would be a full replacement of Wildscribe that would be archived.
7070
* Any project publishing feature packs (wildfly, grpc-feature-pack, ai-feature-pack, etc.)
7171
** They will be updated to bump the version of the Galleon maven plugin
72-
** They will have to execute the `doc` goal, *in addition to the `build-feature-pack` goal*
7372
** *No other changes should be required*
7473
* WildFly - https://github.com/wildfly/
75-
** Its model references will be generated when its feature packs are built. The dependency to wildscribe from its docs module will be removed
76-
** WildFly release process will have to be updated so that its model reference is published to https://docs.wildfly.org/ based on this new doc archive instead of the model reference generated by wildfly docs module.
74+
** Its model references will be generated when its feature packs are built.
75+
*** For WildFly, we could generate a single documentation entry points that would document the wildfly-galleon-pack and also the capabilites coming from the wildfly-ee-galleon-pack.
76+
** The dependency to wildscribe from its docs module will be removed and replaced by unarchiving the documentation when the wildfly-galleon-pack feature pack is built.
77+
** There would be no changes to the WildFly release process.
7778

7879
=== Relevant Installation Types
7980

@@ -82,29 +83,35 @@ This requirement does not impact installation types.
8283
== Requirements
8384

8485

85-
* When the `doc` goal of the `org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin` is invoked (i.e. when the feature pack is built), generate a `doc.zip` archive that contains:
86+
* When the `build-feature-pack` goal of the `org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin` is invoked (i.e. when the feature pack is built), generate a `-doc.zip` archive that contains:
8687
** human-readable HTML documention of the feature pack stored in a `doc` directory. This documentation includes:
8788
*** the Model reference of the resources provided by the feature pack (in a format similar to the existing https://docs.wildfly.org/36/wildscribe/[WildFly model reference])
8889
*** the log messages that can be displayed by the feature pack (in a format similar to the existing https://docs.wildfly.org/36/wildscribe/log-message-reference.html[WildFly log messages])
89-
** the model reference of the resources provided by the feature pack (stored in a DMR representation in a JSON file) - generated during the `build-feature-pack` goal and stored in a `META-INF/model.json` file
90-
** the metadata of the feature pack (stored in a JSON file) - generated during the `build-feature-pack` goal and stored in a `META-INF/metadata.json` file
91-
* This companion doc.zip is attached to the feature pack's Maven model with the coordinates:
90+
** the model reference of the resources provided by the feature pack (stored in a JSON file containing the DMR representation) - generated during the `build-feature-pack` goal and stored in a `META-INF/model.json` file
91+
** the metadata of the feature pack (stored in a JSON file) - generated during the `build-feature-pack` goal and stored in a `META-INF/metadata.json` file. Information provided by these metada includes:
92+
*** General information on the feature pack (name, description, scm, licenses)
93+
*** Layers (including their depencencies, packages and properties)
94+
* This companion doc.zip is attached to the feature pack's Maven module (`<project>`) with the coordinates:
9295
** `groupId` - same as the feature pack
9396
** `artifactId` - same as the feature pack
9497
** `version` - same as the feature pack
9598
** `classifier` - `doc`
9699
** `extension` - `zip`
97100
* When the feature pack is installed or published, this companion doc.zip is also installed and published
101+
** This new artifact would be signed during publication (as is the feature pack itself)
98102
* Other tools that wants to leverage this documentation artifacts must not expect they are always availavle alongside the feature pack. It will only exist when feature packs project are upgraded to the Galleon Maven plugin that provides this feature.
103+
* The generated documentation will uses information from the feature pack's pom.xml (description, scm, licenses, etc.)
99104

100105
=== Non-Requirements
101106

102-
* the Look and Feel of the generated documenation is not configurable (it is based on wildscribe L&F).
107+
* the Look and Feel of the generated documenation is not configurable.
103108

104109
=== Future Work
105110

106111
* This documentation archive can be leveraged by other tools to provide an extensive and exhaustive documentation for all feature packs provided by the WildFly community
107112
* We might consider adding the documentation of the feature packs that are used to provision a WildFly installation *inside* the installation itself.
113+
* We could build a searchable index of the documentation (to improve its accessibility).
114+
There is also work on a https://github.com/model-graph-tools[Graph representation of the WildFly management model] that could enhance the documentation experience
108115

109116
== Implementation Plan
110117

@@ -114,29 +121,25 @@ This requirement does not impact installation types.
114121

115122
=== Wildscribe
116123

117-
* Modify wildscribe's site-generator so that it can read the DMR output of a `:read-resource-description` from a JSON file (in addition to read it from a DMR file).
124+
* Archive the project.
118125

119126
=== Galleon Maven Plug-in
120127

121-
. When the `build-feature-pack` goal of the `org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin` is invoked (ie when the feature pack is built):
122-
.. generate the model reference of the feature pack by executing `:read-resource-description` operation(s)
123-
on the server provisioned by the plugin (that only contains the resources provided by the feature pack)/
124-
.. Store that model in a JSON file, `model.json`
125-
.. Generate and store feature pack metadata in a `metadata.json`
126-
** this metadata includes data coming from the feature pack itself (eg its layers and their dependencies) and the `pom.xml` (project url, description, licenses, etc.)
127-
. When the `doc` goal of the `org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin` is invoked:
128-
.. Generate human-readable documentation based on the feature pack model.json and metadata.json files
129-
** Model reference is generated by delegating it to wildscribe's site-generator.
130-
*** We will have to filter out the descriptions of resources that do not belong to the feature pack that is built (e.g. `path`, `socket-binding`) or filter in the `/subsystem` and `/deployment` substrees only.
131-
** Log messages are extracted from the provisioned server's JBoss modules
132-
*** This code in wildscribe might have to be updated to ensure that we only keep the log messages for the JBoss modules brought by the feature pack that is built.
133-
.. Create a `doc.zip` archive that contains:
134-
** `META-INF/model.json` - the Model reference (stored in a DMR format in a JSON file)
135-
** `META-INF/metadata.json` - the feature pack metadata
136-
** `doc/` - Generated HTML documentation about the feature pack. In particular:
137-
*** `doc/index.html` - Home page of the feature pack documentation
138-
*** `doc/reference/index.html` - Home page of the model reference of the feature pack
139-
.. Attach this `doc.zip` archive` to the Maven project:
128+
When the `build-feature-pack` goal of the `org.wildfly.galleon-plugins:wildfly-galleon-maven-plugin` is invoked (ie when the feature pack is built):
129+
130+
. generate the model reference of the feature pack by executing `:read-resource-description` operation on the server provisioned by the plugin (that only contains the resources provided by the feature pack)
131+
. Store that model in a JSON file, `model.json`
132+
. Generate and store feature pack metadata in a `metadata.json`
133+
. Generate human-readable documentation based on the feature pack model.json and metadata.json files
134+
* Model reference is generated by delegating it to a dedicated `doc-gen` Maven project (that does not depend on Maven plugin API)
135+
* Log messages are extracted from the provisioned server's JBoss modules
136+
. Create a `-doc.zip` archive that contains:
137+
* `META-INF/model.json` - the Model reference (stored in a DMR format in a JSON file)
138+
* `META-INF/metadata.json` - the feature pack metadata
139+
* `doc/` - Generated HTML documentation about the feature pack. In particular:
140+
** `doc/index.html` - Home page of the feature pack documentation
141+
** `doc/reference/index.html` - Home page of the model reference of the feature pack
142+
. Attach this `-doc.zip` archive to the Maven project.
140143

141144
== Security Considerations
142145

0 commit comments

Comments
 (0)