Clusters

APIs for managing Clusters

1. Create a Cluster

After you add the VxRail primary cluster, additional clusters can be added to expand the domain.

1.1. Prerequisites

  • The following data is required

    • Domain Identifier in which the cluster is to be created

    • Cluster details

    • Name of the new cluster that will be added to the specified workload domain

    • VxRail Manager Details

      • admin and root credentials
    • VSAN license key

    • Host details

      • Hostname of ESXi host which is part of the cluster

      • IpAddress of the same ESXi host which is part of the cluster

      • Password of ESXi host which is part of the cluster

    • List of VDS details, For each VDS

      • DVS name

      • Flag to indicate whether this DVS is used by NSX-T

      • Port group names and the corresponding transport type. Note that EDGE_INFRA_OVERLAY_UPLINK should not be specified in the input spec.

    • NSX cluster Details, For NSX-T

    • VLAN ID of Geneve

    • IP Address Pool spec if the TEP IP assignment is done from IP pool (only required in case of non-DHCP option)

      • Name of the IP address pool

      • Description of the IP address pool

      • IP address pool subnet details

      • Subnet cidr

      • Gateway

      • IP Address Pool Ranges

      First IP address in the IP address range

      Last IP address in the IP address range

    • For DHCP

      { “nsxTClusterSpec” : { “geneveVlanId” : 2 } }

    • For creating new IP pool during domain creation

      { “nsxTClusterSpec” : { “geneveVlanId” : 2, “ipAddressPoolSpec” : { “name” : “static-ip-pool-01”, “subnets” : [ { “ipAddressPoolRanges” : [ { “start” : “10.0.11.50”, “end” : “10.0.11.70” }, { “start” : “10.0.11.80”, “end” : “10.0.11.150” } ], “cidr” : “10.0.11.0/24”, “gateway” : “10.0.11.250” } ] } } }

    • For using an existing IP pool during domain creation. For more information on fetching the NSXT Cluster details, refer to NSX-T Clusters

      { “nsxTClusterSpec” : { “geneveVlanId” : 2, “ipAddressPoolSpec” : { “name” : “static-ip-pool-01” } } }

Note : To create a new IP address pool during domain creation, “subnets” , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool

  • Workload Domain must be provisioned.

Note : NSX-T Manager(s) are configured when domain is created.

  • Host configuration must have minimum two active vmNics.

  • A DHCP server must be configured for NSX-T VTEPS

1.2. Steps

  • Through VxRail UI, create a cluster in the VC, which was created as part of the previous invocation of the create domain

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Get the list of unmanaged clusters with names in thus created vi domain, Invoke a call to get clusters to get the details.

Tip : Refer to: Get the unmanaged clusters by criterion

  • Choose the name of one cluster that needs to be imported. Invoke a call to get unmanaged cluster by selected cluster name to get the network and host details.

Tip : Refer to: Get an unmanaged cluster by criterion

  • Create a cluster spec as shown in the curl payload below using the information from previous call

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "ad9958c1-c53f-441e-b025-e65a0f3ca4e8",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        }
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ]
  }
}'

HTTP Request

POST /v1/clusters/validations HTTP/1.1
Content-Type: application/json
Content-Length: 1972
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "ad9958c1-c53f-441e-b025-e65a0f3ca4e8",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        }
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ]
  }
}

HTTP Response

HTTP/1.1 200 OK
Location: /v1/clusters/validations/88228260-ce55-4e3c-89ba-8c3c18ad199b
Content-Type: application/json
Content-Length: 142

{
  "id" : "88228260-ce55-4e3c-89ba-8c3c18ad199b",
  "description" : "Validating Cluster Creation Spec",
  "executionStatus" : "IN_PROGRESS"
}
  • Get Validation response of the cluster specification with id obtained from previous spec validation call

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations/ad68db33-d30e-405d-ac32-12e514539dc8' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/validations/ad68db33-d30e-405d-ac32-12e514539dc8 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

{
  "id" : "ad68db33-d30e-405d-ac32-12e514539dc8",
  "description" : "Validation result",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ ]
}
  • In case of no errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “SUCCEEDED”.

  • In case of errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “FAILED”.

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "19a9afec-4eae-417e-b7d7-86dc2c432486",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        }
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ],
    "skipFailedHosts" : true
  }
}'

HTTP Request

POST /v1/clusters HTTP/1.1
Content-Type: application/json
Content-Length: 2002
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "19a9afec-4eae-417e-b7d7-86dc2c432486",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        }
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "advancedOptions" : {
        "evcMode" : "",
        "highAvailability" : {
          "enabled" : false
        }
      }
    } ],
    "skipFailedHosts" : true
  }
}

HTTP Response

HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 341

