OpenShift install
Before you start
Extra notes for installing on:
|
Before you start the installation of SUSE Observability:
-
Check that your OpenShift environment meets the requirements
-
Ensure you have the OpenShift command line tools installed (
oc
) -
Add the SUSE Observability helm repository to the local helm client:
helm repo add suse-observability https://charts.rancher.com/server-charts/prime/suse-observability
helm repo update
Install SUSE Observability
For environments without internet access, also known as air-gapped environments, first follow these extra instructions. Also make sure to follow the air-gapped installation instructions whenever those are present for a step. |
Create project
Start by creating the project where you want to install SUSE Observability. In our walkthrough we will use the namespace suse-observability
:
oc new-project suse-observability
The project name is used in |
Generate baseConfig_values.yaml
and sizing_values.yaml
The baseConfig_values.yaml
file is required to deploy StackState with Helm. It contains your StackState license key, StackState Receiver API key and other important information.
The sizing_values.yaml
file is recommended to deploy StackState with Helm as it contains information about the resources that StackState will be provisioned with according to the size on the landscape you want to observe.
The affinity_values.yaml
file contains Kubernetes affinities to deploy SUSE Observability with different scheduling options.
Before you continue: Make sure you have the latest version of the Helm charts with |
You can generate the SUSE Observability baseConfig_values.yaml
, sizing_values.yaml
, and affinity_values.yaml
files by running a separate Helm Chart. The suse-observability/suse-observability-values
chart. A sample command line is:
export VALUES_DIR=.
helm template \
--set license='<your license>' \
--set baseUrl='<suse-observability-base-url>' \
--set sizing.profile='<sizing.profile>' \
suse-observability-values \
suse-observability/suse-observability-values --output-dir $VALUES_DIR
This command generates the files $VALUES_DIR/suse-observability-values/templates/baseConfig_values.yaml
, $VALUES_DIR/suse-observability-values/templates/sizing_values.yaml
, and $VALUES_DIR/suse-observability-values/templates/affinity_values.yaml
containing the necessary configuration for installing the SUSE Observability Helm Chart.
The SUSE Observability administrator passwords will be autogenerated by the above command and are output as comments in the generated |
The values that can be passed to this chart are:
Configuration | Value | Description |
---|---|---|
Basic Config generate |
|
Switch on or off the generation of the |
Receiver API Key |
|
The API key used by SUSE Observability 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 SUSE Observability to pull images. For air-gapped environments these need to be the username and password for the local docker registry. |
License key |
|
The SUSE Observability license key. |
Default password |
|
The password for the default user ( |
Image Registry |
|
The registry where the SUSE Observability 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 SUSE Observability images are hosted. |
Pull Secret Password |
|
The password used to pull images from the Docker registry where the SUSE Observability images are hosted. |
Sizing generate |
|
Switch on or off the generation of the |
Sizing profile |
|
OneOf trial, 10-nonha, 20-nonha, 50-nonha, 100-nonha, 150-ha, 250-ha, 500-ha. Based on these profiles, you can generate the |
Pod AntiAffinity |
|
Enforce that the replicas of the same data services are scheduled to different Kubernetes nodes. Only applicable for |
Store the generated |
The SUSE Observability Values chart generates affinity configurations that you can use with the main SUSE Observability chart to control pod scheduling behavior. Refer to Configure Kubernetes Affinities documentation for more information. |
Create 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.
elasticsearch:
prometheus-elasticsearch-exporter:
podSecurityContext: ""
sysctlInitContainer:
enabled: false
scc:
enabled: true
clickhouse:
podSecurityContext:
enabled: false
containerSecurityContext:
enabled: false
Deploy SUSE Observability with Helm
The recommended deployment of SUSE Observability is a production ready, high availability setup with many services running redundantly. If required, it’s also possible to run SUSE Observability 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.
-
Setup
-
Air-gapped setup
To deploy SUSE Observability in a high availability setup on OpenShift:
-
Before you deploy:
-
Deploy the latest SUSE Observability version to the
suse-observability
namespace with the following command:
helm upgrade \
--install \
--namespace suse-observability \
--values $VALUES_DIR/suse-observability-values/templates/baseConfig_values.yaml \
--values $VALUES_DIR/suse-observability-values/templates/sizing_values.yaml \
--values $VALUES_DIR/suse-observability-values/templates/affinity_values.yaml \
--values openshift-values.yaml \
--set "clickhouse.sidecars[0].securityContext.runAsUser=null" \
suse-observability \
suse-observability/suse-observability
To deploy SUSE Observability in an air-gapped setup on OpenShift:
-
Before you deploy:
-
Deploy the latest SUSE Observability version to the
suse-observability
namespace with the following command:
helm upgrade \
--install \
--namespace suse-observability \
--values local-docker-registry.yaml \
--values $VALUES_DIR/suse-observability-values/templates/baseConfig_values.yaml \
--values $VALUES_DIR/suse-observability-values/templates/sizing_values.yaml \
--values $VALUES_DIR/suse-observability-values/templates/affinity_values.yaml \
--values openshift-values.yaml \
--set "clickhouse.sidecars[0].securityContext.runAsUser=null" \
suse-observability \
suse-observability/suse-observability
After the install, the SUSE Observability release should be listed in the SUSE Observability namespace and all pods should be running:
# Check the release is listed
helm list --namespace suse-observability
# Check pods are running
# It may take some time for all pods to be installed or available
kubectl get pods --namespace suse-observability
Access the SUSE Observability UI
After SUSE Observability has been deployed, you can check if all pods are up and running:
kubectl get pods --namespace suse-observability
When all pods are up, you can enable a port-forward:
kubectl port-forward service/suse-observability-router 8080:8080 --namespace suse-observability
SUSE Observability 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
Manually create SecurityContextConfiguration
objects
If you can’t use an administrator account to install SUSE Observability on OpenShift, ask your administrator to apply the below SecurityContextConfiguration
objects.
apiVersion: security.openshift.io/v1
kind: SecurityContextConstraints
metadata:
name: {{ template "common.fullname.short" . }}-{{ .Release.Namespace }}
labels:
{{- include "common.labels.standard" . | nindent 4 }}
annotations:
helm.sh/hook: pre-install
suse-observability.io/note: "Ignored by helm uninstall, has to be deleted manually"
fsGroup:
type: RunAsAny
groups:
- system:serviceaccounts:{{ .Release.Namespace }}
runAsUser:
type: RunAsAny
seLinuxContext:
type: MustRunAs
supplementalGroups:
type: RunAsAny
volumes:
- configMap
- downwardAPI
- emptyDir
- ephemeral
- persistentVolumeClaim
- projected
- secret
allowHostDirVolumePlugin: false
allowHostIPC: false
allowHostNetwork: false
allowHostPID: false
allowHostPorts: false
allowPrivilegeEscalation: true
allowPrivilegedContainer: false
readOnlyRootFilesystem: false
See also
-
For other configuration and management options, refer to the Kubernetes documentation - manage a SUSE Observability Kubernetes installation