top of page

VCF Operations Upgrader

Writer: Brock Peterson
Brock Peterson
10 minutes ago
2 min read

As I was collecting VCF Operations CASA API endpoints to use in an upgrade script, it occurred to me that AI could do it much quicker. Here's what Claude came up with:

Method

Endpoint

What it’s used for

GET

/casa/sysadmin/cluster/online_state

Reads the cluster state and each node’s state.

GET

/casa/sysadmin/cluster/membership

Backup state check.

GET

/casa/view/cluster

Second backup state check.

POST

/casa/sysadmin/cluster/online_state?async=false

Takes the cluster offline or brings it online.

POST

/casa/upgrade/cluster/pak/reserved/operation/upload

Uploads the PAK as a multipart form field named contents.

POST

/casa/upgrade/cluster/pak/{pak_id}/operation/install

Starts the install of the uploaded PAK.

GET

/casa/upgrade/cluster/pak/{pak_id}/status

Checks install progress: the cluster_pak_install_status field and each node’s state.

GET

/casa/deployment/cluster/info

Backup version check.

With the API endpoints in hand, I could have written a script myself, but I asked Claude to build one for me instead. It came up with a Python script I could execute like this:

python3 vcfops_pak_upgrade.py --host 192.168.135.106 --pak ./vRealize_Operations_Manager_With_CP-8.14.x-to-8.18.7.25423537.pak --insecure

I provided the Operations Cluster Primary Node IP, the name of the PAK File to be uploaded and used, and was prompted for admin credentials. It worked exactly as expected. I thought it would be even cooler to be able to run this from a GUI, so I asked Claude to build me one, here's what it came up with.



I completed the form and clicked the Take offline & upgrade button. You'll notice it even instructs the user to confirm they've taken Snapshots of their Cluster Node VMs.



Off we go. You'll notice in the Activity log at the bottom it is providing status feedback. In this case, taking the Operations Cluster offline.



Which as you can see in the Admin UI, it did.



It then moved on to the upgrade package upload.



It reports progress along the way as well.



One done, it moves along to the install.



It provides a timeline for us as well, indicating how long each step took. For example, the PAK upload took 38m. Back in the Admin UI we can see that that upgrade is in progress.



And once done it looks like this!



Perfect, exactly what I wanted! For all documentation, including a detailed README.md go here. I've only tested this in Operations 8.18.x scenarios. Hope this was helpful!

Comments


Leave a Comment above or email me here with questions, thanks for reading!
    bottom of page