C3 AI Documentation Home

Upgrade the C3 Agentic AI Platform

C3 AI uses Terraform modules to perform upgrades. This topic provides guidance on how to upgrade your cluster to a new C3 Agentic AI Platform version. You might have to adjust these steps accordingly to suit your organization's needs.

Prerequisites

See the following documentation to learn how to install and deploy the C3 Agentic AI Platform:

Required inputs

Review the topic C3 AI Platform Install and Upgrade Requirements for your platform version. Note the following values for inputs in the upgrade process:

  • <c3crds_version>, <c3aiops_version>, <c3server_version>: Helm chart versions and C3 AI platform version.
  • <platform_version>: C3 Agentic AI Platform version and build number. For example, 8.9.0+468.
  • <registry_username>, <registry_password>: C3 AI JFrog registry credentials. C3 AI provides you a registry username and password to download the Terraform modules from a JFrog registry.

After you or C3 AI has installed the platform for your organization, continue to the following steps for guidance on how to upgrade the platform version.

Upgrade the platform

Complete the following steps:

  1. Run the bootstrap and c3cluster Terraform modules
  2. Upgrade c3crds
  3. Upgrade c3aiops
  4. Upgrade c3server
  5. Verify pods are running
  6. Complete final cluster configuration

You might have to adjust these steps accordingly to suit your organization's needs. Contact C3 AI Center of Excellence (CoE) for assistance.

Run the following commands at the command line.

Run the bootstrap and c3cluster Terraform modules

Apply the bootstrap module:

Command Line
cd <cluster_id>/tf/bootstrap/
terraform init # If not already initialized
terraform plan -out=tfplan | tee plan.log
# Review the plan
terraform apply tfplan

Apply the c3cluster module:

Command Line
cd <cluster_id>/tf/c3cluster/
terraform init # If not already initialized
terraform plan -out=tfplan | tee plan.log
# Review the plan
terraform apply tfplan

Check for c3 Helm repo

Check if you previously added the c3 Helm repo:

Command Line
helm repo list

If the c3 Helm repo is not present, add it:

Command Line
helm repo add c3 https://jfrog.c3.ai/artifactory/charts/ \
  --username <registry_username> \
  --password <registry_password>

Upgrade c3crds

Run the following commands at the command line.

Apply the c3crds Helm chart for your platform version. Replace <c3crds_version> with the c3crds Helm chart version for your platform version:

Command Line
helm template c3crds c3/c3crds -n c3-opsadmin --version "<c3crds_version>" \
  | yq '. | select(.kind == "CustomResourceDefinition")' > c3crds-<c3crds_version>.yaml
kubectl apply --server-side --force-conflicts -f ./c3crds-<c3crds_version>.yaml

Upgrade c3aiops

Run the following commands at the command line.

Remove c3aiops jobs and cronjobs:

Command Line
kubectl delete jobs -n c3-opsadmin $(kubectl get jobs -o custom-columns=:.metadata.name -n c3-opsadmin) || true
kubectl delete cronjobs -n c3-opsadmin $(kubectl get cronjobs -o custom-columns=:.metadata.name -n c3-opsadmin) || true

(For EKS) Uninstall metrics-server:

Command Line
helm -n kube-system uninstall metrics-server
kubectl -n c3-opsadmin patch cronjobs c3-opsadmin-c3clusteraddon-c3aiops-c3clusteraddon -p '{"spec" : {"suspend" : true }}'

(For GKE) In Google Cloud Console, increase GKE security policy rules. See the Google Cloud Armor documentation, Configure Cloud Armor security policies.

Upgrade the c3aiops Helm chart:

Command Line
helm upgrade \
  --namespace c3-opsadmin \
  c3aiops \
  c3/c3aiops \
  --version "<c3aiops_version>" \
  --values ./helm/c3aiops.yaml 

Upgrade c3server

At the command line, upgrade the c3server Helm chart:

