:toc:
:toc-placement!:
= Provisioning Manager Tool
ifdef::env-github[]
[link=https://travis-ci.org/aloubyansky/pm]
image:https://travis-ci.org/aloubyansky/pm.svg?branch=master["Build Status", link="https://travis-ci.org/aloubyansky/pm"]
endif::[]
toc::[]
= Project Modules
== Module pm-parent
Defines main version and common dependencies of the project.
== Module feature-pack-api
General provisioning and feature-pack API. Which allows to provision the desired
installation specification at a specified location, install additional and/or
uninstall existing feature-packs, export the currently provisioned specification
to a file with the purpose to reproduce it at a different location.
== Module wildfly-provisioning-plugin
WildFly-specific provisioning plug-in which takes care of assembling the
configuration of the provisioned WildFly-based installation.
== Module feature-pack-build-maven-plugin
Maven Mojo implementations (i.e. goals in Maven plugins) to install feature-packs
to the maven repo and to provision the target installation.
== Module wildfly-feature-pack-maven-plugin
WildFly-specific Maven Mojo implementation that builds WildFly feature-packs.
The plugin has to be included into the WildFly feature-pack build modules as
[source,xml]
org.jboss.pm
wildfly-feature-pack-maven-plugin
feature-pack-build
wf-build
compile
== Module tool
Command line interface which allows to:
- Build feature-packs and install them into the Maven repository;
- Provision an installation by pulling the feature-packs from the
Maven repository and installing them at the specified location.;
- View the currently provisioned installation specification;
- Export the currently provisioned installation specification to
a file with goal to reproduce the installation later.
The Maven assembly plug-in is configured to create a single executable JAR
file which contains all the dependencies.
= CLI Commands
== FileSystem commands
The following filesystem commands are available:
- cd - change current work directory
- pwd - print current work directory
- mkdir - create a new directory if it does not already exist
- ls - list the content of a directory
- less - display the content of a file
- rm - remove a file
== provision-spec
[source,shell]
[workdir]$ provision-spec [--dir=]
(Re-)Provisions the installation according to installation specification
provided in an XML file.
Arguments:
[source,shell]
- filesystem path to the XML file describing the desired
installation specification.
--dir - optional, target installation directory. If the argument is
missing, the current work directory is assumed as the target.
----
== install
[source,shell]
----
[workdir]$ install [--dir=]
----
Adds the feature-pack to the installation specification (or creates a new spec
if one does not exist yet) and (re-)provisions the target installation.
Arguments:
[source,shell]
----
- groupId:artifactId:version of the feature-pack to install.
--dir - optional, target installation directory. If the argument is
missing, the current work directory is assumed as the target.
----
== uninstall
[source,shell]
----
[workdir]$ uninstall [--dir=]
----
Removes the feature-pack from the installation specification and
(re-)provisions the target installation.
Arguments:
[source,shell]
----
- groupId:artifactId:version of the feature-pack to
uninstall.
--dir - optional, target installation directory. If the argument is
missing, the current work directory is assumed as the target.
----
== provisioned-spec
=== provisioned-spec display
[source,shell]
----
[workdir]$ provisioned-spec display [--verbose] [--dir=]
----
Displays the currently provisioned installation specification.
Arguments:
[source,shell]
----
--verbose(-v) - whether to include feature-packs not explicitly chosen by
the user but installed as dependencies of other feature-packs.
--dir - optional, target installation directory. If the argument is
missing, the current work directory is assumed as the target.
----
=== provisioned-spec export
[source,shell]
----
[workdir]$ provisioned-spec export
----
Exports the currently provisioned installation specification to the specified
file in the XML format. The resulting file can be used as an argument to
`provision-spec` command.
Arguments:
[source,shell]
----
- file path to store the provisioned specification to.
----
= Building and launching the tool
The tool can be built by executing the following Maven command:
[source,shell]
----
mvn clean install
----
The executable JAR will be built in `pm/tool/target/pm-tool.jar`
There is also a convenience `do.sh` script in the root directory
of the project. If executed w/o arguments, it'll build and launch the tool.
`./do.sh package` will only build the tool.
`./do.sh run` will only launch the already built tool.
= Building WildFly feature-packs
To be able to build WildFly (core, servlet and full) feature-packs the WildFly Maven plugin
from this project has to be included into the target WildFly Maven build configuration.
The following branches can be used as examples:
* WildFly Core: https://github.com/aloubyansky/wildfly-core/tree/new-feature-pack
* WildFly Servlet and Full: https://github.com/aloubyansky/wildfly/tree/new-feature-pack
== WildFly feature-pack build configuration
WildFly feature-pack building Maven plugin expects an XML file named wildfly-feature-pack-build.xml
which contains information about the feature-pack dependencies on other feature-packs, what additional
content to include into the feature-pack, configuration assembly instructions and post provisioning tasks.
== WildFly post provisioning/install tasks configuration
When the target installation has been provisioned content-wise, there still tasks remain to perform to make
the just provisioned installation usable. One of the essential ones is to assemble/adjust the configuration
to what the user has selected. Other tasks include setting file permissions, correcting line endings for
certain files, create expected directories.
These tasks are described in wildfly-tasks.xml file which is included into the resources of the WildFly feature-pack.
The file is created by the WildFly feature-pack building Maven plugin based on the wildfly-feature-pack-build.xml.