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
Note: In
the following examples, the name of the cluster leader is
c-quickstart-redis-m-0.
Procedure
- Identify the cluster leader. For example:
oc get pods -l cluster_role=leaderOutput:NAME READY STATUS RESTARTS AGE c-quickstart-redis-m-0 4/4 Running 0 14m - 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. - 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 - 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 - 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 - 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.
- Delete the current instance of HSTS.
- Create a new instance of HSTS, specifying the new version to which you will
upgrade.
- Open the YAML configuration file.
- Copy the new version number, which is identified with the
productVersionkey. - Overwrite the current YAML configuration file with your old one.
- Update the version number to the new version number.
- 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=leaderThe output must look like the following example:
NAME READY STATUS RESTARTS AGE c-quickstart-redis-m-0 4/4 Running 0 14mAfter 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 - Upload the backup file appendonly.aof to the cluster leader. For
example:
oc cp ./appendonly.aof c-quickstart-redis-m-0:/data/ -c db - Open a terminal on the Redis pod:
oc exec -i -t c-quickstart-redis-m-0 -c db -- /usr/bin/bash - Restore the Redis database from aof file:
cat /data/appendonly.aof | redis-cli -a new_redis_password --pipe - 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.
- Verify that your upgrade is successful by using the OpenShift web console:
- Click Home > Projects.
- Select your project (namespace).
- In the Inventory section, click Pods.
- Select an HSTS
ascppod, which hasascpin the name (for example, development-xeno-pn3-ascp-7f79h). - Click the Terminal tab.
- From the Connecting to dropdown menu, select ascp.
- 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$