{
  "errorCode" : "PUBLIC_VXRAIL_CLUSTER_CREATION_CANNOT_SKIP_FAILED_HOSTS",
  "arguments" : [ ],
  "message" : "Failed ESXi Hosts cannot be skipped during VxRail Cluster creation",
  "remediationMessage" : "Remove the optional field \"skipFailedHosts\" from the \"computeSpec\" in the Cluster creation spec",
  "referenceToken" : "IK3182"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

Tip : Refer to: Get a Task.

  • If the “status” is “SUCCESSFUL”, the task is completed successfully.

  • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

2. Create a Cluster with Workflow Optimization

After you add the VxRail primary cluster, additional clusters can be added to expand the domain.

2.1. Prerequisites

  • The following data is required

    • Domain Identifier in which the cluster is to be created

    • Cluster details

    • Name of the new cluster that will be added to the specified workload domain

    • VxRail Manager Details

      • admin and root credentials

      • DNS Name of VxRail Manager

      • SSH Thumbprint of VxRail Manager

      • SSL Thumbprint of VxRail Manager

      • NIC profile of hosts

      • Networks (details of portgroups such as VSAN, VMOTION, MANAGEMENT.)

    • VSAN license key

    • Host details (the hosts details can be obtained using Get the hosts discovered by HCI manager)

      • Hostname of ESXi host

      • IpAddress of the same ESXi host

      • Credentials of the ESXi host

      • SSH Thumbprint of the ESXi host

      • Serial Number of the ESXi host

      • Host Network Details

      • ESXi License key

    • Network Details

      • List of VDS details, For each VDS

      • DVS name

      • Flag to indicate whether this DVS is used by NSX-T

      • Port group names and the corresponding transport type. Note that EDGE_INFRA_OVERLAY_UPLINK should not be specified in the input spec.

      • Geneve vLAN ID

    • NSX cluster Details, For NSX-T

    • VLAN ID of Geneve

    • IP Address Pool spec if the TEP IP assignment is done from IP pool (only required in case of non-DHCP option)

      • Name of the IP address pool

      • Description of the IP address pool

      • IP address pool subnet details

      • Subnet cidr

      • Gateway

      • IP Address Pool Ranges

    • For using DHCP

      { “nsxTClusterSpec” : { “geneveVlanId” : 2 } }

    • For creating new IP pool during Work flow optimized domain creation

      { “ipAddressPoolSpec” : { “name” : “static-ip-pool-01”, “subnets” : [ { “ipAddressPoolRanges” : [ { “start” : “10.0.11.50”, “end” : “10.0.11.70” }, { “start” : “10.0.11.80”, “end” : “10.0.11.150” } ], “cidr” : “10.0.11.0/24”, “gateway” : “10.0.11.250” } ] } }

    • For using an existing IP pool during domain creation. For more information on fetching the NSXT Cluster details, refer to NSX-T Clusters

      { “ipAddressPoolSpec” : { “name” : “static-ip-pool-01” } }

Note : To create a new IP address pool during domain creation, “subnets” , the list of IpAddressPoolSubnetSpec in the input spec must not be empty. Only the IP address pool name has to be sent in the input spec while using an existing IP address pool

  • Workload Domain must be provisioned.

Note : NSX-T Manager(s) are configured when domain is created.

  • Host configuration must have minimum two active vmNics

2.2. Steps to perform Optimized Cluster Creation

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Get the list of the hosts discovered by HCI Manager of the cluster which is to be created

Tip : Refer to: Get the hosts discovered by HCI manager

  • Create a cluster spec as shown in the curl payload below using the information from previous call

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "243e3b67-8339-4a29-859a-f065a2aa125b",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "skipThumbprintValidation" : false
    } ]
  }
}'

HTTP Request

POST /v1/clusters/validations HTTP/1.1
Content-Type: application/json
Content-Length: 2736
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "243e3b67-8339-4a29-859a-f065a2aa125b",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "skipThumbprintValidation" : false
    } ]
  }
}

HTTP Response

HTTP/1.1 200 OK
Location: /v1/clusters/validations/c1d85598-df33-4b78-9b75-03561d616457
Content-Type: application/json
Content-Length: 142

{
  "id" : "c1d85598-df33-4b78-9b75-03561d616457",
  "description" : "Validating Cluster Creation Spec",
  "executionStatus" : "IN_PROGRESS"
}
  • Get Validation response of the cluster specification with id obtained from previous spec validation call

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/validations/ad68db33-d30e-405d-ac32-12e514539dc8' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/validations/ad68db33-d30e-405d-ac32-12e514539dc8 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

{
  "id" : "ad68db33-d30e-405d-ac32-12e514539dc8",
  "description" : "Validation result",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ ]
}
  • In case of no errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “SUCCEEDED”.

  • In case of errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “FAILED”.

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "domainId" : "c5164ad0-95ab-4331-8ed5-5e456d5f3614",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "skipThumbprintValidation" : false
    } ]
  }
}'

