Fortinet black logo

Upgrading your FortiSOAR Docker image and upgrading your FortiSOAR Docker on an Amazon Elastic Kubernetes Cluster

Upgrading your FortiSOAR Docker image and upgrading your FortiSOAR Docker on an Amazon Elastic Kubernetes Cluster

Upgrading your FortiSOAR Docker image

  1. Download the FortiSOAR docker image from https://support.fortinet.com; details are in the Downloading the FortiSOAR Docker image section of the "Deployment Guide".
  2. Load the downloaded Docker image using the following command:
    docker load -i <image-path>
  3. Download the FortiSOAR Docker installer from https://repo.fortisoar.fortinet.com/7.4.2/install-fortisoar-docker-<release_version>.bin
    For example, https://repo.fortisoar.fortinet.com/7.4.2/install-fortisoar-docker-7.4.2.bin
  4. Update the fortisoar.env file with the ID of the Docker Image that is loaded in step 2. For more information, see Understanding the fortisoar.env file topic in the Deploying FortiSOAR on a Docker Platform chapter in the "Deployment Guide."
    Important: Ensure that the value of the PROJECT_NAME field in the fortisoar.env file must be the same as the value in the earlier version of the Docker image.
  5. Before you begin the upgrade, it is recommended to take a backup of your FortiSOAR Docker as listed in the following commands.
    Note: The following commands uses fortisoar_fortisoar_1 as the Docker name. You must replace this sample name with your own Docker name, which you can find using the docker ps command.
    1. docker exec -ti fortisoar_fortisoar_1 bash -c 'export LANG=en_US.UTF-8;csadm db --backup /home/csadmin'
      Note: This command stores the backup file at /home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz (for example, /home/csadmin/DR_BACKUP_7.4.2-*_*_*.tgz) inside your FortiSOAR Docker.
    2. Copy the backup file from your FortiSOAR Docker on the Docker host using the following command:
      docker cp fortisoar_fortisoar_1:/home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz /data
      For example, docker cp fortisoar_fortisoar_1:/home/csadmin/DR_BACKUP_7.4.2-*_*_*.tgz /data
      Note: The FortiSOAR Docker backup file is stored in the /data directory on your Docker host.
  6. Stop your FortiSOAR Docker using the following command:
    docker stop fortisoar_fortisoar_1
  7. Remove your FortiSOAR Docker using the following command:
    docker rm fortisoar_fortisoar_1
  8. Run the FortiSOAR Docker using the updated fortisoar.env file that contains the ID of the new Docker Image using the following command:
    ./install-fortisoar-docker-<release_version>.bin --env-file fortisoar.env
    For example, ./install-fortisoar-docker-7.4.2.bin --env-file fortisoar.env

Reverting the upgrade on your FortiSOAR Docker image

In case the FortiSOAR Docker image upgrade fails, and you want to revert to the previous release, then you need to restore the backup of the previous version that was take in the /data directory on your Docker host. Following are the steps for restoring the backup.
Note: The following commands uses fortisoar_fortisoar_1 as the Docker name. You must replace this sample name with your own Docker name, which you can find using the docker ps command.

  1. Stop the running FortiSOAR Docker using the following command:
    docker stop fortisoar_fortisoar_1
  2. Remove the FortiSOAR Docker using the following command:
    docker rm fortisoar_fortisoar_1
  3. Remove the FortiSOAR Docker volumes using the following command:
    docker volume rm $(docker volume ls --filter name=fortisoar_fortisoar_* -q)
  4. Update the fortisoar.env file with the ID of the previous Docker Image.
  5. Run the previous version FortiSOAR Docker using the updated fortisoar.env file that contains the ID of the previous Docker Image using the following command:
    ./install-fortisoar-docker-<release_version>.bin --env-file fortisoar.env
    For example, ./install-fortisoar-docker-7.4.2.bin --env-file fortisoar.env
  6. Wait until you see EULA page on the UI at https://<docker-host-hostname>:<PORT_UI>/
  7. Copy the FortiSOAR Docker backup file from the /data directory on your Docker host using the following command:
    docker cp /data/DR_BACKUP_<release_version>-*_*_*.tgz fortisoar_fortisoar_1:/home/csadmin/
    docker cp /data/DR_BACKUP_7.4.2-*_*_*.tgz fortisoar_fortisoar_1:/home/csadmin/
  8. Restore the Docker image using the following command:
    docker exec -it fortisoar_fortisoar_1 bash -c “export LANG=en_US.UTF-8;csadm db --restore /home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz”
    For example, docker exec -it fortisoar_fortisoar_1 bash -c “export LANG=en_US.UTF-8;csadm db --restore /home/csadmin/DR_BACKUP_7.4.2-*_*_*.tgz”

