Top Banner
Getting Started with VMware Tanzu Service Mesh VMware Tanzu Service Mesh
24

Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Jul 17, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Getting Started with VMware Tanzu Service Mesh

VMware Tanzu Service Mesh

Page 2: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

You can find the most up-to-date technical documentation on the VMware website at:

https://docs.vmware.com/

VMware, Inc.3401 Hillview Ave.Palo Alto, CA 94304www.vmware.com

Copyright ©

2020 VMware, Inc. All rights reserved. Copyright and trademark information.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 2

Page 3: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Contents

1 About Getting Started with VMware Tanzu Service Mesh 4

2 Sign Up for Tanzu Service Mesh 5Sign Up for Tanzu Service Mesh with a VMware Account 5

Sign Up for Tanzu Service Mesh Without a VMware Account 6

3 Access the Tanzu Service Mesh Console 9

4 Onboard a Cluster to Tanzu Service Mesh 10View the Summary Infrastructure and Service Information 12

Remove a Cluster from Tanzu Service Mesh 16

5 Connect Services Across Clusters with a Global Namespace 17

6 Manage Services with a Service Group 21

VMware, Inc. 3

Page 4: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

About Getting Started with VMware Tanzu Service Mesh 1The Getting Started with VMware Tanzu Service Mesh documentation provides information about setting up and using VMware Tanzu™ Service Mesh™, built on VMware NSX®.

To help you get started with Tanzu Service Mesh, this documentation walks you through performing essential operations, such as signing up for Tanzu Service Mesh and onboarding clusters, and using primary features, such as creating a global namespace.

Intended Audience

This information is intended for the following audiences:

n DevOps engineers, site reliability engineers (SREs), and platform operators who want to use Tanzu Service Mesh to deploy and manage cloud-native microservices applications across clusters, clouds, and platforms.

n Application developers and service owners who want to use Tanzu Service Mesh for application development.

n Security engineers and SecOps engineers who want to use Tanzu Service Mesh to configure user- and data-centric security policies for their microservices applications and benefit from security analytics and compliance capabilities of the product.

The information is written for platform operators, application developers, and security engineers who have a basic understanding of Kubernetes and are familiar with container deployment concepts and service mesh concepts.

VMware, Inc. 4

Page 5: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Sign Up for Tanzu Service Mesh 2You need to sign up for Tanzu Service Mesh, a software as a service (SaaS) offering from VMware, to use it.

You sign up for Tanzu Service Mesh through VMware Cloud Services, which is a web-based platform that you use to sign up for and manage your services on VMware Cloud Services.

During the sign-up, you need to add Tanzu Service Mesh to an existing organization in VMware Cloud Services or create an organization and add Tanzu Service Mesh to it. VMware Cloud uses organizations to provide controlled access to one or more services. The default currency of the organization you select for Tanzu Service Mesh will be used to pay for it.

You must belong to an organization before you can access Tanzu Service Mesh. If you are an organization owner, you have access to all the resources of the organization. You can add cloud services to your organization and then invite users. After you add Tanzu Service Mesh to your organization, you can add users to the organization to give them access to Tanzu Service Mesh. For more information about organizations and adding users to an organization, see the VMware Cloud Services documentation.

You need a VMware account to sign up for Tanzu Service Mesh. If you don't have a VMware account, you can create one when you sign up.

This chapter includes the following topics:

n Sign Up for Tanzu Service Mesh with a VMware Account

n Sign Up for Tanzu Service Mesh Without a VMware Account

Sign Up for Tanzu Service Mesh with a VMware Account

If you have a VMware account, you can use it to sign up for Tanzu Service Mesh in VMware Cloud Services. You can select an existing organization for Tanzu Service Mesh or can create an organization and add Tanzu Service Mesh to it.

Prerequisites

Verify the following prerequisites:

n You have a VMware account.

n You have received an email with a Tanzu Service Mesh activation link from VMware.

VMware, Inc. 5

Page 6: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Procedure

1 Paste the Tanzu Service Mesh activation link from the email received from VMware into Chrome.

2 On the VMware Cloud Services login page, click the email address for your VMware account.

3 Enter the password for your VMware account and click Sign In.

4 On the Welcome to VMware Cloud Services page, select an organization to which you want to add Tanzu Service Mesh.

