Open topic with navigation

# Running the Upgrade

1. On the bastion, verify that all pods in core namespaces are in status Running or Completed by running this command:

   `kubectl get pods -n core`

   Output example:

       cdf-apiserver-7965dcf689-4qvkx                         2/2     Running     0          145m

       fluentd-7q4dw                                          2/2     Running     0          136m

       fluentd-kkf2p                                          2/2     Running     0          136m

       fluentd-mwqh8                                          2/2     Running     0          136m

       idm-77b4f9fbfb-cfwkg                                   2/2     Running     0          136m

       idm-77b4f9fbfb-g5pcb                                   2/2     Running     0          136m

       itom-cdf-deployer-2020.05-2.2-2.3-3.1-tncp8            0/1     Completed   0          137m

       itom-cdf-deployer-xg6cw                                0/1     Completed   0          147m

       itom-cdf-ingress-frontend-56c9987b7-bvrsn              2/2     Running     0          145m

       itom-cdf-ingress-frontend-56c9987b7-n8tbc              2/2     Running     0          145m

       itom-logrotate-deployment-6cf9546f8b-rbcvs             1/1     Running     0          136m

       itom-postgresql-default-77479dfbff-t87tv               2/2     Running     0          137m

       itom-vault-6f558dc6cc-bz52l                            1/1     Running     0          146m

       kubernetes-vault-67f8698568-csd54                      1/1     Running     0          145m

       mng-portal-7cfc584db5-hcmjf                            2/2     Running     0          133m

       nginx-ingress-controller-6f6d4c95b9-7fhbs              2/2     Running     0          133m

       nginx-ingress-controller-6f6d4c95b9-nv2zw              2/2     Running     0          133m

       suite-conf-pod-arcsight-installer-86c9687b69-kctjz     2/2     Running     0          132m

       suite-db-68bfc4fbd5-v6nvm                              2/2     Running     0          145m

       suite-installer-frontend-6f49f88797-msb7j              2/2     Running     0          145m

2. Patch itom-cdf-ingress-frontend-svc and nginx-ingress-controller-svc as type LoadBalancer by running the following commands:

       kubectl patch services itom-cdf-ingress-frontend-svc \
       -p '{"metadata":{"annotations":{"service.beta.kubernetes.io/aws-load-balancer-internal":"0.0.0.0/0","service.beta.kubernetes.io/aws-load-balancer-type":"nlb"}},"spec":{"type":"LoadBalancer"}}' -n core

       kubectl patch services nginx-ingress-controller-svc \
       -p '{"metadata":{"annotations":{"service.beta.kubernetes.io/aws-load-balancer-internal":"0.0.0.0/0","service.beta.kubernetes.io/aws-load-balancer-type":"nlb"}},"spec":{"type":"LoadBalancer"}}' -n core

3. Wait until the command status in Step 2 changes from `<pending>`, and then run the following commands to get the load balancer DNS names:

       kubectl get svc itom-cdf-ingress-frontend-svc -n core| grep -v EXTERNAL-IP |awk '{print $4}'
       kubectl get svc nginx-ingress-controller-svc -n core| grep -v EXTERNAL-IP |awk '{print $4}'

4. Switch directory to cdf-deployer directory:
   `cd /tmp/`
5. Unzip cdf-deployer.zip:
   `unzip cdf-deployer.zip`
6. Switch to the cdf-deployer directory:
   `cd cdf-deployer/`

7. Run the upgrade script with the following command:

   `./upgrade.sh -u`

   Output example:

       ***********************************************************************************

       WARNING: This step is used to upgrade CDF components to 2021.02 release.

       The upgrade process is irreversible. You can NOT roll back.

       Make sure that all nodes in your cluster are in Ready status.

       Make sure that all Pods and Services are Running.

       ***********************************************************************************

       Do you want to continue (Y/N): y

       ** Pre-checking before upgrade ...

       ** BYOK upgrade check...

       ** Common upgrade check...

       [1]  Checking CDF endpoints status ...

       Passed

       ** Prerequisite tasks for components upgrade... (Step 1/3)

       Setting BYOK environment values ...

       Copying itom-cdf-alias.sh to /etc/profile.d/ ...

       ** Updating Kubernetes RBAC ... (Step 2/3)

       RBAC update successfully.

       Updating images configmap ...

       Update images configmap successfully.

       Updating k8s-object-mapping configmap ...

       Update k8s-object-mapping configmap successfully.

       Updating base configmap...

       Updating DEPLOYMENT_MODE:SUITE

       ** Configure and start the cdf-deployer ... (Step 3/3)

       Creating resources from YAML: /home/centos/arcsight-platform-cloud-installer-21.1.0.754-master/cdf-deployer/objectdefs/itom-cdf-deployer-upgrade.yaml

       Waiting for CDF components upgrade process complete ...

       ....................................

       CDF components upgrade process completed.

       Successfully completed CDF components upgrade process.

The upgrade command can take up to 45 minutes to complete. Please be patient and give the process time to finish.

1. When the upgrade completes, check that all pods are Running or Completed with this command:
   `kubectl get pods -A`

The command `upgrade.sh -u` may fail on apphub. If this occurs, run the following command:
`helm rollback apphub 1 -n core`

The CDF upgrade is now complete. The new platform version can be checked by running this command:
`kubectl get cm base-configmap -o yaml -n core | grep VERSION`

# Executing the Post-Upgrade Script

This step applies to manual upgrade only; that is, performed without the ArcSight Installer. This includes all cloud-based upgrades.

After a manual upgrade of CDF is complete, execute the post-upgrade script for CDF configuration. Do the following:

1. Switch to the directory`installers/cdf/scripts/`

2. Run the following command:
   `post-omt-upgrade-2022.05.sh`