HTTP Request

POST /v1/clusters HTTP/1.1
Content-Type: application/json
Content-Length: 2736
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "domainId" : "c5164ad0-95ab-4331-8ed5-5e456d5f3614",
  "computeSpec" : {
    "clusterSpecs" : [ {
      "name" : "sfo-w01-cl02",
      "vxRailDetails" : {
        "rootCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "adminCredentials" : {
          "credentialType" : "SSH",
          "username" : "admin",
          "password" : "VMware123!"
        },
        "sshThumbprint" : "SHA256:TJktbn7mnnbSimK/MuPemJgBSghcLqSkBye0GS0lFYk",
        "sslThumbprint" : "aabbccddee",
        "networks" : [ {
          "type" : "VSAN",
          "vlanId" : 1407,
          "subnet" : "10.0.60.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.60.1",
          "ipPools" : [ {
            "start" : "10.0.60.55",
            "end" : "10.0.60.57"
          } ]
        }, {
          "type" : "VMOTION",
          "vlanId" : 1406,
          "subnet" : "10.0.59.0/24",
          "mask" : "255.255.255.0",
          "gateway" : "10.0.59.1",
          "ipPools" : [ {
            "start" : "10.0.59.55",
            "end" : "10.0.59.57"
          } ]
        } ],
        "ipAddress" : "10.0.0.135",
        "dnsName" : "sfo-w01-cl02-vxrm-3.sfo.rainpole.io",
        "nicProfile" : "TWO_HIGH_SPEED"
      },
      "hostSpecs" : [ {
        "ipAddress" : "10.0.0.104",
        "hostName" : "sfo-w01-esx04",
        "username" : "root",
        "password" : "XXXX-XXXX"
      } ],
      "datastoreSpec" : {
        "vsanDatastoreSpec" : {
          "licenseKey" : "XXXX-XXXX"
        }
      },
      "networkSpec" : {
        "vdsSpecs" : [ {
          "name" : "sfo-w01-cl02-vds01",
          "isUsedByNsxt" : true,
          "portGroupSpecs" : [ {
            "name" : "sfo-w01-cl02-vds01-pg-mgmt",
            "transportType" : "MANAGEMENT"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vsan",
            "transportType" : "VSAN"
          }, {
            "name" : "sfo-w01-cl02-vds01-pg-vmotion",
            "transportType" : "VMOTION"
          } ]
        } ],
        "nsxClusterSpec" : {
          "nsxTClusterSpec" : {
            "geneveVlanId" : 1,
            "ipAddressPoolSpec" : {
              "name" : "static-ip-pool-01",
              "subnets" : [ {
                "ipAddressPoolRanges" : [ {
                  "start" : "10.0.11.50",
                  "end" : "10.0.11.70"
                }, {
                  "start" : "10.0.11.80",
                  "end" : "10.0.11.150"
                } ],
                "cidr" : "10.0.11.0/24",
                "gateway" : "10.0.11.250"
              } ]
            }
          }
        }
      },
      "skipThumbprintValidation" : false
    } ]
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/d65b6e51-4f30-4274-96ca-3ad226b1a019
Content-Length: 166

{
  "id" : "d65b6e51-4f30-4274-96ca-3ad226b1a019",
  "name" : "Add Cluster Workflow",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:45.581Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

Tip : Refer to: Get a Task.

  • If the “status” is “SUCCESSFUL”, the task is completed successfully.

  • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

3. Get the Clusters

3.1. Prerequisites

None

3.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 710

{
  "elements" : [ {
    "id" : "8045e44e-974e-4f43-9862-7f0326782655",
    "name" : "sfo-m01-cl01",
    "primaryDatastoreName" : "sfo-m01-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : false
  }, {
    "id" : "2345e44e-974e-4f43-9862-7f0326782898",
    "name" : "sfo-w04-cl01",
    "primaryDatastoreName" : "sfo-w04-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : true
  } ]
}

Get the Stretched Clusters

3.3. Prerequisites

None

3.4. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters?isStretched=true' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters?isStretched=true HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 365

{
  "elements" : [ {
    "id" : "2345e44e-974e-4f43-9862-7f0326782898",
    "name" : "sfo-w04-cl01",
    "primaryDatastoreName" : "sfo-w04-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : true
  } ]
}

Get the Vanilla Clusters

3.5. Prerequisites

None

3.6. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters?isStretched=false' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters?isStretched=false HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 366

{
  "elements" : [ {
    "id" : "8045e44e-974e-4f43-9862-7f0326782655",
    "name" : "sfo-m01-cl01",
    "primaryDatastoreName" : "sfo-m01-cl01-ds-vsan01",
    "primaryDatastoreType" : "VSAN",
    "hosts" : [ {
      "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
    }, {
      "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
    } ],
    "isStretched" : false
  } ]
}

4. Get the unmanaged clusters by criterion

This API is used to get the unmanaged clusters from vCenter that meets a specific criterion.

4.1. Prerequisites

  • Domain should already been created.

  • There must be a cluster already added to the VCenter.

  • The following data is required

  • ID of the created domain

Get the unmanaged clusters from vCenter based on a criterion

4.2. Steps

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Invoke the Get clusters Criteria API to list all the criteria supported.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 359

{
  "elements" : [ {
    "name" : "UNMANAGED_CLUSTERS_IN_VCENTER",
    "arguments" : { },
    "description" : "All unmanaged clusters that are not in inventory but there in vCenter"
  }, {
    "name" : "UNMANAGED_CLUSTER_IN_VCENTER",
    "arguments" : { },
    "description" : "Specific unmanaged cluster that is not in inventory but there in vCenter"
  } ]
}
  • Pick one of the criterion and post a query with its name attribute

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "UNMANAGED_CLUSTERS_IN_VCENTER"
}'

