In this post, we will review the necessary steps to instantiate Edge Clusters inside of a vCloud Director instance. We will break this down to manageable sections that can be easily followed.
Edge Cluster Preparation
First off, we need to prepare our newly created Edge Cluster in our vCenter along with creating a resource pool. Currently, I am using two Edge Clusters each with two nodes for my lab – RegionA01-EDGE01 and RegionA01-EDGE02. We can have up to ten (10) Edge Clusters registered to a vCD instance, however, I am utilizing two for high availability purposes.
Let’s go ahead and create my resource pool – naming it respectively Edge-RP-01 and Edge-RP-02 – Next, we need to create a storage policy and a tag inside of the vCenter where the Edge Cluster is located. If the provider is utilizing an existing storage policy that will be used for Edge Cluster consumption, one can skip this step. However, let’s assume this is a greenfield Edge Cluster deployment. First, let’s create a new tag called “Edge Cluster” Then we need to tag our datastore that resides on the Edge Clusters with this specific tag. For my lab environment, I am using “RegionA01-ISCSI01-COMP02” for Edges. Now, let’s create a new storage policy, we will call this “Edge Storage Policy” – We need to utilize a Rule Set that’s based on “Tag based placement” and utilizes the Storage category (this is what I utilized when creating the tag). From there, I selected my “Edge Cluster” tag – On Storage compatibility screen, we can verify that it is reflecting my selected (tagged) datastore and we’re good to go from here – Next, we need to prepare our Edge Clusters for NSX. I’m not going to walk through the steps required for this (installing VIBs, adding VTEP, etc.) however it is necessary that we add it to the respective Transport Zone that vCD consumes for cloud services. For my lab environment, I am using “Gold-PVDC-VXLAN-NP” for this configuration – Final step to prepare for instantiation inside of vCD. We need to refresh the storage policies and network pools. Navigate to Network Pools -> right click and Sync while right clicking on the vCenter object and “Refresh Storage Policies” –
Creation of Edge Clusters in vCloud Director
Now we are ready to create our initial Edge Clusters inside of my vCD instance. As stated before, we support up to 10 Edge Clusters, but I will be adding two to my environment for availability purposes. I will be utilizing Postman as it’s my preferred method to work with the API. Also note we will be utilizing the new “cloudapi” which requires a bearer token authentication configuration. If you need further guidance and an easy way to set this up, please check out my esteemed colleague Tom Fojta wrote on his tutorial. Once we have our bearer token, ensure your version is set to 32 – this is required so we can work with the new networkProfile and EdgeCluster constructs. Let’s check out what’s currently configured to the “edgeClusters” section –
As we can see, there’s nothing configured currently with EdgeClusters to my vCD instance. Let’s prepare for what we need to create the body of our post. We will need the following attributes:
Name – Edge Cluster name
Description – friendly descriptor of the Edge Cluster
Under the resourcePool frame, we need the following:
Moref – Managed Object Identifier
vcId – vCD’s identifier of the vCenter Server
storageProfileName – name of the storage profile inside of vCD (vCenter)
While Name, Description, and Storage Policy (or profile) are pretty straight forward, let’s figure out how we can get the object identifier and the vcId. I utilized the Managed Object Browser of the vCenter to figure out the resource pool ID – remember, you want to find out the explicit ID of the created RP – To ascertain the vcId, we will browse the vCD API and look at “vimServerReferences” – for my environment, I had a single vCenter server attached to this vCD instance.
The highlighted portion shows the exact ID required for the vcId portion – this starts at the “urn” prefix. Okay, let’s go ahead and build the JSON body. Note that I am selecting raw and JSON as my application to successfully post this
Once executed, one can check the status of the task inside of vCD. If we do a GET on this location, we can see that the task was successful. Now, if we do a GET on the edgeClusters location, we should see our first Edge Cluster. Excellent! Now, I’m going to go ahead and build my POST body for the 2nd Edge Cluster. It was a success… Now, if we do a GET on the edgeClusters, we can see both Edge Clusters registered to vCD. One can see that there’s an ID generated for each Edge Cluster. We will need this information for configuring each oVDC. Therefore, I created a notepad entry that depicts each of these values and what I intend to establish – Edge01 is my primary Edge Cluster while Edge02 is secondary.
Applying Edge Cluster Configuration to Tenant Organization VDC
Now we are ready to apply this newly created Edge Cluster configuration to one of my tenants in my vCD instance. In this example, I am going to be configuring my organization VDC “Public-OVDC” with this new Edge Cluster – First, let’s verify that I am using the correct network pool – yes, I see “Gold-PDVC-VXLAN-NP” configured for this oVDC – Back to Postman – now we need to browse to this specific oVDC so we can configure the networkProfile information.
Search for “vdc” in the received body – we are looking for the HREF link so we can browse to that – Doing a GET on this VDC and searching for “NetworkProfile” will provide us the link we need for manipulating the configuration –
If we take this newly found HREF and do a get, we should see a clean configuration for the EdgeCluster – Great! Now we are ready to build a body for a PUT operation. Again, I referenced my notepad entry so I can build out each respective ID – Let’s check the status of the task…looks good… Now, let’s do a GET on the networkProfile. We see the newly configured Edge Clusters!
Validation
Going back to my Public-OVDC, let’s go ahead and create a new Edge. Going through the new H5 wizard for creation of an Edge – Let’s confirm…. Now, let’s take a look at the vCenter and see what’s happening. As we can see, the Edge is being deployed to EDGE01 which is my configured primary. Great! Now, deployment is complete, but I want to turn on Edge HA to ensure it deploys the secondary instance to EDGE02 cluster. Deploying… Operational! Now, Public-OVDC has the ability to consume distinct Edge services between these two Edge Clusters. Next up, Part 3 – Edge Cluster Design and Migration Considerations for VMware vCloud Director 9.7 (Part 3 of 3) By Daniel Paluszek and Abhinav Mishra