Upgrading your FortiSOAR Docker on an Amazon Elastic Kubernetes Cluster

  1. Download the FortiSOAR docker image from https://support.fortinet.com; details are in the Downloading the FortiSOAR Docker image section of the "Deployment Guide".
  2. Upload the downloaded FortiSOAR Docker image to your AWS Elastic container registry or any other Docker repository that is accessible from within your Kubernetes cluster. For example:
    # docker push <account-id>.dkr.ecr.<region>.amazonaws.com/fortisoar/fortisoar:7.4.2
  3. Before you begin the upgrade process, it is recommended to take a backup of your FortiSOAR pod as listed in the following commands.
    The following commands uses fsr-0 as the pod name. You must replace this sample name with your own pod name that you can find using the #kubectl get pods -o=name -n fsr command.
    #kubectl exec -ti -n fsr -c fsr fsr-0 -- bash -c "csadm db --backup /\home/\csadmin/\ "
    Note: This command stores the backup file in the /home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz folder inside your FortiSOAR pod. For example, /home/csadmin/DR_BACKUP_7.3.2-*_*_*.tgz inside your FortiSOAR pod.
    Copy the backup file from your FortiSOAR pod on the EKS cluster node to your machine using the following command:
    #kubectl cp fsr-0:/home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz -c fsr -n fsr DR_BACKUP_<release_version>.tgz
  4. Stop the running FortiSOAR pod using the following command:
    #kubectl delete statefulset <statefulset_name> -n <fortisoar_namespace>
  5. Update the path of the new FortiSOAR image in the fortisoar-statefulset.yaml file.
  6. Run the following command to deploy a new statefulset with the latest docker image:
    #kubectl apply -f fortisoar-statefulset.yaml

Upgrading your FortiSOAR Docker image and upgrading your FortiSOAR Docker on an Amazon Elastic Kubernetes Cluster

Upgrading your FortiSOAR Docker image

  1. Download the FortiSOAR docker image from https://support.fortinet.com; details are in the Downloading the FortiSOAR Docker image section of the "Deployment Guide".
  2. Load the downloaded Docker image using the following command:
    docker load -i <image-path>
  3. Download the FortiSOAR Docker installer from https://repo.fortisoar.fortinet.com/7.4.2/install-fortisoar-docker-<release_version>.bin
    For example, https://repo.fortisoar.fortinet.com/7.4.2/install-fortisoar-docker-7.4.2.bin
  4. Update the fortisoar.env file with the ID of the Docker Image that is loaded in step 2. For more information, see Understanding the fortisoar.env file topic in the Deploying FortiSOAR on a Docker Platform chapter in the "Deployment Guide."
    Important: Ensure that the value of the PROJECT_NAME field in the fortisoar.env file must be the same as the value in the earlier version of the Docker image.
  5. Before you begin the upgrade, it is recommended to take a backup of your FortiSOAR Docker as listed in the following commands.
    Note: The following commands uses fortisoar_fortisoar_1 as the Docker name. You must replace this sample name with your own Docker name, which you can find using the docker ps command.
    1. docker exec -ti fortisoar_fortisoar_1 bash -c 'export LANG=en_US.UTF-8;csadm db --backup /home/csadmin'
      Note: This command stores the backup file at /home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz (for example, /home/csadmin/DR_BACKUP_7.4.2-*_*_*.tgz) inside your FortiSOAR Docker.
    2. Copy the backup file from your FortiSOAR Docker on the Docker host using the following command:
      docker cp fortisoar_fortisoar_1:/home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz /data
      For example, docker cp fortisoar_fortisoar_1:/home/csadmin/DR_BACKUP_7.4.2-*_*_*.tgz /data
      Note: The FortiSOAR Docker backup file is stored in the /data directory on your Docker host.
  6. Stop your FortiSOAR Docker using the following command:
    docker stop fortisoar_fortisoar_1
  7. Remove your FortiSOAR Docker using the following command:
    docker rm fortisoar_fortisoar_1
  8. Run the FortiSOAR Docker using the updated fortisoar.env file that contains the ID of the new Docker Image using the following command:
    ./install-fortisoar-docker-<release_version>.bin --env-file fortisoar.env
    For example, ./install-fortisoar-docker-7.4.2.bin --env-file fortisoar.env

