Upgrading Cassandra data store on Linux on IBM Z and LinuxONE

You can upgrade the Cassandra operator.

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 on IBM Z and LinuxONE 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.26.0_v0.22.0

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

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

Upgrading Cassandra online

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

  1. Create a file cass_values.yaml to configure taints and tolerations.

    nodeSelector:
      node-role.kubernetes.io/monitor: "true"
    tolerations:
      - key: node.instana.io/monitor
        operator: Equal
        effect: NoSchedule
        value: "true"
     
  2. Upgrade Cassandra operator.

    helm upgrade --install cass-operator instana/cass-operator -n instana-cassandra --version=0.63.1 --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.26.0_v0.22.0 --set imageConfig.k8ssandraClient=artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.12_v0.33.0 -f cass_values.yaml
     
  3. 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.41.0
      systemLoggerImage: artifact-public.instana.io/self-hosted-images/3rd-party/datastore/system-logger:1.26.0_v0.22.0
      0.8.12_v0.33.0
      serverVersion: "4.1.10"
    '
     
  4. Complete the steps in Verifying Cassandra (online and offline).

Upgrading Cassandra offline

If you didn't yet 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.26.0_v0.22.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.12_v0.33.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.41.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.26.0_v0.22.0 <internal-image-registry>/datastore/system-logger:1.26.0_v0.22.0
    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/k8ssandra-client:0.8.12_v0.33.0 <internal-image-registry>/datastore/k8ssandra-client:0.8.12_v0.33.0
    docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/cassandra:4.1.10_v0.41.0 <internal-image-registry>/datastore/cassandra:4.1.10_v0.41.0
                   
  2. Push the images to your internal image registry on your bastion host.

    docker push <internal-image-registry>/operator/cass-operator:0.63.1
    docker push <internal-image-registry>/datastore/system-logger:1.26.0_v0.22.0
    docker push <internal-image-registry>/datastore/k8ssandra-client:0.8.12_v0.33.0
    docker push <internal-image-registry>/datastore/cassandra:4.1.10_v0.41.0
                   
  3. Create a file cass_values.yaml to configure taints and tolerations.

    nodeSelector:
      node-role.kubernetes.io/monitor: "true"
    tolerations:
      - key: node.instana.io/monitor
        operator: Equal
        effect: NoSchedule
        value: "true"
     
  4. Upgrade Cassandra operator.

    helm upgrade --install cass-operator cass-operator-0.63.1.tgz -n instana-cassandra --version=0.63.1 --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 imagePullSecrets[0].name=instana-registry --set appVersion=1.29.0 --set imageConfig.systemLogger=<internal-image-registry>/datastore/system-logger:1.26.0_v0.22.0 --set imageConfig.k8ssandraClient=<internal-image-registry>/datastore/k8ssandra-client:0.8.12_v0.33.0 -f cass_values.yaml
     
  5. 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.41.0
      systemLoggerImage: <internal-image-registry>/self-hosted-images/3rd-party/datastore/system-logger:1.26.0_v0.22.0
      serverVersion: "4.1.10"
    '
     
  6. Complete the steps in Verifying Cassandra (online and offline).

Verifying Cassandra (online and offline)

  1. Verify the deployment of the Cassandra data store.

    kubectl get all -n instana-cassandra
     
  2. If the Cassandra data store is upgraded successfully, then the result of the command might be as the following output:

    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
     
  3. Make sure that the pods are schedules on the desired nodes.

    kubectl get pods -n instana-cassandra -o wide
     

    A sample output is shown in the following example.

    NAME                              READY   STATUS    RESTARTS   AGE    IP              NODE                                   NOMINATED NODE   READINESS GATES
    cass-operator-778bf546b6-gmdt6    1/1     Running   0          5d1h   10.254.20.182   worker0.instana-odf5.cp.fyre.ibm.com   <none>           <none>
    instana-cassandra-default-sts-0   2/2     Running   0          33h    10.254.20.187   worker1.instana-odf5.cp.fyre.ibm.com   <none>           <none>
    instana-cassandra-default-sts-1   2/2     Running   0          33h    10.254.24.102   worker2.instana-odf5.cp.fyre.ibm.com   <none>           <none>
    instana-cassandra-default-sts-2   2/2     Running   0          33h    10.254.16.138   worker3.instana-odf5.cp.fyre.ibm.com   <none>           <none>