Skip to content

Upgrading CAS Manager

When upgrading CAS Manager there are two options available.

  1. In-place upgrade within the maintenance window: You can run an in-place upgrade through yum for CAS Manager. Depending on the configuration you implemented, this will mean a period of downtime which can range from a few seconds to a few minutes.
  2. Zero downtime upgrade via a new VM. The second option involves installing CAS Manager on a new virtual machine, and configuring it to connect to the same external database and secret storage. If done correctly this can result in zero downtime.

The steps involved in both options are outlined below.

Which Option Should I Choose?

The upgrade option you choose depends on the amount of downtime you are willing to experience and how your CAS Manager instance has been deployed and setup. The following are some use cases that outline which option to use:

  • If you have a single CAS Manager server connecting to external database and secret storage, it is recommended to install CAS Manager on a new virtual machine. If you don't have a new virtual machine then run the in-place upgrade on the existing virtual machine with the understanding that there will be some downtime during this upgrade.
  • If you have multiple CAS Manager servers connecting to the same external database and secret storage, it is recommended to run an in-place upgrade on each CAS Manager server, one at a time. There should not be any downtime as long as one CAS Manager server is up and running.
  • If the database and secret storage is on the same virtual machine as CAS Manager, you must run an in-place upgrade. This is to ensure that the data persists after the upgrade has been completed. There will be some downtime during this upgrade.

Running an In-Place Upgrade

CAS Manager Downtime

The CAS Manager virtual machine that is undergoing an in-place upgrade will not be available during the upgrade. This can take anywhere from a few seconds to a few minutes, depending on the number of services that need to be upgraded and the speed of download when retrieving new versions from the repo. If this is the only CAS Manager server you have, the new connections will not be established until the upgrade is completed successfully.

1. Update CAS Manager Yum Repository

There are two cases you need to update CAS Manager yum repository:

  • You want to upgrade to a CAS Manager version that is on different repo, such as upgrading from a GA version to a beta version
  • You have installed version 21.03 when EL7 was specified for download.

If your cases are not these, please skip this section and go to 2. Unlocking CAS Manager Version.

The following section outlines how to update the CAS Manager yum repository as part of running an in-place upgrade.

  1. SSH to the CAS Manager virtual machine.
  2. Remove the existing yum repo for previous CAS Manager with the following command.

    sudo rm /etc/yum.repos.d/teradici-cas-manager.repo
    
  3. To access the scripts to configure and add the RHEL/CentOS repository, select the Downloads and Scripts option here from the CAS Manager support site.

Run the following command to confirm teradici-cas-manager repos were added into yum repo.

yum repolist --enabled teradici-cas-manager*

The output from this command should list the repo id, names as outlined in the example below:

repo id                                             repo name
teradici-cas-manager-beta                           teradici-cas-manager-beta
teradici-cas-manager-beta-noarch                    teradici-cas-manager-beta-noarch
teradici-cas-manager-beta-source                    teradici-cas-manager-beta-source

2. Unlocking CAS Manager Version

If you have skipped above step Update CAS Manager Yum Repository , make sure the existing CAS Manager repo is enabled. Follow the command below to unlock the CAS Manager repo if it was disabled to lock the version before.

The following command will unlock the CAS Manager version in the yum repo:

sudo yum config-manager --set-enable teradici-cas-manager*

You can confirm the settings with the following command:

yum repolist teradici-cas-manager*

The output from this command should list the repo id, names and their status, as outlined in the example below:

repo id                                         repo name                                        status
teradici-cas-manager                            teradici-cas-manager                             enabled
teradici-cas-manager-noarch                     teradici-cas-manager-noarch                      enabled
teradici-cas-manager-source                     teradici-cas-manager-source                      enabled

3. Upgrade CAS Manager via Yum

The following steps outline how to perform an in-place upgrade of CAS Manager through yum:

  1. Before running an in-place upgrade you should backup the entire virtual machine by taking a snapshot. This snapshot will help to rollback if anything wrong happens during the upgrade.
  2. SSH to the CAS Manager virtual machine.
  3. Run the following command:

    sudo yum upgrade -y cas-manager-selinux cas-manager
    

    If there is no new version available, and you therefore currently have the latest version, you will see a message outlining this when you run this command.

  4. Once you have run the upgrade command you need to wait until all CAS Manager services have been updated and are healthy. To manually verify the health status of CAS Manager run:

    sudo /usr/local/bin/cas-manager diagnose --health
    
  5. Verify that CAS Manager has been updated by running the following command:

    yum list --installed 'cas-manager*'
    

This will display the current installed CAS Manager version.

Installing CAS Manager on a new Virtual Machine

The following steps outline how to install CAS Manager on a new virtual machine, and configure it to connect to the same external database and secret storage application:

  1. Before performing an upgrade you should backup the database and secret storage application you used when installing CAS Manager. If you intend to install CAS Manager on a new virtual machine, backup the configuration file so that it can be used on the CAS Manager instance.
  2. Follow the installation steps outlined here to install a new instance of CAS Manager in a new virtual machine to replace the existing one. You must configure it to be identical to the old CAS Manager instance. It needs to connect to the same MongoDB, and secret storage application, as well as having the same certificate and network configurations.
  3. Change your DNS to point to the new CAS Manager instance.
  4. Reconfigure your Connector to connect to the new CAS Manager if necessary:

    • If you installed your Connector with --cam-url=https://Fully-Qualified-Domain-Name-of-CAS-M:

      • Change your DNS entry for the FQDN to point to the new CAS Manager's static IP.
      • In the Connector virtual machine, flush the DNS cache to use the latest DNS. This ensures that there will be zero downtime as the Connector will be able to connect to the new CAS Manager instance:

        sudo systemd-resolve --flush-caches
        
    • If you installed your Connector with --cam-url=https://ip-address-of-cas-manager:

      • Update your Connector to use the latest CAS Manager's IP address.
      • Log into the Connector virtual machine and run the following command to update the CAS Manager IP:

        sudo usr/sbin/cloud-access-connector update --cam-url https://<New CAS-Manager IP>
        
  5. In the Connector, ping the FQDN to verify it can find the new CAS Manager instance.

  6. Remove the old CAS Manager virtual machine.

Removing the CAS Manager Virtual Machine

The following steps outline how to remove the CAS Manager virtual machine:

  1. Save the configuration setting files used in the current version of CAS Manager. For example, save them as a all-configurations.json file. If the current CAS Manager has proxy configured, save all the proxy environment variables also.
  2. Run the following commands to remove the CAS Manager.

    sudo yum remove -y cas-manager-selinux cas-manager
    sudo rm -rf /opt/teradici     # Remove the cas-manager files
    
  3. Delete the CAS Manager VM.