Helm

This page contains information about common helm tasks. More information can also be found on the Requirements page.

Confirm the functionality of the Kubernetes cluster

All nodes should be 'Ready'.

sde$ kubectl get nodes
NAME      STATUS   ROLES                  AGE   VERSION
master1   Ready    control-plane,master   23h   v1.21.0
master2   Ready    control-plane,master   23h   v1.21.0
master3   Ready    control-plane,master   23h   v1.21.0
worker1   Ready    <none>                 23h   v1.21.0
worker2   Ready    <none>                 23h   v1.21.0
worker3   Ready    <none>                 23h   v1.21.0

Download the SD Elements Helm chart

  1. Browse to https://helm.sdelements.com/charts/ and login with your SD Elements Service account credentials

  2. Download a chart matching the target version of SD Elements, such as sde-5.5.23.tgz

  3. Extract helm chart and navigate into the chart directory (it should contain a Chart.yaml file)

    tar -xvzf sde-5.5.23.tgz && cd sde

Deploy SD Elements

  1. Install the SD Elements chart

    $ helm install <RELEASE_NAME> </path/to/Chart.yaml> --set global.imageRegistryUsername=<SERVICE_USER> --set global.imageRegistryPassword=<SERVICE_PASSWORD>
    • RELEASE_NAME: Release name, must NOT contain spaces, underscores, or periods (same rules as hostname) For example, 'sde-local-1'.

    • </path/to/Chart.yaml>: Path to the Chart.yaml, use . to use Chart.yaml from the current directory.

    • --set …​: Used to set values to customize the deployment (see Configuration for more information).

    • <SERVICE_USER> and <SERVICE_PASSWORD> are your SD Elements Service account credentials.

Note
Kubernetes Secrets are automatically generated to manage items such as database credentials and encryption keys. These should be managed and maintained like any software that requires version control.
Caution
Running helm install …​ on an existing deployment (vs. helm upgrade …​) results in regeneration of the secrets, which does not match its deployed services. See Common Tasks for more infomation about creating a local backup.

A note on secrets creation

Deploying SD Elements with helm results in the creation of secrets that manage items that are used to encrypt other items within it (such as with database credentials and keys that are used to encrypt integration connector passwords).

These secrets should be maintained and managed like any other software requiring version control. Re-running helm install results in the creation of new secrets and keys that do not work with the existing database. Recovery and re-application of secrets is required. It’s possible to both create a local backup of these secrets and apply them:

Create local backup of SD Elements secrets from Kubernetes deployment

Secret values are encoded in Base64:

# Syntax
kubectl get secrets "<HELM_RELEASE_NAME>-sde-secrets" --output json > sde-secrets.json
# Example
kubectl get secrets "prod-sde-secrets" --output json > sde-secrets.json

Restore local backup of SD Elements secrets to Kubernetes deployment

Secret values are encoded in Base64:

# Syntax
kubectl patch secret "<HELM_RELEASE_NAME>-sde-secrets" --type='merge' --patch-file sde-secrets.json
# Example
kubectl patch secret "prod-sde-secrets"  --type='merge' --patch-file sde-secrets.json

Configure SD Elements

Note
See the Configuration page for additional details.

There are two ways to configure SD Elements once it has been deployed.

Method 1: values.yaml

Obtain values using this method when they are not otherwise specified. Any values that should not be consistent can be changed during deployments by specifying them manually.

  1. Update values.yaml with the desired updates

  2. Run helm upgrade with the same parameters used with helm install …​ (assuming those parameters are ommitted from values.yaml)

Method 2: helm upgrade …​

Note
See Additional Information for changing the superuser password.

Use the helm upgrade …​ command to configure SD Elements by adding additonal parameters to the command. For example:

helm upgrade sde-1-local . --set global.imageRegistryUsername=sc_acme --set global.imageRegistryPassword=1951aaf2420611ea893817e7c2c2288c --set worker.consoleLogLevel=DEBUG --set worker.wsgiLogLevel=info

Confirm the helm chart has been installed

$ helm list
NAME	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART     	APP VERSION
sde1	default  	1       	2021-04-30 17:12:26.687838039 +0000 UTC	deployed	sde-5.13.35	5.13.35

Validate the state of the pods

Pods associated with scheduled jobs such as integration may also show a status of 'Completed'.

$ kubectl get pods
NAME                                         READY   STATUS             RESTARTS   AGE
sde1-broker-7cdd966d45-rjmbh                 1/1     Running            0          41m
sde1-cache-7f7586db57-kn5fp                  1/1     Running            0          41m
sde1-database-6699cbc4c-8bqqc                1/1     Running            0          41m
sde1-job-alm-hourly-26996742-x6qrc           1/1     Running            2          12m
sde1-job-update-index-26996730-7bm8r         0/1     Running            0          24m
sde1-mail-77cff78ccf-5svld                   1/1     Running            0          41m
sde1-web-8645f65f45-24h5g                    1/1     Running            0          41m
sde1-worker-10-55c8f86f6b-hhprz              0/1     Running            0          41m
sde1-worker-15-sde-medium-7d85955887-2snp7   1/1     Running            0          41m
sde1-worker-17-69b5c49b79-rrgh4              0/1     Running            0          41m
sde1-worker-18-sde-low-67c875c5f5-54f66      1/1     Running            0          41m

Access SD Elements

Note
It usually takes around 5-10 minutes to deploy SD Elements depending on the cluster performance and download speeds. During this time a custom friendly 503 message will be shown.

Access to SD Elements is completed through its web service and the nginx controller you’ve selected for use can be configured to provide client access to SD Elements (see Requirements).

Upgrade SD Elements

  1. Determine if a new Chart version is needed. See Download SD Elements Helm chart for more information.

  2. Get a list of deployed charts (installed releases).

    helm list
  3. Upgrade the desired release using the same arguments from the helm install …​ command:

    helm upgrade <RELEASE_NAME> ...

Undeploy SD Elements

  1. Get a list of deployed charts (installed releases)

    helm list
  2. Uninstall a release

    helm uninstall <RELEASE_NAME>

Additional Information

The following parameters cannot be updated by using helm upgrade …​:

  • Change the SD Elements superuser password using --set. For example:

    helm upgrade --set sde.superuserPassword="security"
    • Change the superuser password using the SD Elements application.

results matching ""

    No results matching ""