HTTP Request

POST /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries HTTP/1.1
Content-Type: application/json
Content-Length: 46
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "UNMANAGED_CLUSTERS_IN_VCENTER"
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c
Content-Type: application/json
Content-Length: 168

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "failure" : false,
    "completed" : false,
    "processing" : true
  },
  "result" : {
    "elements" : [ ]
  }
}
  • Read the tracking URL returned as Location header in the previous step.

  • Poll the tracking URL until the “status” is not “IN_PROGRESS”.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 285

{
  "queryInfo" : {
    "status" : "COMPLETED",
    "failure" : false,
    "completed" : true,
    "processing" : false
  },
  "result" : {
    "elements" : [ {
      "name" : "sfo-w01-cl01",
      "primaryDatastoreName" : "vsan-ds",
      "primaryDatastoreType" : "VSAN"
    } ]
  }
}

5. Get a Cluster

5.1. Prerequisites

The following data is required

  • ID of the cluster

5.2. Steps

  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/8045e44e-974e-4f43-9862-7f0326782655' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/8045e44e-974e-4f43-9862-7f0326782655 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 321

{
  "id" : "8045e44e-974e-4f43-9862-7f0326782655",
  "name" : "sfo-m01-cl01",
  "primaryDatastoreName" : "sfo-m01-cl01-ds-vsan01",
  "primaryDatastoreType" : "VSAN",
  "hosts" : [ {
    "id" : "c0703437-6746-470b-9e1c-f9d3bbc9b1c5"
  }, {
    "id" : "c0703431-6742-470b-9e1d-f9d3bbc9b1c9"
  } ],
  "isStretched" : false
}

5.3. Get list of VDSes of a cluster

Prerequisites

None

Steps
  • Invoke the API.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/vdses' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/vdses HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1984

[ {
  "id" : "bbcb8e27-2af5-4662-9631-d7982e132bbc",
  "name" : "sfo-w01-cl01-vds01",
  "isUsedByNsxt" : true,
  "mtu" : 1500,
  "portGroups" : [ {
    "name" : "sfo-w01-cl01-vds01-pg-mgmt",
    "transportType" : "MANAGEMENT",
    "portBindingType" : "EPHEMERAL",
    "vlanId" : 0
  }, {
    "name" : "sfo-w01-cl01-vds01-pg-vsan",
    "transportType" : "VSAN",
    "portBindingType" : "STATIC",
    "vlanId" : 0
  }, {
    "name" : "sfo-w01-cl01-vds01-pg-vmotion",
    "transportType" : "VMOTION",
    "portBindingType" : "STATIC",
    "vlanId" : 0
  } ],
  "niocBandwidthAllocations" : [ {
    "type" : "vsan",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "high"
      }
    }
  }, {
    "type" : "vmotion",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "low"
      }
    }
  }, {
    "type" : "vdp",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "low"
      }
    }
  }, {
    "type" : "nfs",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "low"
      }
    }
  }, {
    "type" : "hbr",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "low"
      }
    }
  }, {
    "type" : "iSCSI",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "low"
      }
    }
  }, {
    "type" : "virtualMachine",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "high"
      }
    }
  }, {
    "type" : "management",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "normal"
      }
    }
  }, {
    "type" : "faultTolerance",
    "niocTrafficResourceAllocation" : {
      "sharesInfo" : {
        "shares" : 0,
        "level" : "low"
      }
    }
  } ]
} ]

6. Get an unmanaged cluster by criterion

This API is used to get the unmanaged cluster by cluster name from vCenter that meets a specific criterion.

6.1. Prerequisites

  • Domain should already been created.

  • There must be a cluster already added to the VCenter.

  • The following data is required

    • ID of the created domain

    • List of unmanaged clusters with names

