Dela via


Ta bort ett program från ett Service Fabric-kluster med hjälp av Service Fabric CLI

Det här exempelskriptet tar bort en instans som kör en Service Fabric-instans och avregistrerar en programtyp och version från klustret. Om du tar bort en programinstans raderas även de tjänstinstanser som körs som associeras med det programmet. Därefter tas programmets filer bort från avbildningsarkivet.

Installera också Service Fabric CLI.

Exempelskript

#!/bin/bash

# Select cluster
sfctl cluster select \
    --endpoint http://svcfab1.westus2.cloudapp.azure.com:19080

# Delete the application
sfctl application delete \
    --application-id svcfab_app \
    --timeout 500

# Unprovision the application type
sfctl application unprovision \
    --application-type-name svcfab_appType \
    --application-type-version 1.0.0 \
    --timeout 500

# Delete the application files from the image store
sfctl store delete \
    --content-path myappfolder

Nästa steg

Mer information finns i Service Fabric CLI-dokumentationen.

Fler Service Fabric CLI-exempel för Azure Service Fabric finns i Service Fabric CLI-exempel.