Upgrading Cassandra data store on Linux x86_64

You can upgrade the Cassandra operator and upgrade the data store.

Before you begin

Make sure that you prepared your online and offline host to pull images from the external repository. Also, ensure that the correct Helm repo is added.

Cassandra operator versions and image tags for deployment

The following images are needed for the pinned Helm chart or operator versions.

Platform Operator versions Helm chart version Image with tag
Linux® x86_64 1.29.0 0.63.1

artifact-public.instana.io/self-hosted-images/3rd-party/operator/cass-operator:1.29.0_v0.39.0

artifact-public.instana.io/self-hosted-images/3rd-party/datastore/system-logger:1.29.0_v0.23.0

artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.9_v0.32.0

artifact-public.instana.io/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.38.0

Upgrading Cassandra online

To upgrade the Cassandra data store online, complete the following steps:

  1. Upgrade the Cassandra operator.

    helm upgrade --install cass-operator instana/cass-operator -n instana-cassandra --version=0.60.0 --set securityContext.runAsGroup=999 --set securityContext.runAsUser=999 --set image.registry=artifact-public.instana.io --set image.repository=self-hosted-images/3rd-party/operator/cass-operator --set image.tag=1.29.0_v0.39.0 --set imagePullSecrets[0].name=instana-registry --set appVersion=1.29.0 --set imageConfig.systemLogger=artifact-public.instana.io/self-hosted-images/3rd-party/datastore/system-logger:1.29.0_v0.23.0 --set imageConfig.k8ssandraClient=artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.9_v0.32.0
                   
  2. Upgrade Cassandra by running to the following command to patch Cassandra configuration.

    kubectl patch cassandradatacenter cassandra -n instana-cassandra --type=merge --patch '
    spec:
      serverImage: artifact-public.instana.io/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.38.0
      systemLoggerImage: artifact-public.instana.io/self-hosted-images/3rd-party/datastore/system-logger:1.29.0_v0.23.0
      k8ssandraClientImage: artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.9_v0.32.0
      serverVersion: "4.1.10"
    '
     
  3. Complete the steps in Verifying Cassandra (online and offline).

Upgrading Cassandra offline

To upgrade the Cassandra operator in an air-gapped environment, complete the following steps:

If you didn't pull the Cassandra images from the external registry, you can pull them now. Run the following commands on your bastion host. Then, copy the images to your Instana host that is in your air-gapped environment.

docker pull artifact-public.instana.io/self-hosted-images/3rd-party/operator/cass-operator:1.29.0_v0.39.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/system-logger:1.29.0_v0.23.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.9_v0.32.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.38.0
         

Complete the following steps on your Instana host.

  1. Retag the images to your internal image registry.

    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/operator/cass-operator:1.29.0_v0.39.0 <internal-image-registry>/operator/cass-operator:1.29.0_v0.39.0
    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/system-logger:1.29.0_v0.23.0 <internal-image-registry>/datastore/system-logger:1.29.0_v0.23.0
    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.9_v0.32.0 <internal-image-registry>/datastore/k8ssandra-client:0.8.9_v0.32.0
    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.38.0 <internal-image-registry>/datastore/cassandra:4.1.10_v0.38.0
                   
  2. Push the images to your internal image registry on your bastion host.

    docker push <internal-image-registry>/operator/cass-operator:1.29.0_v0.39.0
    docker push <internal-image-registry>/datastore/system-logger:1.29.0_v0.23.0
    docker push <internal-image-registry>/datastore/k8ssandra-client:0.8.9_v0.32.0
    docker push <internal-image-registry>/datastore/cassandra:4.1.10_v0.38.0
                   
  3. Upgrade the Cassandra operator.

    helm upgrade --install cass-operator cass-operator-0.60.0.tgz -n instana-cassandra --version=0.60.0 --set securityContext.runAsGroup=999 --set securityContext.runAsUser=999 --set image.registry=<internal-image-registry> --set image.repository=operator/cass-operator --set image.tag=1.29.0_v0.39.0 --set appVersion=1.29.0 --set imageConfig.systemLogger=<internal-image-registry>/datastore/system-logger:1.29.0_v0.23.0 --set imageConfig.k8ssandraClient=<internal-image-registry>/datastore/k8ssandra-client:0.8.9_v0.32.0 --set imagePullSecrets[0].name="<internal-image-registry-pull-secret>
     
  4. Upgrade Cassandra by running to the following command to patch Cassandra configuration.

    kubectl patch cassandradatacenter cassandra -n instana-cassandra --type=merge --patch '
    spec:
      serverImage: <internal-image-registry>/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.38.0
      systemLoggerImage: <internal-image-registry>/self-hosted-images/3rd-party/datastore/system-logger:1.29.0_v0.23.0
      k8ssandraClientImage: <internal-image-registry>/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.9_v0.32.0
      serverVersion: "4.1.10"
      '
     
  5. Complete the steps in Verifying Cassandra (online and offline).

Verifying Cassandra (online and offline)

To very the Cassandra instance and data store upgrade, complete the following steps:

  1. Wait for the ClickHouse upgrade to complete.

    kubectl wait cassandra/instana --for=condition=Ready --timeout=300s -n instana-cassandra
     
  2. Verify the Cassandra data store upgrade.

    kubectl get all -n instana-cassandra
     
  3. If the Cassandra data store is upgraded successfully, an output similar to the following example is displayed:

    NAME                                  READY   STATUS    RESTARTS   AGE
    pod/cass-operator-57dcc8884f-92knc    1/1     Running   0          36m
    pod/instana-cassandra-default-sts-0   2/2     Running   0          26m
    pod/instana-cassandra-default-sts-1   2/2     Running   0          26m
    pod/instana-cassandra-default-sts-2   2/2     Running   0          26m
    
    NAME                                                TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                                        AGE
    service/cass-operator-webhook-service               ClusterIP   192.168.1.55   <none>        443/TCP                                        36m
    service/instana-cassandra-additional-seed-service   ClusterIP   None           <none>        <none>                                         26m
    service/instana-cassandra-all-pods-service          ClusterIP   None           <none>        9042/TCP,8080/TCP,9103/TCP,9000/TCP            26m
    service/instana-cassandra-service                   ClusterIP   None           <none>        9042/TCP,9142/TCP,8080/TCP,9103/TCP,9000/TCP   26m
    service/instana-seed-service                        ClusterIP   None           <none>        <none>                                         26m
    
    NAME                            READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/cass-operator   1/1     1            1           36m
    
    NAME                                       DESIRED   CURRENT   READY   AGE
    replicaset.apps/cass-operator-57dcc8884f   1         1         1       36m
    
    NAME                                             READY   AGE
    statefulset.apps/instana-cassandra-default-sts   3/3     26m