Giter Site home page Giter Site logo

mikekiwa / stroom-content Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gchq/stroom-content

0.0 1.0 0.0 348 KB

Content for Stroom such as XML Schemas, translations, pipelines and dashboards

License: Apache License 2.0

Python 61.93% Shell 13.52% XSLT 24.56%

stroom-content's Introduction

Stroom Content

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.

Content pack contents

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.

Compatibility matrix

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.

Compatibility matrix

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.

Compatibility matrix

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.

Compatibility matrix

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.

Compatibility matrix

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

Compatibility matrix

Pack version Stroom 5.0.x Stroom 6.0.x
v1.0 Y Y

Compatibility matrix

Pack version Stroom 5.0.x Stroom 6.0.x
v1.0 N Y
v1.1 N Y

Building the content packs

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.

Gradle build

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.

Python script (deprecated)

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

Released content packs

To see all the pre-built content packs see the releases page.

Importing the content packs

The content pack zip files can be imported into Stroom by selecting Import from the Tools menu.

Content pack development

IMPORTANT - A word about UUIDs

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.

Gradle dependencies

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.

Helper scripts

The following helper shell scripts exist to assist in content pack creation.

createSkeletonPack.sh

This script will create a skeleton structure for a new content pack.

./createSkeletonPack.sh my-new-pack

createNewStroomFolder.sh

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.

removeAuditElements.py

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.

stroom-content's People

Contributors

at055612 avatar jc064522 avatar gchq-11 avatar stroomdev66 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.