Add a Stack
Motivation
If your company or clients have multiple similar setups or reference architectures, making them readily available to all employees or clients could make sense. All product versions are pinned in the custom-defined stack, so you can easily spin up a stack containing the identical versions as your production setup. You can use your defined stack to give it to colleagues or potential customers to show the overall architecture of the Data Platform you will build.
Please keep in mind that a stack requires a release to run on. In most cases, the stackable provided release should work fine, but you can also look at the chapter Add a Release on creating your release.
1. Create a stacks.yaml
For a custom stack you need to create a mycorp-stacks.yaml
containing stacks according to the format defined by
the Stackable provided stacks.
As of writing a stacks.yaml
file could look as follows:
stacks:
mycorp-warehouse:
description: Internal stack we use to build our warehouses
stackableRelease: 22.09 # or use your custom release mycorp-release1
labels:
- mycorp
- warehouse
manifests:
# We have Superset in out Stack, which needs a postgressql instance
# So let's install that first
- helmChart: &template-postgresql-superset
releaseName: postgresql-superset
name: postgresql
repo:
name: bitnami
url: https://charts.bitnami.com/bitnami/
version: 11.0.0
options:
auth:
username: superset
password: superset
database: superset
- plainYaml: https://my.corp/stacks/mycorp-warehouse/trino.yaml
- plainYaml: https://my.corp/stacks/mycorp-warehouse/superset.yaml
2. Using the Custom stacks.yaml
File
After creating the mycorp-stacks.yaml
file, it can be added to the available stacks in stackablectl
via the CLI
argument --stack-file mycorp-demos.yaml
.
The argument to --stack-file
can be a path to a file on the local filesystem or a URL. For example, the demo file can
be put into a central Git repository and referenced by all teams or clients. Multiple "`--stack-file` flags can be
specified to include multiple stack files.
Additionally, the custom file can be provided using an environment variable. The variable can be defined by export
in
the shell or a .env
file.
STACKABLECTL_STACK_FILES=stacks1.yml,stacks2.yml
Every additional stack will be added to the already existing stacks in stackablectl
, so all the available stack files
will be merged.