【问题标题】:Service Fabric cluster creation error using powershell使用 PowerShell 的 Service Fabric 群集创建错误
【发布时间】:2019-10-22 08:33:10
【问题描述】:

我正在准备在 azure 上创建一个服务结构集群,但是当我执行时 下一个脚本:

   #Provide the subscription Id
   $subscriptionId = 'yourSubscriptionId'

   # Certificate variables.
   $certpwd="Password#1234" | ConvertTo-SecureString -AsPlainText -Force
   $certfolder="c:\mycertificates\"

   # Variables for VM admin.
   $adminuser="vmadmin"
   $adminpwd="Password#1234" | ConvertTo-SecureString -AsPlainText -Force 

   # Variables for common values
   $clusterloc="SouthCentralUS"
   $clustername = "mysfcluster"
   $groupname="mysfclustergroup"       
   $vmsku = "Standard_D2_v2"
   $vaultname = "mykeyvault"
   $subname="$clustername.$clusterloc.cloudapp.azure.com"

   # Set the number of cluster nodes. Possible values: 1, 3-99
   $clustersize=5 

   # Set the context to the subscription Id where the cluster will be created
   Select-AzSubscription -SubscriptionId $subscriptionId

   # Create the Service Fabric cluster.
   New-AzServiceFabricCluster -Name $clustername -ResourceGroupName $groupname -  Location $clusterloc `
-  ClusterSize $clustersize -VmUserName $adminuser -VmPassword $adminpwd 
-  CertificateSubjectName $subname `
-  CertificatePassword $certpwd -CertificateOutputFolder $certfolder `
-  OS WindowsServer2016DatacenterwithContainers -VmSku $vmsku -KeyVaultName                                       
   $vaultname

powershell 控制台显示此错误:

广告:未设置访问策略。没有用户或应用程序有权使用此保管库。请使用 Set -AzKeyVaultAccessPolicy 设置访问策略。

我正在关注本指南:https://docs.microsoft.com/es-es/azure/service-fabric/service-fabric-quickstart-containers#feedback

# Create the Service Fabric cluster.
   New-AzServiceFabricCluster -Name $clustername -ResourceGroupName $groupname -  Location $clusterloc `
-  ClusterSize $clustersize -VmUserName $adminuser -VmPassword $adminpwd 
-  CertificateSubjectName $subname `
-  CertificatePassword $certpwd -CertificateOutputFolder $certfolder `
-  OS WindowsServer2016DatacenterwithContainers -VmSku $vmsku -KeyVaultName                                       
   $vaultname

广告:未设置访问策略。没有用户或应用程序有权使用此保管库。请使用 Set -AzKeyVaultAccessPolicy 设置访问策略。

【问题讨论】:

    标签: azure-service-fabric


    【解决方案1】:

    我相信您遇到了现有的issue。 解决方法是手动定义 Key Vault 访问策略,以允许资源管理器在模板部署期间访问 Key Vault。

    【讨论】:

    • 你能帮我吗?
    • 试试这个:Set-AzKeyVaultAccessPolicy -VaultName $vaultName -EnabledForDeployment
    • 非常感谢!它有效。
    • 总是乐于提供帮助
    猜你喜欢
    • 1970-01-01
    • 2017-07-31
    • 1970-01-01
    • 1970-01-01
    • 2018-11-17
    • 2017-01-14
    • 2017-02-02
    • 2018-10-08
    • 2023-03-02
    相关资源
    最近更新 更多