Tip : Refer to: Get the unmanaged clusters by criterion.

  • Choose one cluster name that need to be imported

  • Get the unmanaged cluster from vCenter for domain update based on a criterion*

6.2. Steps

  • Get the ID of the created domain

    • TIP: Get the Domains

    • Filter the response by VxRail Domain name and get the respective ID

  • Invoke the Get Clusters Criteria API to list all the criteria supported.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/criteria HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 359

{
  "elements" : [ {
    "name" : "UNMANAGED_CLUSTERS_IN_VCENTER",
    "arguments" : { },
    "description" : "All unmanaged clusters that are not in inventory but there in vCenter"
  }, {
    "name" : "UNMANAGED_CLUSTER_IN_VCENTER",
    "arguments" : { },
    "description" : "Specific unmanaged cluster that is not in inventory but there in vCenter"
  } ]
}
  • Pick one of the criterion and post a query with its name attribute

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "name" : "UNMANAGED_CLUSTER_IN_VCENTER"
}'

HTTP Request

POST /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries HTTP/1.1
Content-Type: application/json
Content-Length: 45
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "name" : "UNMANAGED_CLUSTER_IN_VCENTER"
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c
Content-Type: application/json
Content-Length: 168

{
  "queryInfo" : {
    "status" : "IN_PROGRESS",
    "failure" : false,
    "completed" : false,
    "processing" : true
  },
  "result" : {
    "elements" : [ ]
  }
}
  • Read the tracking URL returned as Location header in the previous step.

  • Poll the tracking URL until the “status” is not “IN_PROGRESS”.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/domains/2d54bb6c-637a-49a4-a94c-622671d0ab32/clusters/VxRail-Cluster-1/queries/622671d0ab32-2d54bb6c-637a-49a4-a94c HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1721

{
  "queryInfo" : {
    "status" : "COMPLETED",
    "failure" : false,
    "completed" : true,
    "processing" : false
  },
  "result" : {
    "elements" : [ {
      "name" : "sfo-w01-cl01",
      "primaryDatastoreName" : "vsan-ds",
      "primaryDatastoreType" : "VSAN",
      "hosts" : [ {
        "ipAddress" : "10.0.0.100",
        "fqdn" : "sfo-w01-esx01.sfo.rainpole.io",
        "vmNics" : [ {
          "name" : "vmnic2",
          "linkSpeedMB" : 10000,
          "isInUse" : false,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        }, {
          "name" : "vmnic3",
          "linkSpeedMB" : 10000,
          "isInUse" : false,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        }, {
          "name" : "vmnic0",
          "linkSpeedMB" : 10000,
          "isInUse" : true,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        }, {
          "name" : "vmnic1",
          "linkSpeedMB" : 10000,
          "isInUse" : true,
          "isAutoNegotiateSupported" : false,
          "isActive" : true
        } ]
      } ],
      "vdsSpecs" : [ {
        "name" : "sfo-w01-cl01-vds01",
        "isUsedByNsxt" : false,
        "portGroupSpecs" : [ {
          "name" : "sfo-w01-cl01-vds01-pg-mgmt",
          "transportType" : "MANAGEMENT",
          "activeUplinks" : null
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vsan",
          "transportType" : "VSAN",
          "activeUplinks" : null
        }, {
          "name" : "sfo-w01-cl01-vds01-pg-vmotion",
          "transportType" : "VMOTION",
          "activeUplinks" : null
        } ],
        "niocBandwidthAllocationSpecs" : null
      } ]
    } ]
  }
}

7. Expand a Cluster

Importing an individual host into a vcf cluster adds that host to the vcf cluster. You can import multiple hosts at a time to a cluster.

7.1. Prerequisites

  • The following data is required

    • ID of the cluster

    • For each host

    • ip address of the host

    • username of the host

    • password of the host

  • The cluster in a domain to which hosts are to be added must exist.

  • There must be a host already added to the cluster VCenter.

  • Ensure that the host you want to add is in an active state.

  • Prefer to use get unmanaged hosts calls to get the valid hosts ready for addition using query API

Tip : Refer to: Get the unmanaged hosts based on a Criterion.

7.2. Steps

  • Validate the input specification async.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.0",
      "hostName" : "sfo-w01-esx04",
      "username" : "test",
      "password" : "pass"
    } ]
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 187
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.0",
      "hostName" : "sfo-w01-esx04",
      "username" : "test",
      "password" : "pass"
    } ]
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/63411373-7e99-4ae3-83a9-a1a54368eb75
Content-Type: application/json
Content-Length: 143

