OpenShift install
Install StackState on OpenShift
This page describes StackState version 4.3.
The StackState 4.3 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.3 version range to upgrade to a more recent release.
Before you start
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
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
is required to deploy StackState with Helm. It contains your StackState license key, API key and other important information. The generate_values.sh
script in the installation directory of the Helm chart will guide you through generating the file.
Before you continue: If you didn't already, make sure you have the latest version of the Helm chart with helm repo update
.
You can run the generate_values.sh
script in two ways:
Interactive mode: When the script is run without any arguments, it will guide you through the required configuration items.
Non-interactive mode: Run the script with the flag
-n
to pass configuration on the command line, this is useful for scripting.
The script requires the following configuration options:
For OpenShift install, follow the instructions to Automatically install the Cluster Agent.
The generated file is suitable for a production setup (i.e. redundant storage services). It is also possible to create smaller deployments for test setups, see development setup.
Store the 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 will not need to be updated.
Additional OpenShift values file
Because OpenShift has stricter security model than plain Kubernetes, all of the standard security contexts in the deployment need to be disabled. Furthermore, the StackState installation needs to add specific OpenShift SecurityContextConfiguration
objects to the OpenShift installation.
If you're installing using an administrator account it is possible to automatically create these as needed.
If you're not using an administrator account, please follow the instructions below to first install the SecurityContextConfiguration
objects in OpenShift. After that install the StackState Helm chart with the above flag set to false
.
The values that are needed for an OpenShift deployment are:
Store this file next to the generated values.yaml
file and name it openshift-values.yaml
.
Automatically install the Cluster Agent for OpenShift
StackState has built-in support for OpenShift by means of the OpenShift StackPack. To get started quickly, the StackState installation can automate installation of this StackPack and the required Agent for the cluster that StackState itself will be installed on. This is not required and can always be done later from the StackPacks page of the StackState UI for StackState's cluster or any other OpenShift cluster.
The only required information is a name for the OpenShift cluster that will distinguish it from the other OpenShift clusters monitored by StackState. A good choice usually is the same name that is used in the kube context configuration. This will then automatically install the StackPack and install a Daemonset for the agent and a deployment for the so called cluster agent. For the full details, please read the OpenShift StackPack page.
To automate this installation, the below values file can be added to the helm install
command. The agent chart also needs an additional SecurityContextConfiguration
on OpenShift.
If you're installing as an administrator on the OpenShift cluster, it is possible to automatically create this. You can configure this using the following configuration option in the values file:
If you're not installing as an administrator, please follow the instructions below to first install the SecurityContextConfiguration
objects in OpenShift. Then ensure that you set the above configuration flag to false
.
The values file that automates the installation of the OpenShift StackPack and monitoring agent is:
Two placeholders in this file need to be given a value before this can be applied to the Helm installation:
<CLUSTER_NAME>
: A name that StackState will use to identify the cluster<RANDOM_TOKEN>
: A 32 character random token. This can be generated by executinghead -c32 < /dev/urandom | md5sum | cut -c-32
Save this as agent-values.yaml
and add it to the helm install
command to enable this feature.
Deploy StackState with Helm
Use the generated values.yaml
and copied openshift-values.yaml
file to deploy the latest StackState version to the stackstate
namespace with the command below. If you want to automatically install the Cluster Agent for OpenShift, you will also require the agent-values.yaml
created in the previous step:
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
Configure ingress
Install a StackPack or two
Give your co-workers access.
Manually create SecurityContextConfiguration
objects
SecurityContextConfiguration
objectsIf you cannot use an administrator account to install StackState on OpenShift, ask your administrator to apply the below SecurityContextConfiguration
objects.
HDFS
This is required for StackState to operate
Save this file as hdfs-scc.yaml
and apply it as an administrator of the OpenShift cluster using the following command:
After this file is applied, execute the following command as administrator to grant the service account access to this SecurityContextConfiguration
object:
Cluster Agent
If you want to monitor the OpenShift cluster using the OpenShift StackPack and Cluster Agent, the below SecurityContextConfiguration
needs to be applied:
Save this file as agent-scc.yaml
and apply it as an administrator of the OpenShift cluster using the following command:
After this file is applied, execute the following command as administrator to grant the service account access to this SecurityContextConfiguration
object:
See also
For other configuration and management options, please refer to the Kubernetes documentation:
Last updated