您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

使用 Service Fabric Explorer 可视化群集Visualize your cluster with Service Fabric Explorer

Service Fabric Explorer (SFX) 是一种用于检验和管理 Azure Service Fabric 群集的开源工具。Service Fabric Explorer (SFX) is an open-source tool for inspecting and managing Azure Service Fabric clusters. Service Fabric Explorer 是适用于 Windows、macOS 和 Linux 的桌面应用程序。Service Fabric Explorer is a desktop application for Windows, macOS and Linux.

Service Fabric Explorer 下载Service Fabric Explorer download

使用以下链接将 Service Fabric Explorer 下载为桌面应用程序:Use the following links to download Service Fabric Explorer as a desktop application:

备注

桌面版的 Service Fabric Explorer 可能比群集支持包含更多或更少的功能。The desktop version of Service Fabric Explorer can have more or fewer features than the cluster support. 可回退到部署到群集的 Service Fabric Explorer 版本,以确保完全的功能兼容性。You can fall back to the Service Fabric Explorer version deployed to the cluster to ensure full feature compatibility.

从群集运行 Service Fabric ExplorerRunning Service Fabric Explorer from the cluster

Service Fabric Explorer 同时在 Service Fabric 群集的 HTTP 管理终结点中进行托管。Service Fabric Explorer is also hosted in a Service Fabric cluster's HTTP management endpoint. 若要在 web 浏览器中启动 SFX,浏览到群集的 HTTP 管理终结点从任何浏览器-例如 https://clusterFQDN:19080。To launch SFX in a web browser, browse to the cluster's HTTP management endpoint from any browser - for example https://clusterFQDN:19080.

对于开发人员工作站设置,可以通过导航到 https://localhost:19080/Explorer 在本地群集上启动 Service Fabric Explorer。For developer workstation setup, you can launch Service Fabric Explorer on your local cluster by navigating to https://localhost:19080/Explorer. 阅读本文,了解如何准备开发环境Look at this article to prepare your development environment.

备注

如果群集受自签名证书保护,你将从 Web 浏览器收到错误消息“此站点不安全”。If your cluster is secured by a self-signed certificate you will receive an error message from the web browser "This site is not secure". 你只需重写该警告即可在大多数新型 Web 浏览器中继续浏览。You can simply proceed through most modern web browsers by overriding the warning. 在生产环境中,应使用公用名称和证书颁发机构颁发的证书来保护群集。In a production environment your cluster should be secured using common name and a certificate authority issued certificate.

连接到 Service Fabric 群集Connect to a Service Fabric cluster

若要连接到 Service Fabric 群集,需要群集管理终结点 (FQDN/IP) 和 HTTP 管理终结点端口(默认情况下为 19080)。To connect to a Service Fabric cluster, you need the clusters management endpoint (FQDN/IP) and the HTTP management endpoint port (19080 by default). 例如 https:/ / mysfcluster.westus.cloudapp.azure.com:19080。For example https://mysfcluster.westus.cloudapp.azure.com:19080. 使用“连接到 localhost”复选框,连接到工作站上的本地群集。Use the "Connect to localhost" checkbox to connect to a local cluster on your workstation.

连接到安全群集Connect to a secure cluster

可以使用证书或 Azure Active Directory (AAD) 控制客户端对 Service Fabric 群集的访问。You can control client access to your Service Fabric cluster either with certificates or using Azure Active Directory (AAD).

如果你尝试连接到安全群集,然后根据群集的配置您将需要提供客户端证书或使用 AAD 登录。If you attempt to connect to a secure cluster, then depending on the cluster's configuration you will be required to present a client certificate or sign in using AAD.

了解 SService Fabric Explorer 的布局Understand the Service Fabric Explorer layout

可以使用左侧的树来导航 Service Fabric Explorer。You can navigate through Service Fabric Explorer by using the tree on the left. 在树根中,群集仪表板提供了群集的概述,包括应用程序和节点运行状况的摘要。At the root of the tree, the cluster dashboard provides an overview of your cluster, including a summary of application and node health.

Service Fabric Explorer 群集仪表板

查看群集的布局View the cluster's layout

Service Fabric 群集中的节点横跨容错域和升级域的二维网格放置。Nodes in a Service Fabric cluster are placed across a two-dimensional grid of fault domains and upgrade domains. 这种放置可确保应用程序在发生硬件故障及应用程序升级时仍然可用。This placement ensures that your applications remain available in the presence of hardware failures and application upgrades. 可以使用群集图查看当前群集的布局方式。You can view how the current cluster is laid out by using the cluster map.

Service Fabric Explorer 群集图