Option Description

Add Tanzu Service Mesh to an existing organization.

Select the organization on the right side of the page.

Add Tanzu Service Mesh to a new organization.

a Click Create New Organization.

b Provide a name for the organization.

c Specify the address for the organization.

d Read and accept the terms of service.

e Click Continue and then select the organization.

Results

You have signed up for Tanzu Service Mesh. The Welcome to Tanzu Service Mesh page appears. Tanzu Service Mesh takes a few minutes to create a software as a service (SaaS) tenant for your organization in VMware Cloud and deploy the necessary service mesh microservices. When the setup is complete, the Onboard Clusters dialog box appears. You can use this dialog box to Chapter 4 Onboard a Cluster to Tanzu Service Mesh.

Sign Up for Tanzu Service Mesh Without a VMware Account

If you don't have a VMware account, you can create one when you sign up for Tanzu Service Mesh. You also need to create an organization in VMware Cloud Services and then add Tanzu Service Mesh to the new organization as part of the sign-up.

Prerequisites

Verify that you have received an email with a Tanzu Service Mesh activation link from VMware.

Procedure

1 Paste the Tanzu Service Mesh activation link from the email received from VMware into Chrome.

2 On the VMware Cloud Services login page, click Create Your VMware Account.

3 On the Create VMware Account page, provide the following information.

Country of Business

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 6

Page 7: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Select the country where your organization does business.

Sign-in Credentials

Enter your email address and then enter and confirm the password that you want to use for your VMware account.

User Profile

Enter your first name, last name, and your phone number.

Business Profile

Provide the name of your business and your business address and specify the nature of your organization's relationship with VMware.

4 Click the My VMware Terms of Use Agreement link, read the My VMware terms of use, and then select the check box next to the link.

5 (Optional) Select the check box to receive updates and other news about cloud services from VMware and its affiliates.

6 Click Continue.

7 On the Identity Verification page, complete the required identity verification step:

a Click Send Verification Code to have a verification code sent to the email address you provided.

b Enter the received code and click Verify Code.

The message Email Verification. Verified appears.

8 Click Create VMware Account.

The message Your VMware Account has been successfully created appears.

9 Click Continue to Complete Sign Up.

10 In VMware Cloud Services Console, create an organization and Tanzu Service Mesh to the organization:

a Click Create New Organization.

b Provide a name for the organization.

c Specify the address for the organization.

d Click Terms of Services to read the terms for using Tanzu Service Mesh and then select the check box next to the Terms of Service link.

e Click Continue and then select the organization to add Tanzu Service Mesh to it.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 7

Page 8: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Results

You have signed up for Tanzu Service Mesh. The Welcome to Tanzu Service Mesh page appears. Tanzu Service Mesh takes a few minutes to create a software as a service (SaaS) tenant for your organization in VMware Cloud and deploy the necessary service mesh microservices. When the setup is complete, the Onboard Clusters dialog box appears. You can use this dialog box to Chapter 4 Onboard a Cluster to Tanzu Service Mesh.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 8

Page 9: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Access the Tanzu Service Mesh Console 3You can access Tanzu Service Mesh Console in VMware Cloud Services to start managing your services with Tanzu Service Mesh.

Procedure

1 In your browser, go to the VMware Cloud Services login page.

2 Click the email address for your VMware account.

3 Enter the password for your VMware account and click Sign In.

The VMware Cloud Services Console opens.

4 If you belong to multiple organizations, click your user name in the upper-right corner and select the appropriate organization in the Change Organization drop-down menu.

5 Click the Tanzu Service Mesh tile to open the Tanzu Service Mesh Console.

VMware, Inc. 9

Page 10: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Onboard a Cluster to Tanzu Service Mesh 4To manage the microservices in your application with Tanzu Service Mesh, you must onboard the clusters where the microservices are deployed. Onboarding involves registering the cluster with Tanzu Service Mesh and installing the necessary components on the cluster.

If you want to first use Tanzu Service Mesh in your testing environment, you can onboard a clean cluster without microservices and namespaces and then deploy a sample application on the cluster. Chapter 5 Connect Services Across Clusters with a Global Namespace includes steps on how to deploy the services of a sample application on two clusters.

Prerequisites