Reverting the upgrade on your FortiSOAR Docker image

In case the FortiSOAR Docker image upgrade fails, and you want to revert to the previous release, then you need to restore the backup of the previous version that was take in the /data directory on your Docker host. Following are the steps for restoring the backup.
Note: The following commands uses fortisoar_fortisoar_1 as the Docker name. You must replace this sample name with your own Docker name, which you can find using the docker ps command.

  1. Stop the running FortiSOAR Docker using the following command:
    docker stop fortisoar_fortisoar_1
  2. Remove the FortiSOAR Docker using the following command:
    docker rm fortisoar_fortisoar_1
  3. Remove the FortiSOAR Docker volumes using the following command:
    docker volume rm $(docker volume ls --filter name=fortisoar_fortisoar_* -q)
  4. Update the fortisoar.env file with the ID of the previous Docker Image.
  5. Run the previous version FortiSOAR Docker using the updated fortisoar.env file that contains the ID of the previous Docker Image using the following command:
    ./install-fortisoar-docker-<release_version>.bin --env-file fortisoar.env
    For example, ./install-fortisoar-docker-7.4.2.bin --env-file fortisoar.env
  6. Wait until you see EULA page on the UI at https://<docker-host-hostname>:<PORT_UI>/
  7. Copy the FortiSOAR Docker backup file from the /data directory on your Docker host using the following command:
    docker cp /data/DR_BACKUP_<release_version>-*_*_*.tgz fortisoar_fortisoar_1:/home/csadmin/
    docker cp /data/DR_BACKUP_7.4.2-*_*_*.tgz fortisoar_fortisoar_1:/home/csadmin/
  8. Restore the Docker image using the following command:
    docker exec -it fortisoar_fortisoar_1 bash -c “export LANG=en_US.UTF-8;csadm db --restore /home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz”
    For example, docker exec -it fortisoar_fortisoar_1 bash -c “export LANG=en_US.UTF-8;csadm db --restore /home/csadmin/DR_BACKUP_7.4.2-*_*_*.tgz”

Upgrading your FortiSOAR Docker on an Amazon Elastic Kubernetes Cluster

  1. Download the FortiSOAR docker image from https://support.fortinet.com; details are in the Downloading the FortiSOAR Docker image section of the "Deployment Guide".
  2. Upload the downloaded FortiSOAR Docker image to your AWS Elastic container registry or any other Docker repository that is accessible from within your Kubernetes cluster. For example:
    # docker push <account-id>.dkr.ecr.<region>.amazonaws.com/fortisoar/fortisoar:7.4.2
  3. Before you begin the upgrade process, it is recommended to take a backup of your FortiSOAR pod as listed in the following commands.
    The following commands uses fsr-0 as the pod name. You must replace this sample name with your own pod name that you can find using the #kubectl get pods -o=name -n fsr command.
    #kubectl exec -ti -n fsr -c fsr fsr-0 -- bash -c "csadm db --backup /\home/\csadmin/\ "
    Note: This command stores the backup file in the /home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz folder inside your FortiSOAR pod. For example, /home/csadmin/DR_BACKUP_7.3.2-*_*_*.tgz inside your FortiSOAR pod.
    Copy the backup file from your FortiSOAR pod on the EKS cluster node to your machine using the following command:
    #kubectl cp fsr-0:/home/csadmin/DR_BACKUP_<release_version>-*_*_*.tgz -c fsr -n fsr DR_BACKUP_<release_version>.tgz
  4. Stop the running FortiSOAR pod using the following command:
    #kubectl delete statefulset <statefulset_name> -n <fortisoar_namespace>
  5. Update the path of the new FortiSOAR image in the fortisoar-statefulset.yaml file.
  6. Run the following command to deploy a new statefulset with the latest docker image:
    #kubectl apply -f fortisoar-statefulset.yaml