Prepare a shared template
StackState Self-hosted v5.1.x
Shared template file have information that's going to be used across instances, like: Component Types, IdExtractor functions for components and relations, Component Template functions, Relation Template functions, or Layers. They can be derived from the exported .stj file, by exporting configuration nodes with shared in their identifiers, for example "identifier": "urn:stackpack:{StackPackName}:shared:relation-template-function:test-relation-template",.
Shared template file has information that's going to be used across instances, like:
Component Types
Component Type in a template file has a PNG or SVG icon image that's base64 encoded as in the example below:
{
"_type": "ComponentType",
"name": "exchange_server",
"id": -147,
"identifier": "urn:stackpack:{{StackPackName}}:shared:component-type:exchange-server",
"iconbase64": "{{ include "./icons/icon.svg" "base64" }}"
},Relation Types
Contains Relation name and direction.
{
"_type": "RelationType",
"name": "hosted_on",
"id": -121,
"identifier": "urn:stackpack:{{StackPackName}}:shared:relation-type:hosted_on",
"dependencyDirection": "ONE_WAY"
}Component Template functions
Relation Template functions
Component IdExtractor functions
Relation IdExtractor functions
Layers
Domains
Environments
The next step is: Prepare an instance template file
Last updated