n Verify that your environment meets the requirements listed in Tanzu Service Mesh Environment Requirements and Supported Platforms.

n Chapter 3 Access the Tanzu Service Mesh Console.

Procedure

1 In the upper-left corner of the Tanzu Service Mesh Console, click Add New and then Onboard New Cluster to open the Onboard Clusters dialog box.

If you're onboarding your first cluster to Tanzu Service Mesh, the Onboard Clusters dialog box appears automatically when you finish signing up for Tanzu Service Mesh

2 In the Onboard Clusters dialog box, enter the name that you want your cluster to have in the Tanzu Service Mesh Console.

The cluster name that you enter here can be different from the name of the cluster in your environment. The cluster name cannot contain special characters, such as a number sign (#), at sign (@), apostrophe ('), underscore (_), and uppercase letters.

3 Click Generate Security Token to generate a security token.

n This security token is used to establish a secure connection between Tanzu Service Mesh and your cluster during the onboarding.

n If the Generate Security Token button is unavailable, refresh the browser.

In the box under Then add the token to connect securely with Tanzu Service Mesh, the kubectl command for creating a Kubernetes secret for the security token becomes available.

VMware, Inc. 10

Page 11: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Under 2 Apply the registration YAML to the cluster, the kubectl command for applying the registration YAML file to the cluster also becomes available. This file contains the Kubernetes configuration required for the registration of the cluster with Tanzu Service Mesh.

4 Under 2 Apply the registration YAML to the cluster, click to copy the command for applying the registration YAML.

Note Do not close the Onboard Clusters dialog box.

5 Open a terminal window and set the current context to your cluster:

$ kubectl config use-context cluster_name

6 To apply the configuration to your cluster, run the copied YAML registration command.

7 Go back to the Onboard Clusters dialog box and under Then add the token to connect

securely with Tanzu Service Mesh, click to copy the command for creating a secret for the security token.

8 In a terminal window, run the copied command to establish a secure connection to Tanzu Service Mesh using the security token.

The progress bar "Registering cluster with Tanzu Service Mesh" appears in the Onboard Clusters dialog box. Registering the cluster with Tanzu Service Mesh takes a few minutes. When the registration is complete, the Install Service Mesh button becomes available.

9 Click Install Service Mesh to install Tanzu Service Mesh on the cluster.

An installation progress bar appears. When the installation is complete, Successfully Onboarded appears next to the cluster name.

10 Perform the appropriate step.

n To onboard another cluster, click Onboard Another Cluster and repeat steps 1–8.

n To close the Onboard Clusters dialog box and display the Tanzu Service Mesh Console, click Exit To Console.

Results

Tanzu Service Mesh displays information about the infrastructure of each onboarded cluster and the microservices deployed there. Tanzu Service Mesh also starts monitoring and collecting infrastructure and service metrics from the cluster (such as number of nodes and services, requests per second, latency, and CPU usage). The Home page of the Tanzu Service Mesh Console provides summary information about the cluster's infrastructure, a visualization of the topology of the services in the cluster, and key metrics. For more information, see View the Summary Infrastructure and Service Information.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 11

Page 12: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

What to do next

If you have a multicluster or hybrid-cloud application, you can connect, secure, and manage the services in the application across the clusters with a global namespace. For more information, see Chapter 5 Connect Services Across Clusters with a Global Namespace.

View the Summary Infrastructure and Service Information

Tanzu Service Mesh provides summary information about the infrastructure of each onboarded cluster (its nodes, services, and service instances) and about each global namespace (its clusters, services, and service instances). You can also observe key infrastructure and service metrics and examine the connections between the services in a service topology graph.

You can access the summary infrastructure information, metrics, and service topology graphs from the Home page of the Tanzu Service Mesh Console. You can use this information and metrics to monitor the state of your infrastructure and the performance of your services.

Prerequisites

Chapter 3 Access the Tanzu Service Mesh Console.

Procedure

1 In the navigation panel on the left side of the Tanzu Service Mesh Console, click Home.

The metrics bar at the top of the Home page displays a summary of infrastructure and service metrics. The metrics are aggregated across your entire cluster infrastructure and services.

2 To control which metrics are displayed on the metrics bar, click Metric Settings and select the check box next to each metric that you want displayed.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 12

Page 13: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

3 View the summary information for your clusters and the topology graph for the services deployed on each cluster.

a On the Fabric Overview tab, click Clusters to view the cards for the clusters onboarded to Tanzu Service Mesh.

Note You can specify the time period for which to display data by selecting a period in the Data drop-down menu. This is a global setting and applies not only to the data on the Home page but also to the data on the other pages of Tanzu Service Mesh.

The following image shows an example of a cluster card.

A cluster's card displays the number of nodes, services, and service instances in the cluster and a minimized service topology graph.

b Point to the cluster name to see a summary card with the key metrics and details about the cluster.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 13

Page 14: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

c Click the cluster name to view the details page for the cluster.

d Click the minimized graph in the cluster card to view the detailed service topology graph.

The graph shows the following information:

n All the connected services that are deployed on the cluster. You can select to view all the services on the cluster or the services that belong to a specific namespace.

n In the upper-right corner of the page, in the Show drop-down menu, select All Services or a namespace.

n The connections between the services. Lines represent inbound and outbound service traffic. Tanzu Service Mesh tracks and reflects the state of communication between the services for the time period selected in the Data drop-down menu (for example, Last 30 minutes). If two services don't communicate at a specific point in time, no line is shown between those services in the graph.

n The metrics for the services (such as requests per second). You can specify which metrics are displayed by clicking Settings in the upper-right corner and selecting the check box next to each metric you want displayed.

4 View the information and metrics for a service shown in the graph.

a To view a card with the details and metrics about the service, point to the name of a service in the graph.

b To view the details page for the service, click the service name.

5 (Optional) To reposition the service nodes in the graph for better viewing, drag them.

6 (Optional) To zoom in and zoom out of the graph or make it fit into the page width, use the buttons in the upper-right corner.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 14

Page 15: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

7 View the summary information for the global namespaces and the service topology graph for the services in each global namespace.

a On the Fabric Overview tab, click Global Namespaces to view the cards for the global namespaces created in Tanzu Service Mesh.

A global namespace card displays the number of clusters, services, and service instances in the global namespace and a minimized service topology graph.

b Click the name of the global namespace to view its details page.

c Click the minimized graph in the global namespace card to view the detailed services topology graph.

The graph shows the following:

n All the services that are connected within the global namespace. Point to the name of a service in the graph to view a summary card with the details and metrics about the service. Click the service name to view the details page for the service.

n The intracluster and cross-cluster connections between the services. Lines represent inbound and outbound service traffic. The topology graph in the image above shows the services from two clusters in a global namespace. The shopping service in one cluster communicates with the catalog service in the other cluster. Tanzu Service Mesh tracks and reflects the state of communication between the services for the time period selected in the Data drop-down menu (for example, Last 30 minutes). If two services don't communicate at a specific point in time, no line is shown between those services in the graph.

n The metrics for the services (such as requests per second). You can specify which metrics are displayed by clicking Settings in the upper-right corner and selecting the check box next to each metric you want displayed.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 15

Page 16: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

d (Optional) To reposition the service nodes in the graph for better viewing.

e (Optional) To zoom in and zoom out of the graph or make it fit into the page width, use the buttons in the upper-right corner.

Remove a Cluster from Tanzu Service Mesh

You can remove an onboarded cluster from Tanzu Service Mesh if you no longer need Tanzu Service Mesh to manage the services on the cluster.

Prerequisites

Chapter 3 Access the Tanzu Service Mesh Console.

Procedure

1 In the navigation panel on the left, click Home.

2 On the Home page, click the Fabric Overview tab and then click Clusters.

3 On the card for the cluster, click the cluster name.

4 In the upper-right corner of the cluster details page, click Remove Cluster.

Results

The information about the cluster is removed from the Tanzu Service Mesh Console.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 16

Page 17: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Connect Services Across Clusters with a Global Namespace 5With global namespaces in Tanzu Service Mesh, you can easily connect and secure the services in your application across clusters. You can learn how to add the services in your application to a global namespace to have them automatically discovered and connected across the clusters.

Where appropriate, an example of a sample e-commerce application is used to show you how to connect services across clusters by adding them to a global namespace. The sample application is made up of 12 services and is configured to have most of the services deployed on one cluster and the catalog service deployed on the other cluster.

Prerequisites

Verify the following prerequisites:

n You have onboarded the clusters where your services are deployed. For a global namespace, you must onboard at least two clusters. For more information about onboarding a cluster, see Chapter 4 Onboard a Cluster to Tanzu Service Mesh.

n You know the Kubernetes namespaces in your clusters that hold the services of your application.

n You are in the Tanzu Service Mesh Console. For information about accessing the Tanzu Service Mesh Console, see Chapter 3 Access the Tanzu Service Mesh Console.

Procedure

1 In the Tanzu Service Mesh Console, create a global namespace for your application services:

a In the navigation panel on the left, click Add New and then click New Global Namespace.

b On the General Details page of the New Global Namepace wizard, enter a unique name and a domain name for the global namespace.

The name of a global namespace and its domain name together forms a fully qualified domain name (FQDN) that uniquely identifies that global namespace and makes it possible for the services in the global namespace to communicate with each other across clusters.

In the example, you must enter a name of sample-gns and a domain name of sample.app.com.

VMware, Inc. 17

Page 18: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

c On the Service Mapping page, to add the services in your application to the global namespace, specify their Kubernetes namespace-cluster pairs. Under Map services in Kubernetes Namespace(s), in the left drop-down menu, select the namespace on one of your clusters that holds some of the services and in the right drop-down menu, select the name of the cluster. Click Add Service Mapping to select namespace-cluster pairs for the other services deployed on the other clusters.

The namespace-cluster pairs you specify here define service mapping rules that are used to select services for a global namespace. Click Service Preview under each service-mapping rule to see the names of the selected services from each cluster.

The sample application has services running on two clusters. For most of the services running in one cluster, select the default namespace in the left drop-down menu and the prod-cluster1 cluster in the right drop-down menu. Then click Add Service Mapping and select the default namespace and the prod-cluster2 cluster for the catalog service on the other cluster.

d On the next pages of the wizard, select service and security options.

On this page Select

Public Services (Optional) page No Public Services

External Services (Optional) page No External Services

Security page Default Self-signed Certificate and Mandatory mTLS encryption

e Review the configuration of the global namespace and click Finish.

2 To enable the cross-cluster communication between the services, edit the Kubernetes deployment manifest for the appropriate service on one cluster to specify the domain name of the global namespace, prefixing the domain name with the name of the service on the other cluster.

Important Make sure that you prefix the domain name with the name of the service that you want the service being edited to communicate with. See the following example.

In the sample application, the shopping service on one cluster must communicate with the catalog service on the other cluster. To edit the deployment manifest of the shopping service, run the following kubectl command.

kubectl --context=prod-cluster1.local edit deployment shopping

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 18

Page 19: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

In the deployment manifest, set the appropriate variable to catalog.sample.app.com. The catalog prefix is required for the shopping service to communicate with the catalog service.

Important If you are using your custom application instead of the sample application, make sure to add the name of the port in the latest version protocol resolver in the Kubernetes deployment manifest for your application. This is needed for the services running on one cluster to communicate with the services running on the other clusters.

For HTTP, prefix name with "http-", for example, http-server. The following example of a deployment manifest shows name for HTTP under ports.

apiVersion: apps/v1

kind: Deployment

metadata:

name: order-app-deployment

spec:

selector:

matchLabels:

app: order-service-app

replicas: 1 # tells deployment to run N pods matching the template

template: # create pods using pod definition in this template

metadata:

labels:

app: order-service-app

spec:

containers:

- env:

- name: CATALOG_HOST

value: catalog-service.onlinestore

- name: CATALOG_PORT

value: "8010"

- name: CUSTOMER_HOST

value: customer-management-service.onlinestore

- name: CUSTOMER_PORT

value: "8011"

image: my-images/order-service

imagePullPolicy: Always

name: order-service-app

ports:

- containerPort: 8012

name: http-server

protocol: TCP

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 19

Page 20: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

3 Verify the cross-cluster communication between the services in Tanzu Service Mesh.

a On the navigation panel on the left, click Inventory and then Global Namespaces.

b On the Global Namespaces page, click the name of the global namespace that you created (sample-gns in the example).

c Click the GNS Topology tab.

The service topology graph shows the connections between the services in the different clusters. The line between the services indicates that traffic flows between them. The number of requests per seconds (RPS) or other specified service metrics are shown.

What to do next

For information about how to specify metrics to show in the service topology graph and other details about using the topology graph, see View the Summary Infrastructure and Service Information.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 20

Page 21: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

Manage Services with a Service Group 6You can create a service group to manage a group of services collectively. You can observe aggregated metrics for the services in the group or consistently enforce policies across the service group.

A service group is a type of resource groups. A service group is a collection of services that share certain characteristics. A service group defines one or more conditions that a service must satisfy to be included in that group. For example, a service group can define a condition for the service name to begin with shopping.

Service groups serve two main purposes:

n You can create a service group to monitor relevant metrics (such as requests per seconds, latency, and error rate) for the services in the group collectively.

n You can also define and apply consistent policies to the entire service group.

You can use a sample service group to create a service group in Tanzu Service Mesh. The service group is used to collectively manage all cart services deployed in clusters located in California. The sample service group defines conditions for the service name to begin with cart , for the cluster name to be prod-cluster-ca, and for the services to be in the default or sample namespace in the cluster.

You can access and observe metrics for the services in a service group.

Prerequisites

n Verify that you have onboarded the clusters where your services are deployed. For more information about onboarding a cluster, see Chapter 4 Onboard a Cluster to Tanzu Service Mesh.

n Chapter 3 Access the Tanzu Service Mesh Console.

Procedure

1 In Tanzu Service Mesh Console, in the navigation panel on the left, click Configuration and then click Resource Groups.

2 In the Resource Groups section, click the Service Groups tab.

The Service Groups tab displays a list of existing service groups.

VMware, Inc. 21

Page 22: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

3 If you want to view information about a service group, perform these steps.

a To view the membership conditions defined for a service group, click the arrow to the left of the service group name.

b To view a list of the services that are members of the group because they satisfy the conditions, click Preview Membership.

c To view details about the service group on the service group details page, click its name on the list.

4 In the upper-right corner, click New Service Group and provide the required information.

Property Description

Group Name Enter a descriptive name for the group to help distinguish it from other service groups.

Description Optionally, provide a description for the group.

Color Assign a color code to the group.

This setting is reserved for future use.

5 Define conditions for membership in the group.

a Under Membership Conditions, click Add Condition and select a service attribute or metric for which you want to define a condition (for example, Service Name or Namespace).

b In the new condition row, select an operator (for example, Is Exactly or Starts with) in the second drop-down menu and select or enter a value in the third drop-down menu.

c To define additional conditions, repeat steps a–b.

If you have multiple conditions, by default the conditions are joined with the AND operator. A service is matched if all the conditions are true.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 22

Page 23: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

d To join the conditions with the OR operator to specify that any of the conditions can be true for a match, click the AND button on the left.

The label on the button changes to OR to indicate that the conditions are joined with the OR operator.

e To combine two or more conditions in a complex condition, point to one of the condition

rows that you want to combine and click at the right end of the row and click Add Condition to add another condition to combine.

For the example, the following conditions for membership are defined in the service group. The conditions include a complex condition for the default and sample-namespace namespaces where the conditions are joined with OR.

According to these conditions, a service is included in the service group if it meets these requirements:

n If the name of a service starts with cart.

n The service is located in the prod-cluster-ca cluster.

n The service is contained in the default namespace or the sample-namespace namespace.

6 To view the names of the services that satisfy the membership conditions, click Membership Preview.

7 Click Save.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 23

Page 24: Getting Started with VMware Tanzu Service Mesh - …...Getting Started with VMware Tanzu Service Mesh VMware, Inc. 22 d To join the conditions with the OR operator to specify that

8 View the metrics for the services in a service group.

a On the Service Groups tab, click the name of the service group.

At the top of the service group details page, next to the service group name, a summary of aggregated key metrics, such as requests per second, 99th percentile latency, and percentage of errors, is displayed for the group.

b Click the Performance tab.

The charts on the Performance tab show metrics, such as requests per seconds, 99th percentile latency and error percentage, aggregated for the services in the group.

The metrics are shown for the time period selected in the Data drop-down menu in the upper-right corner.

c To specify which metrics to display, click Chart Settings and select the check box next to each metric to display.

Getting Started with VMware Tanzu Service Mesh

VMware, Inc. 24