如何升级现有服务结构vmss以使用受管磁盘

时间:2017-03-02 22:25:50

标签: azure-service-fabric azure-vm-scale-set

我一直在azure上的A1v2 VM上运行5node服务结构集群以进行开发/测试。

磁盘很小,导致警告:

Unhealthy event: SourceId='FabricDCA', Property='DataCollectionAgent.DiskSpaceAvailable', HealthState='Warning', ConsiderWarningAsError=false.
The Data Collection Agent (DCA) does not have enough disk space to operate. Diagnostics information will be left uncollected if this continues to happen.

因为它仅用于开发和测试,所以它不会打扰我。但是现在随着托管磁盘的发布,我想尝试在这个custer上运行更新,以确保我可以在生产中做同样的事情。

采用现有集群并升级它的步骤是什么,它使用托管磁盘+将此托管磁盘用于上面的数据收集代理?

{
  "type": "Microsoft.ServiceFabric/clusters",
  "location": "West Europe",
  "id": "/subscriptions/.../resourcegroups/earthml-core/providers/Microsoft.ServiceFabric/clusters/...",
  "name": "earthml",
  "tags": {
    "hidden-resourceType": "Service Fabric",
    "hidden-clusterName": "..."
  },
  "etag": "W/\"636184713874200033\"",
  "properties": {
    "provisioningState": "Succeeded",
    "clusterId": "...",
    "clusterCodeVersion": "5.4.164.9494",
    "clusterState": "Ready",
    "managementEndpoint": "https://....westeurope.cloudapp.azure.com:19080",
    "clusterEndpoint": "https://westeurope.servicefabric.azure.com/runtime/clusters/...",
    "certificate": {
      "thumbprint": "3B528F30CF0813FAA9232C1B12ACA9211E2AF2B7",
      "x509StoreName": "My"
    },
    "clientCertificateThumbprints": [],
    "clientCertificateCommonNames": [],
    "fabricSettings": [
      {
        "name": "Security",
        "parameters": [
          {
            "name": "ClusterProtectionLevel",
            "value": "EncryptAndSign"
          }
        ]
      }
    ],
    "upgradeDescription": {
      "overrideUserUpgradePolicy": false,
      "forceRestart": false,
      "upgradeReplicaSetCheckTimeout": "10675199.02:48:05.4775807",
      "healthCheckWaitDuration": "00:05:00",
      "healthCheckStableDuration": "00:05:00",
      "healthCheckRetryTimeout": "00:45:00",
      "upgradeTimeout": "12:00:00",
      "upgradeDomainTimeout": "02:00:00",
      "healthPolicy": {
        "maxPercentUnhealthyNodes": 100,
        "maxPercentUnhealthyApplications": 100
      },
      "deltaHealthPolicy": {
        "maxPercentDeltaUnhealthyNodes": 0,
        "maxPercentUpgradeDomainDeltaUnhealthyNodes": 0,
        "maxPercentDeltaUnhealthyApplications": 0
      }
    },
    "diagnosticsStorageAccountConfig": {
      "storageAccountName": "k3ci5rfk6j3i42",
      "protectedAccountKeyName": "StorageAccountKey1",
      "blobEndpoint": "https://k3ci5rfk6j3i42.blob.core.windows.net/",
      "queueEndpoint": "https://k3ci5rfk6j3i42.queue.core.windows.net/",
      "tableEndpoint": "https://k3ci5rfk6j3i42.table.core.windows.net/"
    },
    "nodeTypes": [
      {
        "name": "nt0core",
        "placementProperties": {},
        "clientConnectionEndpointPort": 19000,
        "httpGatewayEndpointPort": 19080,
        "applicationPorts": {
          "startPort": 20000,
          "endPort": 30000
        },
        "ephemeralPorts": {
          "startPort": 49152,
          "endPort": 65534
        },
        "isPrimary": true,
        "vmInstanceCount": 3,
        "durabilityLevel": "Bronze"
      }
    ],
    "vmImage": "Windows",
    "azureActiveDirectory": {
      "tenantId": "",
      "clusterApplication": "",
      "clientApplication": ""
    },
    "reliabilityLevel": "Bronze",
    "upgradeMode": "Automatic",
    "availableClusterVersions": [
      {
        "codeVersion": "5.4.164.9494",
        "supportExpiryUtc": "9999-12-31T23:59:59.9999999",
        "environment": "Windows"
      }
    ]
  }
}