{
  "id" : "63411373-7e99-4ae3-83a9-a1a54368eb75",
  "description" : "Validating Cluster Expansion Spec",
  "executionStatus" : "IN_PROGRESS"
}
  • Get Validation response of the cluster expansion specification from id obtained from previous spec validation call

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/4b841080-74cd-4a68-82c5-e4ea70945de7' -i -X GET \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

GET /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/4b841080-74cd-4a68-82c5-e4ea70945de7 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 185

{
  "id" : "4b841080-74cd-4a68-82c5-e4ea70945de7",
  "description" : "Validation result",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ ]
}
  • In case of no errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “SUCCEEDED”.

  • In case of errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “FAILED”.

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.0",
      "hostName" : "sfo-w01-esx04",
      "username" : "test",
      "password" : "pass"
    } ]
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 187
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.0",
      "hostName" : "sfo-w01-esx04",
      "username" : "test",
      "password" : "pass"
    } ]
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/f48209be-a326-41d3-941d-41b50b333743
Content-Length: 166

{
  "id" : "f48209be-a326-41d3-941d-41b50b333743",
  "name" : "Add Cluster Workflow",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:54.241Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

Tip : Refer to: Get a Task.

  • If the “status” is “SUCCESSFUL”, the task is completed successfully.

  • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

8. Compact a Cluster

When a host is removed from a cluster in a domain, the vSAN members are reduced. Ensure that you have enough hosts remaining to facilitate the configured vSAN availability. Failure to do so might result in the datastore being marked as read-only or in data loss.

8.1. Prerequisites

The following data is required

  • For each host to be removed

    • ID of the host

8.2. Steps

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "4dfe6fda-1b16-4aa9-87d3-608d52a2552d"
    } ]
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 115
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "4dfe6fda-1b16-4aa9-87d3-608d52a2552d"
    } ]
  }
}

HTTP Response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 296

{
  "id" : "c7523d9b-9942-49b8-b6f4-70a3947b4b71",
  "description" : "Validating Cluster Compaction Spec",
  "executionStatus" : "COMPLETED",
  "resultStatus" : "SUCCEEDED",
  "validationChecks" : [ {
    "description" : "ClusterCompactionSpecValidation",
    "resultStatus" : "SUCCEEDED"
  } ]
}
  • In case of no errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “SUCCEEDED”.

  • In case of errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “FAILED”.

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "0771fb22-0268-4f1b-8f0b-b2afd484ce22"
    } ]
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 115
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterCompactionSpec" : {
    "hosts" : [ {
      "id" : "0771fb22-0268-4f1b-8f0b-b2afd484ce22"
    } ]
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/5e0aaeae-d8ca-4ff3-8c76-7c65b434776c
Content-Length: 166

