OpenShift install
StackState Self-hosted
Before you start
Extra notes for installing on:
OpenShift clusters with limited permissions: Read the required permissions.
Kubernetes: Refer to the Kubernetes installation instructions.
Before you start the installation of StackState:
Check that your OpenShift environment meets the requirements
Request access credentials to pull the StackState Docker images from StackState support.
Ensure you have the OpenShift command line tools installed (
oc
)Add the StackState helm repository to the local helm client:
Install StackState
For environments without internet access, also known as air-gapped environments, first follow these extra instructions.
Also make sure to follow the air-gapped instalaltion instructions whenever those are present for a step.
Create project
Start by creating the project where you want to install StackState. In our walkthrough we will use the namespace stackstate
:
The project name is used in helm
and kubectl
commands as the namespace name in the --namespace
flag
Generate values.yaml
values.yaml
The values.yaml
file is required to deploy StackState with Helm. It contains your StackState license key, StackState Receiver API key and other important information.
Before you continue: Make sure you have the latest version of the Helm charts with helm repo update
.
The StackState values.yaml
file can be generated by running a separate Helm Chart, the stackstate/stackstate-values
chart. A sample command line is:
This command will generate a values.yaml file which contains the necessary configuration for installing the StackState Helm Chart.
The StackState administrator passwords will be autogenerated by the above command and are output as comments in the generated values.yaml
file. The actual values contain the bcrypt
hashes of those passwords so that they're securely stored in the Helm release in the cluster.
The values that can be passed to this chart are:
Configuration | Value | Description |
---|---|---|
Receiver API Key |
| The API key used by StackState to receive data from agents. This is a secret key that should be kept private. If you omit this, a random key will be generated for you. |
Base URL |
| The |
Username and password** |
| The username and password used by StackState to pull images from quay.io/stackstate repositories. For air-gapped environments these need to be the username and password for the local docker registry. |
License key |
| The StackState license key. |
Admin API password |
| The password for the admin API. Note that this API contains system maintenance functionality and should only be accessible by the maintainers of the StackState installation. If you omit this, a random password will be generated for you. If you do pass this value and it's not bcrypt hashed, the chart will hash it for you. |
Default password |
| The password for the default user ( |
Image Registry |
| The registry where the StackState images are hosted. If not provided, the default value will be 'quay.io' |
Pull Secret Username |
| The username used to pull images from the Docker registry where the StackState images are hosted. |
Pull Secret Password |
| The password used to pull images from the Docker registry where the StackState images are hosted. |
Store the generated values.yaml
file somewhere safe. You can reuse this file for upgrades, which will save time and (more importantly) will ensure that StackState continues to use the same API key. This is desirable as it means Agents and other data providers for StackState won't need to be updated.
Create openshift-values.yaml
openshift-values.yaml
Because OpenShift has stricter security model than plain Kubernetes, all of the standard security contexts in the deployment need to be disabled.
Create a Helm values file openshift-values.yaml
with the following content and store it next to the generated values.yaml
file. This contains the values that are needed for an OpenShift deployment.
Deploy StackState with Helm
The recommended deployment of StackState is a production ready, high availability setup with many services running redundantly. If required, it's also possible to run StackState in a non-redundant setup, where each service has only a single replica. This setup is only recommended for a test environment.
For air-gapped environments follow the instructions for the air-gapped installations.
To deploy StackState in a high availability setup on OpenShift:
(Optionally) Create a
small_values.yaml
if you want to deploy a small profile setup. Add the--values small_values.yaml
flag to the command below.Deploy the latest StackState version to the
stackstate
namespace with the following command:
After the install, the StackState release should be listed in the StackState namespace and all pods should be running:
Access the StackState UI
After StackState has been deployed, you can check if all pods are up and running:
When all pods are up, you can enable a port-forward:
StackState will now be available in your browser at https://localhost:8080
. Log in with the username admin
and the default password provided in the values.yaml
file.
Next steps are
Give your co-workers access.
Manually create SecurityContextConfiguration
objects
SecurityContextConfiguration
objectsIf you can't use an administrator account to install StackState on OpenShift, ask your administrator to apply the below SecurityContextConfiguration
objects.
See also
For other configuration and management options, refer to the Kubernetes documentation - manage a StackState Kubernetes installation
Last updated