Upgrading High-Speed Transfer Server

To upgrade to a new version of Aspera High-Speed Transfer Server (HSTS), back up the Redis database, delete your current HSTS instance, create a new instance, and restore the database to it.

About this task

HSTS uses a Redis database on each instance to manage security and transfers.
Note: In the following examples, the name of the cluster leader is c-quickstart-redis-m-0.

Procedure

  1. Identify the cluster leader. For example:
    oc get pods -l cluster_role=leader
    Output:
    NAME                     READY   STATUS    RESTARTS   AGE
    c-quickstart-redis-m-0   4/4     Running   0          14m
  2. Retrieve your Redis password.
    You need your Redis password to save the database's dump.rdb and appendonly.aof backup files. You can get the password by using the OpenShift web console or the OpenShift CLI.
    • To use the web console, go to Workloads > Secrets > c-quickstart-redis-m. Then go to Data > compose_password and click Reveal the values.
    • To use the CLI, run the following command to retrieve the secret password:
      secret_cr=$(oc get secrets | grep redis-m | awk '{print $1}')
      oc get secret $secret_cr -o json | jq -r .data.compose_password | base64 -d
    Copy the revealed password and store it according to your local security practices as you are going to need it in the next steps.
  3. Save the dump.rdb file.
    The RDB file stores point-in-time snapshots of your data set at specified intervals. Use the following syntax:
    oc exec c-quickstart-redis-m-0 -c db -- redis-cli \ 
    -a my_redis_admin_password save
  4. Save the appendonly.aof files without preamble.
    The AOF persistence file stores every write operation that is received by the server, which is played again at server startup to reconstruct the original data set.
    Use the following syntax:
    oc exec c-quickstart-redis-m-0 -c db -- redis-cli -a my_redis_password config set aof-use-rdb-preamble no
    oc exec c-quickstart-redis-m-0 -c db -- redis-cli -a my_redis_password BGREWRITEAOF
  5. Copy dump.rb and appendonly.aof to your local drive for later use.
    In this example, these files are copied to the current local directory in a new subdirectory called db:
    oc cp c-quickstart-redis-m-0:/data/appendonly.aof ./appendonly.aof -c db
    oc cp c-quickstart-redis-m-0:/data/dump.rdb ./dump.rdb -c db
  6. If you want to upgrade your version of HSTS to a configuration that is identical to your current one, save the contents of the HSTS YAML configuration file.
  7. Delete the current instance of HSTS.
  8. Create a new instance of HSTS, specifying the new version to which you will upgrade.
    1. Open the YAML configuration file.
    2. Copy the new version number, which is identified with the productVersion key.
    3. Overwrite the current YAML configuration file with your old one.
    4. Update the version number to the new version number.
  9. On the new cluster, identify the cluster leader and get the new Redis admin password.

    Get the cluster leader:

    oc get pods -l cluster_role=leader

    The output must look like the following example:

    NAME                     READY   STATUS    RESTARTS   AGE
    c-quickstart-redis-m-0   4/4     Running   0          14m
    After you get the cluster leader name, get the new Redis admin password:
    secret_cr=$(oc get secrets | grep redis-m | awk '{print $1}')
    oc get secret $secret_cr -o json | jq -r .data.compose_password | base64 -d
  10. Upload the backup file appendonly.aof to the cluster leader. For example:
    oc cp ./appendonly.aof c-quickstart-redis-m-0:/data/ -c db
  11. Open a terminal on the Redis pod:
    oc exec -i -t c-quickstart-redis-m-0 -c db -- /usr/bin/bash
  12. Restore the Redis database from aof file:
    cat /data/appendonly.aof | redis-cli -a new_redis_password --pipe
  13. Check that the database restoration is successful.
    First, use the kubctl get routes command to get the host URL. It is convenient to assign that long string to an environment variable.
    Then, use the following command syntax. The -u option specifies the user credentials for HSTS (username and password), with which you configured HSTS (see Getting credentials for High-Speed Transfer Server):
    curl -kv --request GET \
      --url https://$host:443/access_keys \
      -u "node_user_name:node_user_password"

    If the command returns your access keys, the database restoration was successful.

  14. Verify that your upgrade is successful by using the OpenShift web console:
    1. Click Home > Projects.
    2. Select your project (namespace).
    3. In the Inventory section, click Pods.
    4. Select an HSTS ascp pod, which has ascp in the name (for example, development-xeno-pn3-ascp-7f79h).
    5. Click the Terminal tab.
    6. From the Connecting to dropdown menu, select ascp.
    7. Inside the ascp container shell, run /opt/aspera/bin/ascp -A. For example:
      sh-4.4$ /opt/aspera/bin/ascp -A
      Product version information not found.
      ascp version 4.4.2.181185
      Operating System: Linux
      FIPS 140-2-validated crypto ready to configure
      AES-NI Supported
      Connect Server License max rate=1000 Mbps, account no.=1, license no.=69787. Expiration date: Thu Oct  5 06:59:59 2023
      Enabled settings: connect, mobile, cargo, node, drive, http_fallback_server, group_configuration, shared_endpoints, desktop_gui and sync2
      sh-4.4$