{
  "id" : "5e0aaeae-d8ca-4ff3-8c76-7c65b434776c",
  "name" : "Add Cluster Workflow",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:54.117Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

Tip : Refer to: Get a Task.

  • If the “status” is “SUCCESSFUL”, the task is completed successfully.

  • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

9. Prepare for Stretch

Prepare a Standard VxRail vSAN cluster prior to converting it to a Stretched cluster. This will ensure that the VMs on the existing hosts (availability zone) of the cluster do not get migrated to the hosts (second availability zone) that get added to the cluster.

Note : A cluster cannot be stretched if it has remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then try the prepare stretch operation. Also, remote vSAN datastores cannot be configured on stretched clusters. Please refer to the ‘VMware Cloud Foundation Administration Guide’ for more details.

9.1. Prerequisites

  • The following data is required

    • ID of the cluster

    • Boolean indicating the cluster has been marked for prepare.

  • The cluster must exist and the id should be valid.

  • The cluster must not be stretched.

9.2. Steps

  • Trigger the Prepare for Stretch task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "prepareForStretch" : true
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 32
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "prepareForStretch" : true
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/389f43c6-484b-41bb-93ee-146169c298c7
Content-Length: 203

{
  "id" : "389f43c6-484b-41bb-93ee-146169c298c7",
  "name" : "Prepare & configure Hosts-VM affinity for Stretch cluster",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:49.465Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

  • Track the task status using the “id” from the previous response.

    • If the “status” is “IN_PROGRESS”, the task is still in progress.

    • If the “status” is “SUCCESSFUL”, the task is completed successfully.

    • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

10. Stretch a Cluster

Convert a Standard VxRail vSAN cluster to a Stretched cluster

Note : A cluster cannot be stretched if it has remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then try the stretch operation. Also, remote vSAN datastores cannot be configured on stretched clusters. Please refer to the ‘VMware Cloud Foundation Administration Guide’ for more details.

10.1. Prerequisites

  • The Witness VM is not managed by SDDC and should be added to the datacenter corresponding to the cluster provided. Please refer to the ‘Deploying a vSAN Witness Appliance’ section in the ‘VMware Cloud Foundation Administration Guide’.

  • The vMotion, vSAN, and VXLAN networks require L3 routing between the availability zones. vSAN networks must also have L3 routing to the vSAN network of the witness host. Please refer to the ‘Prerequisites for Stretching a Cluster’ section in the ‘VMware Cloud Foundation Administration Guide’.

  • Hosts in the second availability zone being used for stretch should not already be a part of SDDC and should be added to the given VxRail cluster through the VxRail cluster expansion flow in vCenter. For more information to expand a VxRail cluster, contact Dell EMC Support.

  • The ‘Prepare for Stretch’ API should be executed before starting with the Stretch workflow.

  • A valid ‘Stretched Cluster’ license should be applied to the VxRail vSAN Cluster before executing stretch.

  • The following data is required

    • ID of the cluster

    • For each host in the second availability zone which needs to be used for the stretch operation

    • IP Address of the host

    • Hostname (fqdn) of the host

    • SSH Username

    • SSH Password

    • For the witness VM

    • vSAN IP

    • IP address or the fqdn

      • If the witness is managed in vCenter by the fqdn, the the same needs to be provided, else the IP address.
    • vSAN subnet cidr

    • For each availability zone

    • vSAN Gateway IP

    • vSAN subnet cidr

    • Secondary availability zone vLAN ID

  • The cluster should not be stretched and the id provided should be valid.

  • You must have a valid ESXi license specified with adequate sockets available for the host to be added.

  • Ensure that the given host should be in active state.

  • Underlying physical network should have proper MTUs and vSAN/vMotion connectivity between availability zones and the witness.

10.2. Steps

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "secondaryAzOverlayVlanId" : 0
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 554
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "secondaryAzOverlayVlanId" : 0
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/29600659-6f81-465e-b6ac-2756d838fa36
Content-Type: application/json
Content-Length: 145

{
  "id" : "29600659-6f81-465e-b6ac-2756d838fa36",
  "description" : "Stretch Cluster Validation Workflow",
  "executionStatus" : "IN_PROGRESS"
}
  • If the “executionStatus” is “IN_PROGRESS”, the spec validation task is still in progress.

  • In case of no errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “SUCCEEDED”.

  • In case of errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “FAILED”.

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "secondaryAzOverlayVlanId" : 0
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 554
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterStretchSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    },
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "secondaryAzOverlayVlanId" : 0
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/7f1930d7-44b1-4eaa-b4d3-5f9231d1a69a
Content-Length: 210

{
  "id" : "7f1930d7-44b1-4eaa-b4d3-5f9231d1a69a",
  "name" : "Extends VxRail vSAN cluster from a single data site to two sites",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:49.666Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

  • Track the task status using the “id” from the previous response.

    • If the “status” is “IN_PROGRESS”, the task is still in progress.

    • If the “status” is “SUCCESSFUL”, the task is completed successfully.

    • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

11. Expand a Stretched Cluster

The expansion workflow on a VxRail stretched cluster adds new hosts from a different availability zone to VCF. The hosts that are part of the expansion are already a part of the VxRail cluster.You can import multiple hosts at a time to a cluster.

11.1. Prerequisites

  • Hosts in the second availability zone being used for expansion should not already be a part of SDDC and should be added to the given VxRail cluster through the VxRail cluster expansion flow in vCenter. For more information to expand a VxRail cluster, contact Dell EMC Support. Please refer to the ‘Cluster Spanning for VMware Cloud Foundation on VxRail’ section in the ‘VMware Cloud Foundation Administration Guide’ for more information on expanding clusters that need cluster spanning.

  • The Witness VM is not managed by SDDC and should be added to the datacenter corresponding to the cluster provided. Please refer to the ‘Deploying a vSAN Witness Appliance’ section in the ‘VMware Cloud Foundation Administration Guide’.

  • The vMotion, vSAN, and VXLAN networks require L3 routing between the availability zones. vSAN networks must also have L3 routing to the vSAN network of the witness host. Please refer to the ‘Prerequisites for Stretching a Cluster’ section in the ‘VMware Cloud Foundation Administration Guide’.

  • The following data is required

    • ID of the cluster

    • For each host in the second availability zone which needs to be used for the expansion operation

    • IP Address of the host

    • Hostname (fqdn) of the host

    • SSH Username

    • SSH Password

    • Name of the availability zone which the new host belongs to

      • The availability zone name can be fetched from the vCenter
    • For the witness VM

    • vSAN IP

    • IP address or the fqdn

      • If the witness is managed in vCenter by the fqdn, the the same needs to be provided, else the IP address.
    • vSAN subnet cidr

    • For each availability zone

    • vSAN Gateway IP

    • vSAN subnet cidr

  • The cluster should be stretched and the id provided should be valid.

  • You must have a valid ESXi license specified with adequate sockets available for the host to be added.

  • Ensure that the given host should be in active state.

  • Underlying physical network should have proper MTUs and vSAN/vMotion connectivity between availability zones and the witness.

11.2. Steps

  • Validate the input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX",
      "azName" : "azName"
    } ],
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    }
  }
}'

