Upgrades APIs
APIs for managing Upgrades
Table of Contents
1. Perform Upgrade
Perform Upgrade API is used to perform upgrades. Upgrades are sequential. So in order to upgrade to a release, your environment must be on the version before that release. Upgrades are applied on a workload domain basis. The management domain contains the core infrastructure, so you must upgrade the management domain before upgrading the other workload domains. You must upgrade all required components to keep your system in an optimum state.
Note : Performing upgrades are supported on VMware Cloud Foundation 3.5 BOM resources and above.
1.1. Steps to Perform Upgrade. API
Download the required bundle.
Online bundle download - Please refer https://docs.vmware.com/en/VMware-Cloud-Foundation/4.0/com.vmware.vcf.vxrail.admin.doc/GUID-BBA9A158-8447-4684-9AA9-1D214D3EB09A.html for more information.
Get Depot Settings API is used to retrieve the existing My VMware Account information as well as Dell EMC depot.
Update Depot Settings API is used to update the existing My VMware Account information as well as Dell EMC depot.
Update Bundle for Downloading API to Download Bundles from VMware depot account and Dell EMC depot.
Offline bundle download - If customer site does not have internet access (dark site) then Bundle Transfer Utility can be used to download bundles. Please refer https://docs.vmware.com/en/VMware-Cloud-Foundation/4.0/vcf-40-lifecycle/GUID-8FA44ACE-8F04-47DA-845E-E0863094F7B0.html for more information.
Execute Upload a Bundle API to upload it to SDDC Manager.
Execute Upload a Partner Bundle API to upload partner Bundles..
Execute Update Software compatibility sets API to update software compatibility sets for Bundles.
Execute Get the Upgradables API to retrieve the list of upgradables (bundle and resource detail) in the system.
Execute Prechecks API to perform required system level health checks.
Perform upgrade and monitor the upgrade progress.
2. Domain Upgrade API
2.1. Prerequisites API
The following data is required:
Bundle ID.
Resource Type. Ex: DOMAIN.
One or more Resource upgrade specifications.
Each Resource upgrade specification should contain.
Resource ID. Ex: Domain ID.
Upgrade scheduled time or Upgrade now option.
The following data is optional:
- A boolean for parallel ESXi upgrade (default is 'true')
Tip : Refer to: UpgradeSpec and ResourceUpgradeSpec.
2.2. Steps API
- Invoke the API. This API returns a task which can be polled and monitored.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/upgrades' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"bundleId" : "3b6af93f-f53d-4716-9374-c35fec4bc5a2",
"resourceType" : "DOMAIN",
"parallelUpgrade" : true,
"resourceUpgradeSpecs" : [ {
"resourceId" : "562d4905-56fb-4bdd-adb1-c706786c7542",
"scheduledTimestamp" : "2024-08-27T21:11:49.353Z",
"upgradeNow" : false,
"esxUpgradeOptionsSpec" : {
"enableQuickboot" : true
}
} ]
}'
HTTP Request
POST /v1/upgrades HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 361
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"bundleId" : "3b6af93f-f53d-4716-9374-c35fec4bc5a2",
"resourceType" : "DOMAIN",
"parallelUpgrade" : true,
"resourceUpgradeSpecs" : [ {
"resourceId" : "562d4905-56fb-4bdd-adb1-c706786c7542",
"scheduledTimestamp" : "2024-08-27T21:11:49.353Z",
"upgradeNow" : false,
"esxUpgradeOptionsSpec" : {
"enableQuickboot" : true
}
} ]
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/8964bd34-9b1a-44cb-8a18-d7f0de009e2d
Content-Length: 503
{
"id" : "8964bd34-9b1a-44cb-8a18-d7f0de009e2d",
"name" : "Upgrade DOMAIN - [acme-domain] using BUNDLE - PSC:6.7.0-13010631 VCENTER:6.7.0-13010631",
"type" : "UPGRADE",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T21:11:49.349Z",
"resources" : [ {
"resourceId" : "562d4905-56fb-4bdd-adb1-c706786c7542",
"type" : "DOMAIN"
}, {
"resourceId" : "3b6af93f-f53d-4716-9374-c35fec4bc5a2",
"type" : "BUNDLE"
} ],
"isCancellable" : false,
"isRetryable" : false
}
- Poll the status of the task using the task API with the ID from the response of the previous API.
Tip : Refer to: Get a Task.
3. Cluster Upgrade API
Note : For Cluster level upgrades, the Cluster ID's can be retrieved based on the Host's that are available for upgrade, Refer to: Get the Hosts and Get the Clusters API's.
3.1. Prerequisites API
The following data is required:
Bundle ID.
Resource Type. Ex: CLUSTER.
One or more Resource upgrade specifications.
Each Resource upgrade specification should contain.
Resource ID. Ex: Cluster ID.
Upgrade scheduled time or Upgrade now option.
The following data is optional:
- A boolean for parallel ESXi upgrade (default is 'true')
Tip : Refer to: UpgradeSpec and ResourceUpgradeSpec.
3.2. Steps API
- Invoke the API. This API returns a task which can be polled and monitored.
cURL Request
$ curl 'https://sfo-vcf01.rainpole.io/v1/upgrades' -i -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer etYWRta....' \
-d '{
"bundleId" : "3b6af93f-f53d-4716-9374-c35fec4bc5a2",
"resourceType" : "CLUSTER",
"parallelUpgrade" : true,
"resourceUpgradeSpecs" : [ {
"resourceId" : "c146b9bf-1c46-44c5-928a-9010cac170f5",
"scheduledTimestamp" : "2024-08-27T22:11:54.931Z",
"upgradeNow" : false,
"esxUpgradeOptionsSpec" : {
"esxUpgradeFailureAction" : {
"retryDelay" : 0,
"retryCount" : 0,
"action" : "FAIL"
},
"enforceHclValidation" : true,
"enableQuickPatch" : false,
"enableQuickboot" : true,
"disableHac" : true,
"disableDpm" : true,
"preRemediationPowerAction" : "DO_NOT_CHANGE_POWER_STATE"
}
} ]
}'
HTTP Request
POST /v1/upgrades HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 675
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....
{
"bundleId" : "3b6af93f-f53d-4716-9374-c35fec4bc5a2",
"resourceType" : "CLUSTER",
"parallelUpgrade" : true,
"resourceUpgradeSpecs" : [ {
"resourceId" : "c146b9bf-1c46-44c5-928a-9010cac170f5",
"scheduledTimestamp" : "2024-08-27T22:11:54.931Z",
"upgradeNow" : false,
"esxUpgradeOptionsSpec" : {
"esxUpgradeFailureAction" : {
"retryDelay" : 0,
"retryCount" : 0,
"action" : "FAIL"
},
"enforceHclValidation" : true,
"enableQuickPatch" : false,
"enableQuickboot" : true,
"disableHac" : true,
"disableDpm" : true,
"preRemediationPowerAction" : "DO_NOT_CHANGE_POWER_STATE"
}
} ]
}
HTTP Response
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/8964bd34-9b1a-44cb-8a18-d7f0de009e2d
Content-Length: 481
{
"id" : "8964bd34-9b1a-44cb-8a18-d7f0de009e2d",
"name" : "Upgrade DOMAIN - [acme-domain] using BUNDLE - HOST:6.7.0-13006603",
"type" : "UPGRADE",
"status" : "IN_PROGRESS",
"creationTimestamp" : "2024-08-27T21:11:54.931Z",
"resources" : [ {
"resourceId" : "562d4905-56fb-4bdd-adb1-c706786c7542",
"type" : "DOMAIN"
}, {
"resourceId" : "3b6af93f-f53d-4716-9374-c35fec4bc5a2",
"type" : "BUNDLE"
} ],
"isCancellable" : false,
"isRetryable" : false
}
- Poll the status of the task using the task API with the ID from the response of the previous API.
Tip : Refer to: Get a Task.
3.3. Related APIs API
[_getupgradables] API [_startprecheck] API [_getprechecktask] API [_performupgrade] API [_gettasks] API [_gettask] API
Last updated 2024-08-27 16:13:54 -0700