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

  • Find your site and then click ....

  • Click Manage Configuration.

Figure: List of Sites
Figure: List of Sites

  • Click Edit Configuration.
Step 2: Enter a value for the corresponding key created in Step 1.
  • Navigate to the Labels field.

  • Select Add label.

Figure: Add Label
Figure: Add Label

  • Select a pre-defined key.

  • Click Save and Exit.

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

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

Figure: JSON for Labels
Figure: JSON for Labels

Note: The "metadata" field 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 for Metadata
Figure: JSON for Metadata


Create a Virtual Site

Note: The steps below show how to create a virtual site in the Distributed Apps service. This option limits the virtual site to a specific namespace. You can also create a virtual site in the Shared Configuration service. With the Shared Configuration service option, multiple site objects across different namespaces can use the same virtual site and be grouped together.

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 field, click Add label.

Figure: Selector Expression
Figure: Selector Expression

  • Select the label expression.
Step 4: Complete creating virtual site.

Click Save and Exit.


Concepts


API References