Skip to content

Upgrading CHAI™ Appliance to version 1.5.2

  • CHAI™ version 1.5.1 can be upgraded to 1.5.2 ONLY.

Assumptions

  • Version 1.5.1 of CHAI™ Appliance is installed and running
  • sudo access to the CHAI™ Appliance machine
  • Version 1.5.1 singlefile.tar.gz is downloaded
  • Adequate space is available ( at least 50 GB ) on the partition where docker copies its files ( typically /var/lib/docker/ )

1.. On the CHAI™ Appliance machine, navigate to the directory where the version 1.5.1 is installed

# cd <CHAI™-home>

2.. Stop the CHAI™ Appliance using the following command:

# docker-compose -f compose.yaml down

3.. Take a backup of the Mongo Database

# mkdir mongo-backup
# cd mongo-backup
# mongodump --uri='mongodb://<db-username>:<db-password>@<host-ip>:27017/ch-db' --out .
This will create a directory ch-db which will contain the Mongo backup

4.. Move the files in CHAI™-home to a backup directory

# cd <CHAI™-home>
# mkdir app-backup
# mv * ./app-backup

5.. Move the downloaded singlefile.tar.gz to CHAI™-home and extract it

# mv singlefile.tar.gz <CHAI™-home>
# cd <CHAI™-home>
# tar xvzf singlefile.tar.gz

6.. Extract from containers.tar.gz

# tar xvzf containers.tar.gz

7.. Load the new CHAI™ container images

# docker load -i containers.tar
This will take some time depending on system and disk speed

8.. Rename rhel-compose.yaml and rhel-cloudhedgeenv files

# mv rhel-compose.yaml compose.yaml
# mv rhel-cloudhedgeenv cloudhedgeenv

9.. Update cloudhedgeenv with the ip addresses and Mongo details as it was in the previous cloudhedgeenv file

10.. Update the Mongo database with new collections. Download this file and use it as follows if TLS is not enabled on Mongo:

mongo --host <private-ip-address> --username <your-db-user> --password <your-db-password> --authenticationDatabase "ch-db" < upgrade_1.5.1_to_1.5.2.js
If TLS is enabled, run the following command:
mongo --host <private-ip-address> --username <your-db-user> --password <your-db-password> --tls --tlsAllowInvalidCertificates --authenticationDatabase "ch-db" < upgrade_1.5.1_to_1.5.2.js

11.. Start CHAI™ Appliance

# cd <CHAI™-home>
# docker-compose -f compose.yaml up -d

12.. Open browser and access the CHAI™ Appliance. Login with the existing credentials and confirm you are able to login.

13.. Check the version of CHAI™ Appliance by clicking on Help/Current Version. Make sure that the version displayed is the version you installed.

14.. After CHAI™ is upgraded, for all the nodes that have been discovered in the earlier version of CHAI™, run "Check prerequisites". This will ensure that the nodes have the latest CHAI™ tools on them that will enable all operations to be performed.