HTTP Request

POST /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations HTTP/1.1
Content-Type: application/json
Content-Length: 547
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX",
      "azName" : "azName"
    } ],
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    }
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Location: /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32/validations/cb8f788d-4097-4074-b84b-7e493d461be6
Content-Type: application/json
Content-Length: 142

{
  "id" : "cb8f788d-4097-4074-b84b-7e493d461be6",
  "description" : "Validate Expand Cluster Workflow",
  "executionStatus" : "IN_PROGRESS"
}
  • If the “executionStatus” is “IN_PROGRESS”, the spec validation task is still in progress.

  • In case of no errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “SUCCEEDED”.

  • In case of errors in the input specification, the “executionStatus” is “COMPLETED” and “resultStatus” is “FAILED”.

Note : Make changes to the input specification and re-validate using a new API invocation.

  • Trigger the task using the valid input specification.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX",
      "azName" : "azName"
    } ],
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    }
  }
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 547
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "clusterExpansionSpec" : {
    "hostSpecs" : [ {
      "ipAddress" : "10.0.0.104",
      "hostName" : "sfo-w01-esx04",
      "username" : "root",
      "password" : "XXXX-XXXX",
      "azName" : "azName"
    } ],
    "vsanNetworkSpecs" : [ {
      "vsanGatewayIP" : "10.0.8.1",
      "vsanCidr" : "10.0.8.0/24"
    }, {
      "vsanGatewayIP" : "10.0.12.1",
      "vsanCidr" : "10.0.12.0/24"
    } ],
    "witnessSpec" : {
      "vsanIp" : "10.0.4.88",
      "fqdn" : "witness-vsan.sfo.rainpole.io",
      "vsanCidr" : "10.0.4.0/24"
    }
  }
}

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/3c5437b7-790b-449d-8891-1a94f6b74530
Content-Length: 169

{
  "id" : "3c5437b7-790b-449d-8891-1a94f6b74530",
  "name" : "Expand Cluster Workflow",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:52.128Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

  • Track the task status using the “id” from the previous response.

    • If the “status” is “IN_PROGRESS”, the task is still in progress.

    • If the “status” is “SUCCESSFUL”, the task is completed successfully.

    • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

12. Delete a Cluster

Warning : Datastores on the ESXi hosts in the cluster that will be deleted are destroyed.

Note : You cannot delete the last cluster in a domain. Instead, the domain can be deleted. A cluster cannot be deleted if it has remote vSAN datastores configured. If so, unmount the remote vSAN datastores from vCenter and then retry cluster deletion. Please refer to the ‘VMware Cloud Foundation On Dell EMC VxRail Administration Guide’ for more details.

12.1. Prerequisites

  • The following data is required

    • ID of the cluster to be deleted
  • Ensure that a cluster with the given ID exists.

  • The cluster has been marked for deletion.

  • Migrate or backup the VMs and data on the data store associated with the cluster to another location.

12.2. Steps

  • Initialize the deletion.

Warning : It is not possible to delete a cluster without having marked it for deletion. This 2-step deletion ensures that a cluster is not deleted accidentally.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X PATCH \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer etYWRta....' \
    -d '{
  "markForDeletion" : true
}'

HTTP Request

PATCH /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Content-Type: application/json
Content-Length: 30
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

{
  "markForDeletion" : true
}

HTTP Response

HTTP/1.1 200 OK
  • Trigger the deletion.

cURL Request

$ curl 'https://sfo-vcf01.rainpole.io/v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32' -i -X DELETE \
    -H 'Authorization: Bearer etYWRta....'

HTTP Request

DELETE /v1/clusters/2d54bb6c-637a-49a4-a94c-622671d0ab32 HTTP/1.1
Host: sfo-vcf01.rainpole.io
Authorization: Bearer etYWRta....

HTTP Response

HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/tasks/f5fe2ff0-853c-4d49-9861-2aba62c72253
Content-Length: 166

{
  "id" : "f5fe2ff0-853c-4d49-9861-2aba62c72253",
  "name" : "Add Cluster Workflow",
  "status" : "IN_PROGRESS",
  "creationTimestamp" : "2021-11-03T11:55:50.953Z"
}
  • Poll the task until “status” is not “IN_PROGRESS” using the “id” from the previous response.

Tip : Refer to: Get a Task.

  • If the “status” is “SUCCESSFUL”, the task is completed successfully.

  • If the “status” is “FAILED”, the task can be re-executed.

Tip : Refer to: Retry a Task.

Last updated 2021-11-03 05:03:41 PDT

Operations



Feedback

Was this page helpful?