Packaging
StackState Self-hosted v5.1.x
What is a StackPack package?
StackPacks are essentially .zip archives that contain a file structure allowing for StackPack presentation in StackState, installation, provisioning and configuration of StackState. The .zip extension must be changed to .sts to make the archive visible as a StackPack in StackState. A StackPack archive has the following structure:
<your-stackpack>
βββ provisioning
β βββ icons
β | βββ icon.png
β βββ scripts
β β βββ ExampleProvision.groovy
β βββ templates
β βββ instance template.json.handlebar
β βββ application template.json.handlebar
βββ resources
β βββ logo.png
β βββ overview.md
βββ stackpack.confWhat is inside the StackPack package?
Inside the .sts archive you can find the provisioning directory, resources directory and a configuration file. Provisioning directory is prepared for provision groovy scripts, and Templates.
provisioningdirectory is where all icons, templates, andgroovyscripts used for provisioning the StackPack are stored. The provisioning can also be split into multiple groovy scripts, and theprovisioningdirectory is part of theclasspathwhile provisioning the StackPack. Find more on Groovy in StackState.resourcesdirectory has all the static resources and contents for the StackPack. They're available in the Groove code through/stackpack/{stackpack-name}/resources/{resource}.stackpack.confis where the StackPack is configured. See the section below for more details.Templates- these files are StackState Templated JSON handlebar files that reflect StackState configuration; it may containComponentTypes,Id Extractorsand component/relations templates. Find more details on the templates page
The StackPack configuration file
A StackPack should have a HOCON configuration file named stackpack.conf in the root directory. The structure of the file should look like this:
name- Name of the StackPack. This is what is used to uniquely identify the StackPack. (Required)displayName- Name that's displayed on both the StackPack listing page and on the title of the StackPack page. (Required)version- Semantic version of the StackPack. StackPacks with the same major version are considered compatible. (Required)isNew- This specifies whether the StackPack is new, as in the StackPack version is the first publicly available version. The values can beyes/no/true/false. By default, it's consideredfalse.logoUrl- Specifies the logo used as a badge for the StackPack. It could be any of the resource URL as defined here. (Required)categories- These are keywords using which the StackPacks can be filtered. Any list of relevant labels can be passed here. It's recommended to keep labels in capitalized letters.overviewUrl- Markdown resource with general information about the StackPack. By default, it's assumed to be/overview.md.detailedOverviewUrl- Optional Markdown resource that described the StackPack in a bit more detailed fashion. This is displayed in two columns below the installed instances section in the StackPack page. Markdown comment,[comment]: # (split)is used to delimit the two columns in the markdown.configurationUrls- Contains the Markdown resources relevant for various states of StackPack provisioning.faqs- Frequently asked questions concerning the StackPack or its installation. A list with each element having the format:steps- Describes the configuration fields. See Configuration input.provision- Defines the provisioning script. For example, if the script isExampleProvisionthen,provisioning/ExampleProvision.groovyis looked up to see if there is a groovy class namedExampleProvisionwhich extendscom.stackstate.stackpack.ProvisioningScriptfromstackpack-sdk.releaseNotes- Markdown file containing release notes for the current StackPack release. Shown when installing the StackPack.upgradeInstructions- Markdown file containing upgrade instructions for the current StackPack release. Shown when upgrading the StackPack.
Last updated