Automate generating upgrade plans with Upgrade Health Checker
You can automate generating Upgrade Health Checker reports to reduce your manual effort when planning ONTAP upgrades in large, complex environments.
Upgrade Health Checker supports upgrades for on-premises ONTAP versions 9.11.1 and later. If you are using Cloud Volumes ONTAP, refer to Upgrade Cloud Volumes ONTAP for information on upgrading your system.
-
To ensure the successful creation of your upgrade reports, complete any necessary set up steps and one-time tasks outlined in Generate an ONTAP upgrade report.
-
Create a script to run Upgrade Health Checker with the appropriate parameters for your environment.
./uhc \ --cluster-ip=<cluster-ip> \ --cluster-username=<cluster-username> \ --cluster-password=<cluster-password> \ --target-ontap-version=<target-ontap-version> \ --accept-eula=true -
Create an automation script for cron schedules to run Upgrade Health Checker. The following example script that runs Upgrade Health Checker for multiple clusters. The binary and config.yaml files have been installed into /opt/uhc/tool/.
#!/bin/bash # /opt/uhc/tool/uhccron.sh # Automated weekly Upgrade Health Checker run for all managed clusters # Schedule: Every Monday to Friday at 4am cd /opt/uhc/tool/ # Cluster1 - keep current version (health check only) /opt/uhc/tool/uhc --cluster-ip cluster1-mgmt.example.com \ --target-ontap-version current # Cluster2 - target upgrade to 9.16.1 /opt/uhc/tool/uhc --cluster-ip cluster2-mgmt.example.com \ --target-ontap-version 9.16.1 # Cluster3 - target upgrade to 9.17.1 /opt/uhc/tool/uhc --cluster-ip cluster3-mgmt.example.com \ --target-ontap-version 9.17.1 # Cluster4 - by IP address /opt/uhc/tool/uhc --cluster-ip 10.20.30.40 --target-ontap-version 9.16.1 # Add additional clusters as needed # Make the script executable (one-time setup step) chmod +x /opt/uhc/tool/uhccron.sh
-
Set up the cron job to run the script Monday through Friday at 4:00 am:
# Edit the crontab for the uhctool user crontab -e # Add the following line to schedule the script to run Monday through Friday at 4:00 am 0 4 * * 1-5 /opt/uhc/tool/uhccron.sh
|
|
For ongoing health monitoring, use --target-ontap-version current without a specific upgrade target.
|
-
After Upgrade Health Checker completes its checks, navigate to the
runsfolder to view the upgrade plan and cluster report.Each execution of the program is a unique run and will have all the associated data, logs, and results in the associated runsfolder. -
Open the report file (named
uhc_<cluster-name>_<YYYYMMDDHHMMSS>) in a web browser, Microsoft Excel, or JSON viewer to view the report. If you are running Upgrade Health Checker on a remote host, first download the report file to a machine where you can view the report on a web browser, in Excel, or in a JSON viewer.The log path and report path are as follows:
-
Log Path:
<output-path>/<unique-run-dir>/<cluster-name>/logs -
HTML Report Path:
<output-path>/<unique-run-dir>/<cluster-name>/results/uhc_<cluster-name>_<YYYYMMDDHHMMSS>.html -
Excel Report Path:
<output-path>/<unique-run-dir>/<cluster-name>/results/uhc_<cluster-name>_<YYYYMMDDHHMMSS>.xlsx -
JSON Report Path:
<output-path>/<unique-run-dir>/<cluster-name>/results/uhc_<cluster-name>_<YYYYMMDDHHMMSS>.json
-