Create a Virtual Site

Objective

This guide provides instructions on how to create a virtual site by assigning labels. A virtual site provides a mechanism to perform operations on a group of sites, reducing the need to repeat the same set of operations for each site. To learn more about virtual sites and labels, see Virtual Site and Labels, respectively.

You can use virtual sites to deploy applications, discover service endpoints, and advertise services across a number of sites selected per the site selection criteria of the virtual site.

Using the instructions provided in this guide, you can assign labels to your sites and group them together to create a virtual site.


Prerequisites


Configuration

The following shows a label assignment and creation of a virtual site workflow:

Figure: Creating a Virtual Site using Labels
Figure: Creating a Virtual Site using Labels

Configuration Sequence

Creating a virtual site includes performing the following sequence of actions:

Phase Description
Create and Assign a Custom Label Create a new label or use an existing label to assign it to a site.
Create a Virtual Site Create a virtual site using the label expression. The label created in the previous phase is used to match the site and group it under the virtual site.

Note: The keys and labels can be provided by the system or can be user-defined. For more information on labels, see Labels.


Create and Assign a Custom Label

Perform these steps to create and assign a custom virtual site label:

Step 1: Navigate to the list of sites.
  • Log into F5® Distributed Cloud Console (Console) and click Cloud and Edge Sites.

Figure: Console Homepage
Figure: Console Homepage

  • Click Sites > Site List.

  • Find your site and then click ....

  • Click Manage Configuration.

Step 2: Enter a value for the corresponding key created in Step 1.
  • Navigate to the Labels field and enter a key. You can select a pre-defined key or create your own key.

  • Click Save changes.

Figure: Save Changes
Figure: Save Changes

Step 3: View the newly created custom label.
  • Navigate to your site from Site List and expand the metadata JSON section.

  • Expand "labels" to view the newly created site label.

Note: The metadata section contains all labels associated with your site. As sites are registered, Distributed Cloud Services automatically populates some labels, such as hw-vendor, provider, hw-model, etc. You can determine the existing labels assigned to your site by checking the site schema from Console or using APIs.

Figure: JSON Section
Figure: JSON Section


Create a Virtual Site

Step 1: Start creating the virtual site.
  • In Console, click Distributed Apps.

Figure: Console Homepage
Figure: Console Homepage

  • Navigate to your desired namespace.

  • Click Manage > Virtual Sites.

  • Click Add virtual site to load the creation form.

Figure: Add Virtual Site
Figure: Add Virtual Site

Step 2: Enter the required information.
  • In the Metadata section Name field, enter a virtual site name.

  • In the Site Type section, select a site type from the drop-down menu.

Step 3: Frame the label expressions to group sites.
  • From the Selector Expression drop-down menu, click Add label.

  • Select the label expression.

Step 4: Complete creating virtual site.

Click Save and Exit.


Concepts


API References