查看应用程序和服务View applications and services

群集包含两个子树:一个用于应用程序,另一个用于节点。The cluster contains two subtrees: one for applications and another for nodes.

可以使用应用程序视图来导航 Service Fabric 的逻辑层次结构:应用程序、服务、分区和副本。You can use the application view to navigate through Service Fabric's logical hierarchy: applications, services, partitions, and replicas.

在以下示例中,应用程序 MyApp 由两个服务 MyStatefulServiceWebService 组成。In the example below, the application MyApp consists of two services, MyStatefulService and WebService. 由于 MyStatefulService 是有状态的,因此它包含一个分区,其中有一个主副本和两个辅助副本。Since MyStatefulService is stateful, it includes a partition with one primary and two secondary replicas. 相反,WebSvcService 是无状态的,只包含单个实例。By contrast, WebSvcService is stateless and contains a single instance.

Service Fabric Explorer 应用程序视图

在树的每个级别,主窗格显示有关项目的信息。At each level of the tree, the main pane shows pertinent information about the item. 例如,可以看到特定服务的运行状况和版本。For example, you can see the health status and version for a particular service.

Service Fabric Explorer 基本信息窗格

查看群集的节点View the cluster's nodes

节点视图显示群集的物理布局。The node view shows the physical layout of the cluster. 对于给定的节点,可以检查已在该节点上部署代码的应用程序。For a given node, you can inspect which applications have code deployed on that node. 更具体地说,可以看到当前在那里运行的副本。More specifically, you can see which replicas are currently running there.

操作Actions

Service Fabric Explorer 提供用于对群集中的节点、应用程序和服务快速调用操作的方式。Service Fabric Explorer offers a quick way to invoke actions on nodes, applications, and services within your cluster.

例如,要删除某应用程序实例,只需从左侧树中选择该应用程序,并选择“操作” > “删除应用程序” 。For example, to delete an application instance, choose the application from the tree on the left, and then choose Actions > Delete Application.

Service Fabric Explorer 中删除应用程序

提示

可以通过单击每个元素旁边的省略号来执行相同的操作。You can perform the same actions by clicking the ellipsis next to each element.

可以通过 Service Fabric Explorer 执行的每个操作也可以通过 PowerShell 或 REST API 执行,以实现自动化。Every action that can be performed through Service Fabric Explorer can also be performed through PowerShell or a REST API, to enable automation.

还可使用 Service Fabric Explorer 为给定应用程序类型和版本创建应用程序实例。You can also use Service Fabric Explorer to create application instances for a given application type and version. 在树视图中选择应用程序类型,在右窗格中单击想要的版本旁边的“创建应用实例”链接。Choose the application type in the tree view, then click the Create app instance link next to the version you'd like in the right pane.

在 Service Fabric Explorer 中创建应用程序实例

备注

Service Fabric Explorer 创建应用程序实例时不支持参数。Service Fabric Explorer does not support parameters when creating application instances. 应用程序实例使用默认参数值。Application instances use default parameter values.

事件存储Event Store

EventStore 是该平台提供的一项功能,它通过 REST API 提供可在 Service Fabric Explorer 中使用的 Service Fabric 平台事件。EventStore is a feature offered by the platform that provides Service Fabric platform events available in the Service Fabric Explorer and through REST API. 可以查看群集中每个实体的动态快照视图,例如节点、服务、应用程序和基于事件时间的查询。You can see a snapshot view of what's going on in your cluster for each entity e.g. node, service, application and query based on the time of the event. 还可以从 EventStore 概述了解有关 EventStore 的详细信息。You can also Read more about the EventStore at the EventStore Overview.

EventStore

备注

从 Service Fabric 版本 6.4 开始。As of Service Fabric version 6.4. EventStore 在默认情况下不启用,必须在资源管理器模板中启用EventStore is not enabled by default and must be enabled in the resource manager template

备注

从 Service Fabric 版本 6.4 开始。As of Service Fabric version 6.4. EventStore API 仅可用于在 Azure 上运行的 Windows 群集。the EventStore APIs are only available for Windows clusters running on Azure only. 我们正在将此功能移植到 Linux 以及我们的独立群集。We are working on porting this functionality to Linux as well as our Standalone clusters.

映像存储查看器Image Store Viewer

映像存储查看器是一项功能提供,如果使用本机映像存储区,允许查看当前映像的内容存储和获取文件和文件夹的信息,以及删除文件/文件夹。Image store viewer is a feature offered if using Native Image Store that allows for viewing the current contents of the Image store and get file and folder information, along with removing files/folders.

Service Fabric Explorer 群集图

后续步骤Next steps