1. Change the HAProxy configuration
The ConfigMap vid-haproxy-config in the deployment namespace holds the HAProxy configuration.
# edit the configuration
oc edit configmap -n <NAMESPACE> vid-haproxy-config
# restart HAProxy (DaemonSet, the default)
oc rollout restart -n <NAMESPACE> daemonset/vid-haproxy
# restart HAProxy (Deployment, when vid-haproxy.runAsDaemonSet is false)
oc rollout restart -n <NAMESPACE> deployment/vid-haproxy
2. Change a ConfigMap or Secret
2.1. Prerequisites
2.2. Use the command line
# for a configmap:
oc -n <NAMESPACE> edit configmap <CONFIGMAP_NAME>
# for a secret:
oc -n <NAMESPACE> edit secret <SECRET_NAME>
The command opens the default editor of the environment. Change the content, then save and close the editor.
2.3. Use the web console
-
In the sidebar menu, go to Workloads - ConfigMaps or Workloads - Secrets.
-
Find the ConfigMap or Secret. Click the three dots at the right end of its line.
-
Select "Edit ConfigMap" or "Edit Secret".
-
Change the content, then click "Save".
3. Restart
3.1. Prerequisites
Install this software on the machine that you use to deploy VeridiumID:
-
Helm 3. To see the installed version, run
helm version.
3.2. Rolling restart
A rolling restart replaces the pods of an application one at a time, with no downtime:
oc -n <NAMESPACE> rollout restart deployment <NAME_OF_APPLICATION>
HAProxy runs as a DaemonSet by default, and as a Deployment when vid-haproxy.runAsDaemonSet is false. Restart the object that exists:
oc -n <NAMESPACE> rollout restart daemonset vid-haproxy
oc -n <NAMESPACE> rollout restart deployment vid-haproxy
3.3. Hard restart
If a rolling restart does not solve the problem, uninstall the veridiumid chart, then install it again. The data and the configuration stay.
Use the veridiumid-values.yaml file of the last installation or upgrade. If you do not have it, get it from the release:
helm get values -n <NAMESPACE> veridiumid > values/veridiumid-values.yaml
Run these commands from the directory of the bundle:
# uninstall
helm -n <NAMESPACE> delete veridiumid
# install again
helm upgrade --install -n <NAMESPACE> -f values/veridiumid-values.yaml veridiumid helm/veridiumid-1.0.4.tgz
4. Backup and restore
For the backup and the restore of Cassandra, Zookeeper, Elasticsearch, ConfigMaps and Secrets, see the Backup and Restore Guide.
5. After a reinstall of Elasticsearch
A reinstall of Elasticsearch replaces its certificate and the password of the elastic user. Give the new values to VeridiumID:
-
Get the new certificate from the Secret
elasticsearch-<ENV_NO>-es-http-certs-public. Saveca.crtandtls.crton your computer. -
In WebsecAdmin, go to Settings - Certificates - Truststores. Remove the old Elasticsearch certificate and upload the new one.
-
Get the new password from the Secret
elasticsearch-<ENV_NO>-es-elastic-user. -
In the
vid-maintenancepod, make a new API key:curl -k -u elastic:<password> -X POST "https://elasticsearch-<ENV_NO>-es-http:9200/_security/api_key" -H 'Content-Type: application/json' -d' { "name": "veridium-api-key-10000" } 'The output is similar to this:
JSON{"id":"ABUIDIkBHzbsPdcpPRum","name":"veridium-api-key-10000","api_key":"MbZenHibSh6Lxc143YJf1Q","encoded":"QUJVSURJa0JIemJzUGRjcFBSdW06TWJaZW5IaWJTaDZMeGMxNDNZSmYxUQ=="}Keep the value of
encoded. -
In WebsecAdmin, go to Settings - Advanced. In
elasticsearch.json, setapiKeyto theencodedvalue andcredentials.passto the new password:... truncate ... "apiKey": "QUJVSURJa0JIemJzUGRjcFBSdW06TWJaZW5IaWJTaDZMeGMxNDNZSmYxUQ==", ... truncate ... "credentials": { "pass": "<password>", ... truncate ... }, ... truncate ... -
Restart the applications:
kubectl rollout restart -n <NAMESPACE> deployment/vid-websec kubectl rollout restart -n <NAMESPACE> deployment/vid-websecadmin kubectl rollout restart -n <NAMESPACE> deployment/vid-shibboleth kubectl rollout restart -n <NAMESPACE> deployment/vid-ssp kubectl rollout restart -n <NAMESPACE> deployment/vid-adservice kubectl rollout restart -n <NAMESPACE> deployment/vid-fido kubectl rollout restart -n <NAMESPACE> deployment/vid-freeradius kubectl rollout restart -n <NAMESPACE> deployment/vid-maintenance kubectl rollout restart -n <NAMESPACE> deployment/vid-opa