Content Store
Motivation
Setting up Stroom is complex. Reusing other people’s work is much easier. The Content Store allows you to import packages of tested, consistent content.
How to find it
The Content Store can be accessed via the Stroom Menu:
What is a Content Store?
A Content Store is a YAML text file that references a number of sources of content. The content needs to be available via Git.
The default Content Store can be found here:
https://github.com/gchq/stroom-content/blob/master/source/content-store.yml
.
You can add extra or completely different Content Stores for your instance of Stroom by defining them within your local.yml configuration file.
See below for details.
Security Considerations
The content within a Content Pack has full access to your Stroom system. You should examine the content carefully before trusting it.
Managing Content Packs
Importing
Open the Content Store via the Stroom Menu Tools > Content Store.
Select the Content Pack you are interested in and click the Install button.
A new Git Repo document will be created in the Explorer Tree and content pulled from Git.
Some Content Packs might be marked as requiring authentication. In this case you will need to contact the provider of the Content Pack for credentials.
Deleting
Select the Git Repo document in the Explorer Tree. Right click the document and select Delete. Confirm the deletion and the Content Pack will be removed.
Updating
There are two types of update that may be available:
- The content within Git may have been updated
- The values within the Content Store may be referencing new content; for example a new Git URL or a new Git commit.
Updating via the Content Store
Both of these update routes are managed within the Content Store.
Open the Content Store via the Stroom Menu Tools > Content Store.
The Content Store will check whether updates are available in the background. This may take a few minutes. If an update is available the Upgrade button will be enabled. Clicking that button will immediately start the upgrade process. Once the upgrade is complete a summary is shown.
Updating via the Git Repo Document
You can also update the content within the Git Repo document, although this won’t update any changes to the Content Store such as a new Git URL or Commit Hash. Double-click the Git Repo document in the Explorer Tree to open a tab showing the details.
On the Settings tab, click Check for updates.
Any available changes to the content within the Git Repository will be shown in
diff format
.
To update click Pull from Git.
Any updates will immediately be imported into Stroom.
The difference between a Content Pack and a Git Repo
You will notice that the settings tab of Git Repo documents created manually looks slightly different to those created via the Content Store. This is because some of the fields should be controlled by the Content Store, otherwise upgrades might do unexpected things. It isn’t possible to push changes to content packs back into Git.
If you need to push content back into Git then it is recommended that you create a Git Repo document manually.
Defining a Content Store
A Content Store is a YAML text file. The default Content Store is annotated so see that file for full definitions of all the fields.
The overall format is:
metasection at the start, with information about the person or organisation that created and manages the Content Store.contentPackssection, listing all the Content Packs.
Each content pack has the following fields:
id - Unique ID for the Content Pack within the Content Store.
uiName - The name for the Content Pack, as shown in the Content Store user-interface.
iconUrl - URL to get the icon.
Any image format is supported.
licenseName - Short form for the license.
For example; Apache 2.0.
stroomPath - Where the Git Repo will be created within the Explorer Tree.
gitRepoName - The name of the Git Repo.
If not specified then the value of the uiName is used.
details - Description of the Content Pack, formatted in
Markdown
.
gitUrl - The URL of the Git repository; for example
https://github.com/gchq/stroom-content.git
or git@github.com:gchq/stroom-content.git
gitBranch - The name of the Git branch within the repository.
For example master or main.
gitPath - The relative path to the root of the content to import or export.
gitCommit - Optional Git commit hash for the content to import.
If this is specified the Git repository is effectively locked to that version.
Thus any updates will require an updated version of the Content Store file.
gitNeedsAuth - true, if the user needs to enter credentials to access the Content Pack, or false if the content is freely downloadable.
Adding extra Content Stores
The Content Stores that are available for a user to use are defined in the Stroom configuration file (see below) or via the System Property stroom.contentStore.urls.
If nothing is specified in the configuration file then the
default Content Store URL
is used.
Extra URLs can be added to the YAML array of URLs; for example:
appConfig:
contentStore:
urls:
- "https://raw.githubusercontent.com/gchq/stroom-content/refs/heads/master/source/content-store.yml"
- "https://intranet.local/stroom/myorg-content-store.yml"