这是VMSS

{
  "sku": {
    "name": "Standard_A1_v2",
    "tier": "Standard",
    "capacity": 5
  },
  "properties": {
    "singlePlacementGroup": true,
    "upgradePolicy": {
      "mode": "Automatic"
    },
    "virtualMachineProfile": {
      "osProfile": {
        "computerNamePrefix": "nt0core",
        "adminUsername": "pksorensen",
        "windowsConfiguration": {
          "provisionVMAgent": true,
          "enableAutomaticUpdates": true
        },
        "secrets": [
          {
            "sourceVault": {
              "id": "/subscriptions.../resourceGroups/.../providers/Microsoft.KeyVault/vaults/..."
            },
            "vaultCertificates": [
              {
                "certificateUrl": "https://....vault.azure.net:443/secrets/sfcert/111a8b797e7845f8a551e7264d7f8d9f",
                "certificateStore": "My"
              }
            ]
          }
        ]
      },
      "storageProfile": {
        "osDisk": {
          "vhdContainers": [
            "https://k3ci5rfk6j3i4100.blob.core.windows.net/vhds",
            "https://k3ci5rfk6j3i4101.blob.core.windows.net/vhds",
            "https://k3ci5rfk6j3i4102.blob.core.windows.net/vhds",
            "https://k3ci5rfk6j3i4103.blob.core.windows.net/vhds",
            "https://k3ci5rfk6j3i4104.blob.core.windows.net/vhds"
          ],
          "name": "vmssosdisk",
          "createOption": "FromImage",
          "caching": "ReadOnly"
        },
        "imageReference": {
          "publisher": "MicrosoftWindowsServer",
          "offer": "WindowsServer",
          "sku": "2012-R2-Datacenter",
          "version": "latest"
        }
      },
      "networkProfile": {
        "networkInterfaceConfigurations": [
          {
            "name": "NIC-earthml-0",
            "properties": {
              "primary": true,
              "ipConfigurations": [
                {
                  "name": "NIC-earthml-0",
                  "properties": {
                    "subnet": {
                      "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/virtualNetworks/VNet/subnets/Subnet-0"
                    },
                    "loadBalancerBackendAddressPools": [
                      {
                        "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/loadBalancers/LB-earthml-nt0core/backendAddressPools/LoadBalancerBEAddressPool"
                      }
                    ],
                    "loadBalancerInboundNatPools": [
                      {
                        "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Network/loadBalancers/LB-earthml-nt0core/inboundNatPools/LoadBalancerBEAddressNatPool"
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      },
      "extensionProfile": {
        "extensions": [
          {
            "properties": {
              "publisher": "Microsoft.Azure.ServiceFabric",
              "type": "ServiceFabricNode",
              "typeHandlerVersion": "1.0",
              "autoUpgradeMinorVersion": false,
              "settings": {
                "clusterEndpoint": "https://westeurope.servicefabric.azure.com/runtime/clusters/...",
                "nodeTypeRef": "nt0core",
                "dataPath": "D:\\\\SvcFab",
                "durabilityLevel": "Bronze",
                "certificate": {
                  "thumbprint": "3B528F30CF0813FAA9232C1B12ACA9211E2AF2B7",
                  "x509StoreName": "My"
                }
              }
            },
            "name": "nt0core_ServiceFabricNode"
          },
          {
            "properties": {
              "publisher": "Microsoft.Compute",
              "type": "CustomScriptExtension",
              "typeHandlerVersion": "1.4",
              "autoUpgradeMinorVersion": true,
              "settings": {
                "fileUris": [
                  "https://gist.githubusercontent.com/pksorensen/c4e26da96d2a43ab332df8ee0c28bca3/raw/bb48113a71f6a1a18f6c0847ff5e5510e04786ad/InstallNetFx462.ps1"
                ],
                "commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File InstallNetFx462.ps1"
              }
            },
            "name": "CustomScriptExtensionVmExt_vmNodeType0Name"
          },
          {
            "properties": {
              "publisher": "Microsoft.Azure.Diagnostics",
              "type": "IaaSDiagnostics",
              "typeHandlerVersion": "1.5",
              "autoUpgradeMinorVersion": true,
              "settings": {
                "WadCfg": {
                  "DiagnosticMonitorConfiguration": {
                    "overallQuotaInMB": "50000",
                    "PerformanceCounters": {
                      "PerformanceCounterConfiguration": [
                        {
                          "annotation": [],
                          "counterSpecifier": "\\Memory\\Available MBytes",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\Web Service(_Total)\\ISAPI Extension Requests/sec",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\Web Service(_Total)\\Bytes Total/Sec",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\ASP.NET Applications(__Total__)\\Requests/Sec",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\ASP.NET Applications(__Total__)\\Errors Total/Sec",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\ASP.NET\\Requests Queued",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\ASP.NET\\Requests Rejected",
                          "sampleRate": "PT3M"
                        },
                        {
                          "annotation": [],
                          "counterSpecifier": "\\Processor(_Total)\\% Processor Time",
                          "sampleRate": "PT3M"
                        }
                      ],
                      "scheduledTransferPeriod": "PT1M"
                    },
                    "EtwProviders": {
                      "EtwEventSourceProviderConfiguration": [
                        {
                          "provider": "Microsoft-ServiceFabric-Actors",
                          "scheduledTransferKeywordFilter": "1",
                          "scheduledTransferPeriod": "PT5M",
                          "DefaultEvents": {
                            "eventDestination": "ServiceFabricReliableActorEventTable"
                          }
                        },
                        {
                          "provider": "S-Innovations-Azure-MessageProcessor-ServiceFabric",
                          "scheduledTransferPeriod": "PT5M",
                          "DefaultEvents": {
                            "eventDestination": "SInnovationsServiceFabricMessageProcessor"
                          }
                        },
                        {
                          "provider": "Microsoft-ServiceFabric-Services",
                          "scheduledTransferPeriod": "PT5M",
                          "DefaultEvents": {
                            "eventDestination": "ServiceFabricReliableServiceEventTable"
                          }
                        }
                      ],
                      "EtwManifestProviderConfiguration": [
                        {
                          "provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8",
                          "scheduledTransferLogLevelFilter": "Information",
                          "scheduledTransferKeywordFilter": "4611686018427387904",
                          "scheduledTransferPeriod": "PT5M",
                          "DefaultEvents": {
                            "eventDestination": "ServiceFabricSystemEventTable"
                          }
                        }
                      ]
                    },
                    "WindowsEventLog": {
                      "DataSource": [
                        {
                          "name": "Application!*[System[(Level=1 or Level=2 or Level=3)]]"
                        },
                        {
                          "name": "Windows Azure!*[System[(Level=1 or Level=2 or Level=3 or Level=4)]]"
                        }
                      ],
                      "scheduledTransferPeriod": "PT1M"
                    },
                    "CrashDumps": {
                      "CrashDumpConfiguration": [
                        {
                          "processName": "WaIISHost.exe"
                        },
                        {
                          "processName": "WaWorkerHost.exe"
                        },
                        {
                          "processName": "w3wp.exe"
                        }
                      ]
                    },
                    "Logs": {
                      "scheduledTransferLogLevelFilter": "Information",
                      "scheduledTransferPeriod": "PT1M"
                    }
                  }
                },
                "StorageAccount": "k3ci5rfk6j3i43"
              }
            },
            "name": "VMDiagnosticsVmExt_vmNodeType0Name"
          }
        ]
      }
    },
    "provisioningState": "Succeeded",
    "overprovision": false,
    "uniqueId": "3dfec9a4-eb0b-476e-8642-152120466836"
  },
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "location": "westeurope",
  "tags": {
    "hidden-resourceType": "Service Fabric",
    "hidden-clusterName": "earthml"
  },
  "id": "/subscriptions/.../resourceGroups/.../providers/Microsoft.Compute/virtualMachineScaleSets/nt0core",
  "name": "nt0core"
}

1 个答案:

答案 0 :(得分:0)

目前无法将现有比例集切换为非托管磁盘。