Updating LDAP Configuration in Digital.ai Deploy Pods
This topic provides step-by-step instructions for updating the deployit-security.xml
file for Digital.ai Deploy, both for the master and worker pods. For more information, see Set up and configure LDAP with Deploy.
The following configuration assumes that Digital.ai Deploy is installed in the digitalai
namespace, with the configuration stored in the Custom Resource (CR) named dai-xld
.
Set up LDAP in Deploy operator
Master Pod
- Download the latest template configuration file by running the following command.
kubectl cp -c deploy-master \
digitalai/dai-xld-digitalai-deploy-master-0:default-conf/deployit-security.xml \
deployit-security.xml
- Create a patch file with the downloaded template file added under content key.
vi deployit-security.xml.patch.yaml
For example,
spec:
master:
extraConfiguration:
default-conf_deployit-security_xml:
path: default-conf/deployit-security.xml
content: |-
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>
- Go to
conf
directory, backup olddeployit-security.xml
from the pod.
kubectl cp -c deploy-master \
digitalai/dai-xld-digitalai-deploy-master-0:conf/deployit-security.xml \
backup/deployit-security.xml
- Update the configuration on the Deploy pods by running the following command. In this example, the name of CR is
dai-xld
.
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch-file deployit-security.xml.patch.yaml
The updated CR will trigger after some time. Wait for a minute to reconcile changes.
- Restart the Deploy master pods by deleting them.
kubectl delete sts dai-xld-digitalai-deploy-master -n digitalai
- Verify that the restarted deploy master pods are using the new configuration.
kubectl exec -it sts/dai-xld-digitalai-deploy-master -n digitalai \
-- cat /opt/xebialabs/xl-deploy-server/conf/deployit-security.xml
Worker Pod
- Download the latest template configuration file by running the following command:
kubectl cp -c deploy-worker \
digitalai/dai-xld-digitalai-deploy-worker-0:default-conf/deployit-security.xml \
deployit-security.xml
- Create a patch file with the downloaded template file.
vi deployit-security.xml.patch.yaml
For example,
spec:
worker:
extraConfiguration:
default-conf_deployit-security_xml:
path: default-conf/deployit-security.xml
content: |-
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>
- Go to
conf
directory, backup olddeployit-security.xml
from the pod.
kubectl cp -c deploy-worker \
digitalai/dai-xld-digitalai-deploy-worker-0:conf/deployit-security.xml \
backup/deployit-security.xml
- Update the configuration on the Deploy pods by running the following command. In this example, the name of CR is
dai-xld
.
kubectl patch -n digitalai digitalaideploys.xld.digital.ai dai-xld \
--type=merge --patch-file deployit-security.xml.patch.yaml
The updated CR will trigger after some time.Wait for a minute to reconcile changes.
- Restart the Deploy worker pods by deleting them.
kubectl delete sts dai-xld-digitalai-deploy-worker -n digitalai
- Verify that the restarted Deploy worker pods are using the new configuration.
kubectl exec -it sts/dai-xld-digitalai-deploy-worker -n digitalai \
-- cat /opt/xebialabs/deploy-task-engine/conf/deployit-security.xml