Deploying CDP JavaScript SDK
This section describes the steps to configure and deploy HCL CDP JavaScript SDK on an Azure Kubernetes Service (AKS) cluster using the provided Helm chart.
Before you begin
Make sure to create the cdp-java-script-sdk secret in the HashiCorp vault before deploying the CDP JavaScript SDK.
To create the cdp-java-script-sdk secret in the HashiCorp Vault, follow the steps below:
- Create a cdp-java-script-sdk secret sample key and value in the
cdp-java-script-sdk secret shown below, and update the actual
values.
{ "CAMPAIGN_DEFAULT_TTL": "", "DbDriver": "", "DbPassword": "", "DbUrl": "", "DbUsername": "", "KMS_HASHICORPVAULT_ENDPOINT": "", "KMS_HASHICORPVAULT_ENDPOINT_TOKEN": "", "KMS_IMPLEMENTATION": "", "awsRegions": "", "supportedRegions": "" }
Procedure
-
Configure the values.yaml file.
Update the environment-specific configuration in chart-location/cdp-java-script-sdk/values.yaml.
-
Configure application ConfigMaps.
Enable ConfigMaps and configure the required CDP JavaScript SDK Service application URLs.
-
Configure container image.
Update the HCL CDP JavaScript SDK Service image repository and required image version/tag.
-
Verify image pull secret.
kubectl get secret hclcr-cred -n cdp-dev-app -
Configure NGINX Ingress.
Enable Ingress and configure the required hostname, path, and TLS settings.
-
Configure Vault secrets.
Ensure the vault-creds Secret exists:
kubectl get secret vault-creds -n cdp-dev-appThe init container retrieves the kms-service secret from CDP_Secrets and writes it to /etc/secrets/mysecrets.json.
-
Verify or create namespace.
kubectl get namespace cdp-dev-appIf required, create the namespace:
kubectl create namespace cdp-dev-app -
Install CDP JavaScript SDK Service.
helm install cdp-java-script-sdk \ chart-location/cdp-java-script-sdk \ -f chart-location/cdp-java-script-sdk/values.yaml \ -n cdp-dev-app -
Verify Helm release.
helm list -n cdp-dev-appExpected status: deployed
-
Verify deployment and pods.
kubectl get deployment -n cdp-dev-app kubectl get pods -n cdp-dev-app -l k8s-app=cdp-java-script-sdkExpected pod status:
READY STATUS 1/1 Running