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

Service Fabric 独立群集提供选择自己的环境以托管 Service Fabric 的选项。Service Fabric standalone clusters offer you the option to choose your own environment to host Service Fabric. 在本系列教程中,创建一个托管在 AWS 或 Azure 上的独立群集,并将应用程序部署到其中。In this tutorial series, you'll create a standalone cluster hosted on AWS or Azure and deploy an application to it.

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

本文内容:In this article, you'll learn to:

  • 删除 Service Fabric 群集Remove a Service Fabric cluster
  • 删除 AWS 或 Azure 资源Delete your AWS or Azure resources

删除 Service Fabric 群集Remove a 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. 出现提示时输入 YEnter Y when prompted. 如果成功,输出将如下所示(使用你自己的 IP 地址):If it was successful, your output will look like the following (with your own IP addresses):

    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 资源Delete 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. 选择“操作” > “实例状态” > “终止” 。Select Actions > Instance State > Terminate.

删除 Azure 资源Delete 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. 选择“删除”。Select Delete.

后续步骤Next steps

在本教程中,你了解了如何删除前面步骤中创建的资源。In this tutorial, you learned how to delete the resources you created in previous steps.

  • 清理资源Clean up your resources