A system administrator whose authority extends to more than one VMware Cloud Director server group can configure those server groups as an association of VMware Cloud Director sites.

To create an association between two sites (we'll call them Site-A and Site-B here), you must be a system administrator at both sites so that you can log in to each site to retrieve the information required to associate the site with another site, then make a POST request to each site supplying the other site's association information.

Important:

The process of associating two sites can be logically decomposed into two complementary pairing operations. The first operation (in this example) pairs Site-A with Site-B. You must then go on to pair Site-B with Site-A. Until both pairings are complete, the heartbeat process reports that the association is incomplete (showing a Status value of ASYMMETRIC).

Prerequisites

  • This operation is restricted to system administrators.

  • You must be a system administrator at both sites.

Procedure

  1. Log in to Site-A and retrieve its site association data.
    Site association data is contained in the SiteAssociations element of the Site object.
    GET https://Site-A.example.com/api/site
    ...
    <Site
       name="Site-A"
       id="urn:vcloud:site:94b78377-a3f8-4970-8e44-662d209f35f7"
       href="https://Site-A.example.com/api/site">
       ...
       <Link
          rel="down"
          href="https://Site-A.example.com/api/site/associations" ... />
       ...
    </Site>
    The SiteAssociations element includes a link of the form:
    <Link
       rel="down"
       href="https://Site-A.example.com/api/site/associations/localAssociationData"/>
    Make a GET request to this link to retrieve the SiteAssociationMember element that contains the information required when associating this site with another site.
    GET https://Site-A.example.com/api/site/associations/localAssociationData
    ...
    <SiteAssociationMember ...>
       <Link ...>
       ...
       <RestEndpoint>https://Site-A.example.com</RestEndpoint>
       <RestEndpointCertificate>-----BEGIN CERTIFICATE-----
          MIIDDTCCAfWgAwIBAgI...Ix0eSE= -----END CERTIFICATE-----
       </RestEndpointCertificate>
       <SiteId>urn:vcloud:site:94b78377-a3f8-4970-8e44-662d209f35f7</SiteId>
       <SiteName>Site-A</SiteName>
       <PublicKey>-----BEGIN PUBLIC KEY----- 
          MIIBIjANBgkqhki...QQIDAQAB -----END PUBLIC KEY----- 
       </PublicKey>
    </SiteAssociationMember>
    Save this response. You'll need it in Step 3.
  2. Log in to Site-B and retrieve its add link for associations.
    This link is contained in the SiteAssociations element of the Site object .
    GET https://Site-B.example.com/api/site
    ...
    <Site
       name="Site-B"
       ...
       <Link
          rel="down"
          href="https://Site-B.example.com/api/site/associations" ... />
       ...
    </Site>
    Retrieve the SiteAssociations to see this link.
    GET https://Site-B.example.com/api/site/associations
    ...
    <SiteAssociations
       ...
       <Link
          rel="add"
          href="https://Site-B.example.com/api/site/associations" ... />
       ...
    </Site>
  3. POST the SiteAssociationMember response body you retrieved in Step 1 to the siteAssociations link for Site-B.
    You can include the entire response body. Any Link elements from the response body are ignored in a request. For brevity, this example omits the Link elements.
    POST https://Site-B.example.com/api/site/associations
    content-type: application/vnd.vmware.admin.siteAssociation+xml
    ...
    <SiteAssociationMember ...>
       <RestEndpoint>https://Site-A.example.com</RestEndpoint>
       <RestEndpointCertificate>-----BEGIN CERTIFICATE-----
          MIIDDTCCAfWgAwIBAgI...Ix0eSE= -----END CERTIFICATE-----
       </RestEndpointCertificate>
       <SiteId>urn:vcloud:site:94b78377-a3f8-4970-8e44-662d209f35f7</SiteId>
       <SiteName>Site-A</SiteName>
       <PublicKey>-----BEGIN PUBLIC KEY----- 
          MIIBIjANBgkqhki...QQIDAQAB -----END PUBLIC KEY----- 
       </PublicKey>
    </SiteAssociationMember>
    The response is a Task.
    When the task succeeds, Site-A has been paired with Site-B. Until you pair Site-B with Site-A, the Status of the association is incomplete ( ASYMMETRIC).
    <SiteAssociationMember ...>
       ...
       <Status>ASYMMETRIC</Status>
    </SiteAssociationMember>

What to do next

Repeat this procedure, modified as needed to retrieve the SiteAssociationMember content from Site-B and POST it to Site-A. The multisite heartbeat process confirms the network connection between the sites and then sets the Status value of each SiteAssociationMember to ACTIVE.

Important: If you plan to create stretched networks across the associated sites, ensure that there are no MAC address conflicts. If the two sites are configured with the same installation ID, you must regenerate the MAC addresses in one of the sites. For information about regenerating MAC addresses, see the cell management tool reference in the VMware Cloud Director Administrator's Guide.