Customize Your Site— Release Custom Configuration
Overview
The configuration for Digital.ai Release is managed by the conf
directory in the Release folder. This directory contains the configuration files that Release uses to operate.
Configuration files in the conf
directory are initially generated from templates located in the default-conf directory
. During startup, the system processes these templates and copies them into the conf
directory. Files are only replaced if they do not already exist in the conf
directory, except the xl-release.conf
file which is always replaced, even if it exists.
Prerequisites
- A Digital.ai Release installation on a Kubernetes cluster.
kubectl
connected to the cluster.- Release operator version 23.3 or later.
Steps to Update Configuration Files
-
Download the latest template configuration file from the Release pod that is running. For example, the
xl-release.conf
.template file can be located at/opt/xebialabs/xl-release-server/default-conf/xl-release.conf.template
.kubectl cp -c release \
digitalai/dai-xlr-digitalai-release-0:default-conf/xl-release.conf.template \
xl-release.conf.template -
Update the custom resource (CR) file or the CR on the cluster.
- Update the downloaded template file by running the following command:
vi xl-release.conf.template
- Create a kubectl patch file by running the following command:
c=$(cat xl-release.conf.template) \
yq -n '.spec.configuration.default-conf_xl-release-conf-template.content = strenv(c)' \
> xl-release-conf-patch.yaml - Backup the existing file from the conf directory on the pod by running the following command:
kubectl cp -c release \
digitalai/dai-xlr-digitalai-release-0:conf/xl-release.conf
backup/xl-release.conf - Update the configuration on the Release pods by running the following command:
kubectl patch -n digitalai digitalaireleases.xlr.digital.ai dai-xlr \
--type=merge --patch-file xl-release-conf-patch.yaml
- Update the downloaded template file by running the following command:
The system automatically restarts the Release pods.
Updating Files Using default-conf Templates
You can update other text files located in the application directory in a similar way. For example,
- boot.conf.cloud.template
- jmx-exporter.yaml
- logback-access.xm
- logback.xml
- logging.properties
- script.policy
- script.policy.template
- wrapper-daemon.vm
- xl-release-security.xml
- xl-release-server.conf.template
- xl-release.conf.template
- xl-release.policy
- xlr-wrapper-linux.conf
- xlr-wrapper-win.conf
-
Define the file to be updated, for example
xlr-wrapper-linux.conf
.export FILE_TO_UPDATE=xlr-wrapper-linux.conf
export TEMPLATE_DIR=default-conf
export TARGET_DIR=conf
export TARGET_FILE=xlr-wrapper-linux.conf -
Download the latest template configuration file by running the following command:
kubectl cp -c release \
digitalai/dai-xlr-digitalai-release-0:$TEMPLATE_DIR/$FILE_TO_UPDATE \
$FILE_TO_UPDATE -
Update the custom resource (CR) file or the CR on the cluster.
-
Update the downloaded template file by running the following command:
vi $FILE_TO_UPDATE
-
Create a kubectl patch file by running the following command:
c=$(cat $FILE_TO_UPDATE) \
contentPath=".spec.extraConfiguration.${TEMPLATE_DIR}_${FILE_TO_UPDATE//./-}.content" \
f="${TEMPLATE_DIR}/$FILE_TO_UPDATE" \
filePath=".spec.extraConfiguration.${TEMPLATE_DIR}_${FILE_TO_UPDATE//./-}.path" \
yq -n 'eval(strenv(contentPath)) = strenv(c) | eval(strenv(filePath)) = strenv(f)' \
> "$FILE_TO_UPDATE.patch.yaml" -
Backup the existing file from the conf directory on the pod by running the following command:
kubectl cp -c release \
digitalai/dai-xlr-digitalai-release-0:$TARGET_DIR/$TARGET_FILE \
backup/$TARGET_FILE -
Delete the configuration file from the pod to ensure it is recreated by running the following command:
Note: This step is only necessary if you have the target folder mounted as a persistent volume. Starting from version 24.1 and later, this is no longer the default option.
kubectl exec -c release -it sts/dai-xlr-digitalai-release -n digitalai \
-- rm $TARGET_DIR/$TARGET_FILE -
Update the configuration on the Release pods:
kubectl patch -n digitalai digitalaireleases.xlr.digital.ai dai-xlr \
--type=merge --patch-file $FILE_TO_UPDATE.patch.yaml
-
The Release pods restarts automatically after the update.
The new configuration is applied after the next operator reconciliation cycle, which may take up to one minute. This will initiate a rollout restart of the Release pods.