教程:清理独立群集Tutorial: Clean up your standalone cluster

Service Fabric 独立群集为你提供选择自己的环境的选项,并创建群集作为 Service Fabric 所采用的“任何 OS、任何云”方法的一部分。Service Fabric standalone clusters offer you the option to choose your own environment and create a cluster as part of the "any OS, any cloud" approach that Service Fabric is taking. 在本系列教程中,将创建一个托管在 AWS 或 Azure 上的独立群集,并将应用程序安装到其中。In this tutorial series, you create a standalone cluster hosted on AWS or Azure and install an application into it.

本教程是一个系列中的第四部分,This tutorial is part four of a series. 本部分教程介绍如何清理创建的用于托管 Service Fabric 群集的 AWS 或 Azure 资源。This part of the tutorial shows you how to clean up the AWS or Azure resources that you created to host your Service Fabric cluster.

该系列的第 4 部分中介绍了如何:In part four of the series, you learn how to:

  • 清理 Service Fabric 群集Clean up Service Fabric cluster
  • 清理 AWS 或 Azure 资源Clean up your AWS or Azure resources

清理 Service Fabric 群集Clean up Service Fabric cluster

  1. 通过 RDP 连接到用于安装 Service Fabric 的 VM。RDP into the VM that you used to installed Service Fabric.

  2. 打开 PowerShell。Open PowerShell.

  3. 将目录更改为第二个教程中提取的文件夹。Change the directory to the extracted folder from the second tutorial.

  4. 运行以下命令删除 Service Fabric 群集:Run the following command to remove the Service Fabric cluster:

    .\RemoveServiceFabricCluster.ps1 -ClusterConfigFilePath .\ClusterConfig.Unsecure.MultiMachine.json
    
  5. 出现提示时输入 Y,如果成功,输出将如下所示,并在其中替换为你自己的 IP 地址:Enter Y when prompted, if it was successful your output will look like the following, with your own IP addresses substituted in:

    Best Practices Analyzer completed successfully.
    Removing configuration from machine 172.31.21.141
    Removing configuration from machine 172.31.27.1
    Removing configuration from machine 172.31.20.163
    Configuration removed from machine 172.31.21.141
    Configuration removed from machine 172.31.27.1
    Configuration removed from machine 172.31.20.163
    The cluster is successfully removed.
    

清理 AWS 资源Clean up AWS resources

  1. 登录到 AWS 帐户。Sign in to your AWS Account.
  2. 转到 EC2 控制台。Go to the EC2 Console.
  3. 选择在本教程的第一部分中创建的三个节点。Select the three nodes that you created in part one of the tutorial.
  4. 单击“操作” > “实例状态” > “终止” 。Click on Actions > Instance State > Terminate.

清理 Azure 资源Clean up Azure resources

  1. 登录到 Azure 门户。Sign in to the Azure portal.
  2. 转到“虚拟机” 部分。Go to the Virtual Machines section.
  3. 选中在本教程的第一部分中创建的三个节点所对应的复选框。Select check boxes for the three nodes that you created in part one of the tutorial.
  4. 单击“删除” 。Click on Delete.

后续步骤Next steps

本系列教程的第 4 部分介绍了如何清理在前面步骤中创建的资源。In part four of the series, you learned how to clean up your resources that were created in previous steps.

  • 清理资源Clean up your resources