Command Line
helm upgrade \
  --namespace <cluster id> \
  c3 \
  c3/c3 \
  --version "<c3server_version>" \
  --values ./helm/c3.yaml

Update DNS record

If you have a Layer 7 load balancer configured, upgrade the DNS record to point to the Layer 7 load balancer IP address.

Command Line
kubectl -n <cluster_id> get ing <cluster_id>-nginx-ingress-alb -o json

Verify pods are running

Run the following command at the command line.

Verify all pods are healthy and ensure the c3-c3 pod is running:

Command Line
kubectl get pods -n <cluster_id>

Verify that pods in the c3-opsadmin namespace are healthy:

Command Line
kubectl get pods -n c3-opsadmin

Complete final cluster configuration

Run the following code in the ai/c3 C3 AI Console.

Upgrade C3 AI Studio:

JavaScript
C3.env().apps().each(a => a.callJson("InvalidationQueue", "pause"));
C3.env().upgradeApp(C3.app(), {serverVersion: "<platform_version>"});

Run Studio.deploy to verify C3 AI Studio and its services:

JavaScript
Studio.deploy("prod");
C3.env().apps().each(a => a.callJson("InvalidationQueue", "resume"));
C3.app().nodePool("singlenode").config().setConfigValue('jvm.jvmMaxMemoryPct', 0.7);
C3.app().nodePool("singlenode").config().setConfigValue('hardwareProfile.diskGb', 100);
C3.app().nodePool("singlenode").config().setConfigValue('sharedStorage.enabled', false);
C3.app().nodePool("singlenode").update();

Configure the cluster to connect to the C3 Generative AI Code Assistant service:

JavaScript
var serviceAppId = "ci-prd-narwhal";
var serviceAppUrl = "https://ci.c3ci.cloud/prd/narwhal/";

Microservice.Config.forName("GenAiGenerativeProxyMicroservice").clearConfigAndSecretAllOverrides();
Microservice.Config.forName("GenAiGenerativeProxyMicroservice").setConfigValue("serviceAppUrl", serviceAppUrl, "CLUSTER");
Microservice.Config.forName("GenAiGenerativeProxyMicroservice").setConfigValue("appId", serviceAppId, "CLUSTER");

Microservice.Config.forName("AiAssistant").clearConfigAndSecretAllOverrides();
Microservice.Config.forName('AiAssistant').setConfigValue("serviceAppUrl", serviceAppUrl, "CLUSTER");
Microservice.Config.forName("AiAssistant").setConfigValue("appId", serviceAppId, "CLUSTER");
AiAssistant.Config.inst().setConfigValue("middlewareProxyName", "lambdaProxy", "CLUSTER");

AiAssistant.Config.inst().setConfigValue('enabled', true, "CLUSTER");
var lambdaCode = function callChat(params) {
  var fieldName = params.question ? 'question' : 'query';
  params = params.withField(fieldName, params.toJsonString());
  return GenAiGenerativeProxy.make().completion(params);
}
LambdaGenerativeProxy.fromLambda("lambdaProxy", lambdaCode, "CLUSTER");

Microservice.Config.forName("AiAssistantFeedback").setConfigValue("appId", serviceAppId, "CLUSTER");
Microservice.Config.forName("AiAssistantFeedback").setConfigValue("serviceAppUrl", serviceAppUrl, "CLUSTER");
Microservice.Config.forName("AiAssistantFeedback").setConfigValue("serviceTypeName", 'CodeAssistantFeedbackService', "CLUSTER");
AiAssistant.Config.getConfig().setConfigValue("feedbackEnabled", true);

Configure the C3 AI Studio notification service:

JavaScript
Studio.configureNotificationService();

Verify the upgrade

In the c3/c3 C3 AI Console, run sanity tests to verify the upgrade:

JavaScript
Js.exec('ClusterSanityCheck.runAllTests({"studioEnvName": "ai"})')

This code shows sucessfully configured components and flags deployment issues.

Was this page helpful?