In my last Post I demonstrated how to install and upgrade a distributed vROPs via vRSLCM API. In this post I will walk through how to perform install/upgrade a distributed vRLI environment.
Steps for deploying/upgrading any vRealize product via vRSLCM API are pretty much same, only the json payload varies.
vRLI Deployment Procedure
Step 1: Pre-Validate Environment Creation
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
Method: POST URL: https://<vrslcm-fqdn>/lcm/lcops/api/environments/import/prevalidate Sample Payload: { "requestId":"null", "requestType":"VALIDATE_CREATE_ENVIRONMENT", "environmentRequestDTO":{ "environmentId":"vRLI-4.8-Distributed", "environmentName":"vRLI-4.8-Distributed", "infrastructure":{ "properties":{ "dataCenterName":"SDDC-MAAS", "regionName":"default", "zoneName":"default", "vCenterName":"vcenter.mgmt.vmw", "vCenterHost":"vcenter.mgmt.vmw", "vcUsername":"administrator@vsphere.local", "vcPassword":"locker:password:e1dfebff-4600-4439-afb5-851e1830a71e:VC-Password", "acceptEULA":"true", "enableTelemetry":"false", "adminEmail":"xyz@vmware.com", "defaultPassword":"locker:password:26c77689-e7a8-4f27-8c85-c9a51a77689c:Default-Password", "certificate":"locker:certificate:f2558190-2002-46e2-847f-eb83c6c110be:vRLI-Certs", "cluster":"MGMT_DC#MGMT_CLU", "storage":"vsanDatastore", "folderName":"group-v50(MGMT_VMs)", "resourcePool":"resgroup-43(MGMT-ResourcePool)", "diskMode":"thin", "network":"VM_MGMT", "masterVidmEnabled":"true", "dns":"x.x.x.5", "domain":"mgmt.vmw", "gateway":"x.x.x.1", "netmask":"255.255.255.0", "searchpath":"mgmt.vmw", "timeSyncMode":"ntp", "ntp":"x.x.x.x", "isDhcp":"false" } }, "products":[ { "id":"vrli", "version":"4.8.0", "properties":{ "certificate":"locker:certificate:f2558190-2002-46e2-847f-eb83c6c110be:vRLI-Certs", "productPassword":"locker:password:26c77689-e7a8-4f27-8c85-c9a51a77689c:Default-Password", "licenseRef":"locker:license:84727216-1e61-4694-bea9-4b19a5969e20:vRLI-4.x", "nodeSize":"small", "configureClusterVIP":"true", "affinityRule":true, "configureAffinitySeparateAll":"true", "ntp":"x.x.x.x", "timeSyncMode":"ntp" }, "clusterVIP":{ "clusterVips":[ { "type":"vrli-cluster-1", "properties":{ "hostName":"vrli.mgmt.vmw", "ip":"x.x.x.110" } } ] }, "nodes":[ { "type":"vrli-master", "properties":{ "vmName":"vrli-master", "hostName":"vrli01.mgmt.vmw", "ip":"x.x.x.111" } }, { "type":"vrli-worker", "properties":{ "vmName":"vrli-worker-1", "hostName":"vrli02.mgmt.vmw", "ip":"x.x.x.112" } }, { "type":"vrli-worker", "properties":{ "vmName":"vrli-worker-2", "hostName":"vrli03.mgmt.vmw", "ip":"x.x.x.113" } } ] } ] } } |
Sample Output
1 2 3 |
{ "requestId": "96f6869e-7651-4630-84f6-cda32f38fda0" } |
2: Check Status of Pre-validation
1 2 3 |
Method: GET URL: https://<vrslcm-fqdn>/lcm/request/api/prevalidationreport?requestId=<request-id> |
Sample Trimmed Output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[ { "id":null, "checkName":"Component Property validation", "checkType":null, "status":"PASSED", "recommendations":null, "resultDescription":null, "elementType":null, "childElements":[ { "id":null, "checkName":"Duplicate Component property check", "checkType":"ERROR", "status":"PASSED", "recommendations":null, "resultDescription":"Success. Component property check passed", "elementType":null, "childElements":null } ] } ] |
3: Start Clustered vRLI Deployment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
Method: POST URL: https://<vrslcm-fqdn>/lcm/lcops/api/environments/create Sample Payload: { "environmentId":"vRLI-4.8-Distributed", "environmentName":"vRLI-4.8-Distributed", "infrastructure":{ "properties":{ "dataCenterName":"SDDC-MAAS", "regionName":"default", "zoneName":"default", "vCenterName":"vcenter.mgmt.vmw", "vCenterHost":"vcenter.mgmt.vmw", "vcUsername":"administrator@vsphere.local", "vcPassword":"locker:password:e1dfebff-4600-4439-afb5-851e1830a71e:VC-Password", "acceptEULA":"true", "enableTelemetry":"false", "adminEmail":"xyz@vmware.com", "defaultPassword":"locker:password:26c77689-e7a8-4f27-8c85-c9a51a77689c:Default-Password", "certificate":"locker:certificate:f2558190-2002-46e2-847f-eb83c6c110be:vRLI-Certs", "cluster":"MGMT_DC#MGMT_CLU", "storage":"vsanDatastore", "folderName":"group-v50(MGMT_VMs)", "resourcePool":"resgroup-43(MGMT-ResourcePool)", "diskMode":"thin", "network":"VM_MGMT", "masterVidmEnabled":"true", "dns":"x.x.x.5", "domain":"mgmt.vmw", "gateway":"x.x.x.1", "netmask":"255.255.255.0", "searchpath":"mgmt.vmw", "timeSyncMode":"ntp", "ntp":"x.x.x.x", "isDhcp":"false" } }, "products":[ { "id":"vrli", "version":"4.8.0", "properties":{ "certificate":"locker:certificate:f2558190-2002-46e2-847f-eb83c6c110be:vRLI-Certs", "productPassword":"locker:password:26c77689-e7a8-4f27-8c85-c9a51a77689c:Default-Password", "licenseRef":"locker:license:84727216-1e61-4694-bea9-4b19a5969e20:vRLI-4.x", "nodeSize":"small", "configureClusterVIP":"true", "affinityRule":true, "configureAffinitySeparateAll":"true", "ntp":"x.x.x.x", "timeSyncMode":"ntp" }, "clusterVIP":{ "clusterVips":[ { "type":"vrli-cluster-1", "properties":{ "hostName":"vrli.mgmt.vmw", "ip":"x.x.x.110" } } ] }, "nodes":[ { "type":"vrli-master", "properties":{ "vmName":"vrli-master", "hostName":"vrli01.mgmt.vmw", "ip":"x.x.x.111" } }, { "type":"vrli-worker", "properties":{ "vmName":"vrli-worker-1", "hostName":"vrli02.mgmt.vmw", "ip":"x.x.x.112" } }, { "type":"vrli-worker", "properties":{ "vmName":"vrli-worker-2", "hostName":"vrli03.mgmt.vmw", "ip":"x.x.x.113" } } ] } ] } |
4: Check Environment Creation Status
1 2 3 |
Method: GET URL: https://<vrslcm-fqdn>/lcm/lcops/api/environments/vRLI-4.8-Distributed/ |
Sample Output:
1 2 3 4 5 6 7 8 |
{ "vmid":"d67940bd-a257-4881-88c9-17c6cdc0cb05", "transactionId":null, "environmentName":"vRLI-4.8-Distributed", "environmentId":"vRLI-4.8-Distributed", "state":null, "status":"COMPLETED" } |
vRLI Upgrade Procedure
1: Fetch Repo URL for vRLI Upgrade
1 2 3 |
Method: GET URL: https://<vrslcm-fqdn>/lcm/lcops/api/products/vrli/version/8.0.0/lcmrepositoryurl |
Sample Output
1 2 3 |
{ "url" : "http://<vrslcm-fqdn>/repo/productBinariesRepo/vrli/8.0.0/upgrade/VMware-vRealize-Log-Insight-8.0.0-14870409.pak" } |
2: Pre-validate vRLI Upgrade
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Method: POST https://<vrslcm-fqdn>/lcm/lcops/api/environments/upgrade/prevalidate Sample Payload: { "upgradeProductRequestDTO":{ "environmentId":"vRLI-4.8-Distributed", "productId":"vrli", "productVersion":"8.0.0", "repositoryType":"lcmrepository", "repositoryUrl":"http://<vrslcm-fqdn>/repo/productBinariesRepo/vrli/8.0.0/upgrade/VMware-vRealize-Log-Insight-8.0.0-14870409.pak", "preValidate":true, "snapshotIaasAfterVaUpgrade":false } } |
Sample Output
1 2 3 |
{ "requestId":"ec1c1471-281e-4290-bf69-0f116c3733cb" } |
3: Check Pre-Validate Report
1 2 3 |
Method:GET URL: https://<vrslcm-fqdn>/lcm/request/api/prevalidationreport?requestId=<request-id> |
Sample Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
[ { "id":null, "checkName":"Cluster setup check for vRLI.", "checkType":"ERROR", "status":"PASSED", "recommendations":null, "resultDescription":"Either have a standalone cluster setup or have minimum 3 to a maximum 12 nodes for a valid cluster setup.", "elementType":"CHECK", "childElements":null }, { "id":null, "checkName":"All nodes should be connected.", "checkType":"ERROR", "status":"PASSED", "recommendations":null, "resultDescription":"All nodes connection status should be either CONNECTED or MAINTENANCE for upgrade.", "elementType":"CHECK", "childElements":null }, { "id":null, "checkName":"NTP settings check.", "checkType":"WARNING", "status":"PASSED", "recommendations":null, "resultDescription":"Check if NTP is configured with the same NTP servers on all the nodes.", "elementType":"CHECK", "childElements":null }, { "id":null, "checkName":"Disk space check on the root filesystem.", "checkType":"ERROR", "status":"PASSED", "recommendations":null, "resultDescription":"Disk space on the root file system should be more than 1 GB. Present space is 13387068 KB.", "elementType":"CHECK", "childElements":null } ] |
4: Perform vRLI Upgrade
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Method: POST URL: https://<vrslcm-fqdn>/lcm/lcops/api/environments/upgrade Sample Payload: { "requestState":"SUBMITTED", "resultData":"", "requestType":null, "upgradeProductRequestDTO":{ "environmentId":"vRLI-4.8-Distributed", "productId":"vrli", "productVersion":"8.0.0", "repositoryType":"lcmrepository", "repositoryUrl":"http://<vrslcm-fqdn>/repo/productBinariesRepo/vrli/8.0.0/upgrade/VMware-vRealize-Log-Insight-8.0.0-14870409.pak", "preValidate":false, "snapshotIaasAfterVaUpgrade":false } } |
5: Check Upgrade Status
1 2 3 |
Method: GET URL: https://<vrslcm-fqdn>/lcm/lcops/api/requests/<req-id> |
I hope you enjoyed reading this post. Feel free to share this on social media if it is worth sharing 🙂