Stroom Content is a repository of the content definition files used to import entities into Stroom. Entities are such things as XML Schemas, XSLT translations, data splitter definitions, pipelines, dashboards, visualisations, etc. This repository provides a means to share common Stroom content in a form that can be imported into multiple instances of Stroom.
The content is grouped into a number of content packs which can each be built into a zip file that is ready for import directly into Stroom.
The following content packs are currently available. Click on the link for details of what is in each content pack.
The core XML Schemas required by Stroom for basic operation.
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v2.0 | Y | Y |
v1.1 | Y | Y |
v1.0 | Y | Y |
An XML Schema standard for describing audit events.
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v3.2.3 | Y | Y |
v3.1.2 | Y | Y |
v3.1.1 | Y | Y |
v1.0 | Y | Y |
A set of Dashboard entities for displaying various metrics about the state of the Stroom application and the undelying hardware and file systems.
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v1.1 | Y | Y |
v1.0 | Y | Y |
A set of StatisticStore entities for representing the internal statistics generated by Stroom and record by the SQL Statistics service. This pack was previously known as 'internal-statistics' so the versions in the matrix below refer to either name.
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v2.1 | N | Y |
v2.0 | N | Y |
v1.2 | Y | N |
v1.1 | Y | N |
v1.0 | Y | N |
A set of StroomStatsStore entities for representing the internal statistics generated by Stroom and recorded by the Stroom-Stats service.
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v2.1 | N | Y |
v2.0 | N | Y |
The entities used in the quick start guide
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v1.0 | Y | Y |
Pack version | Stroom 5.0.x | Stroom 6.0.x |
---|---|---|
v1.0 | N | Y |
v1.1 | N | Y |
Each content pack is defined as a directory within stroom-content-source with the name of content pack being the name of the directory.
There are currently two methods to building content packs, a Gradle build or a python script. The former has superseded the latter, though the python script is still useful if you want all packs built into a single zip file. For all other purposes the Gradle build should be favoured.
The Gradle build will manage the dependencies between content packs, including transitive dependencies, so if you want a pack that has dependencies on other packs then those dependency packs will get built with it. Running the build requires xmllint and python.
To run a full build of all packs do:
./gradlew clean build
If you just want to validate the pack's source to make sure the UUID references are correct and there are no clashes, then do:
./gradlew validate
To build a single pack do something like:
./gradlew clean :my-pack-name:build
The build will place the following pairs of zip files in ./build/distributions
:
-
my-pack-name.zip
-
my-pack-name-all.zip
The -all
variant contains all dependency packs and is therefore larger. The other zip just contains the named pack with no dependencies.
The content packs can be built into the zip files by running the python script buildContentPacks.py. You can either build all packs or a list of named packs and you can choose to have them packaged as single combined zip or one per pack.
For example:
#build all packs into a single zip
./buildContentPacks.py --combine --all
#build all packs, one zip per pack
./buildContentPacks.py --all
#build a named list of packs
./buildContentPacks.py stroom-101 core-xml-schemas
To see all the pre-built content packs see the releases page.
The content pack zip files can be imported into Stroom by selecting Import from the Tools menu.
Each Stroom entity is identified by a Universally Unique Identifier. Where entities have dependencies on other entities, e.g. a Dashboard entity depends on a StatisticStore entity, this dependency relationship is defined by the UUID of the dependency entity. It is possible to import content into Stroom with missing dependencies as this can sometimes be a valid use case, though with missing dependencies the entities will not work correctly until the dependencies are resolved, e.g. by updating the dependency.
All the entities defined in these content packs are defined with hard coded UUIDs and dependencies. It is therefore critical that the correct UUIDs are used in the entity and dependency definitions in the XML.
Where a Stroom folder is used in more than one content pack, you should ensure that the name of the folder and its UUID matches for all instances.
The dependencies between content packs are also defined in the Gradle build.gradle
file in the root of each content pack directory. The createSkeletonPack.sh
script will create a skeleton build.gradle
file for you with an example of how to define dependencies on other packs. A pack should define all direct dependencies it has in its entities and not rely on transitive dependencies as this is more explicit.
The following helper shell scripts exist to assist in content pack creation.
This script will create a skeleton structure for a new content pack.
./createSkeletonPack.sh my-new-pack
This script can be run from within an directory to create a new Stroom Folder (XML definition file and directory). This should only be used to create a directory that doesn't already exist in Stroom as it will have a new UUID generated for it.
This script (requires python3) will strip the audit elements (e.g. <createUser>...</createUser>
) from all xml files. This is to make it easier to clean any content generated in stroom and exported out for inclusion in a content pack.