Azure 自动缩放在本地有效,但在部署时无效 [英] Azure Autoscaling works locally but not when deployed

查看:28
本文介绍了Azure 自动缩放在本地有效,但在部署时无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我正在尝试部署一个辅助角色,该角色将自动缩放一些目标站点.我能够在本地运行自动缩放器并且它可以工作(我在我的机器上安装了证书).但是,一旦我将它作为云应用程序部署到 Azure,它就不会自动缩放.(但是,辅助角色正在运行,因为我可以看到我的非自动缩放进程在同一个辅助角色中工作.)

我尝试了什么

我遵循了.基本上,在 OS Family 2 中,WaWorkerHost 运行在一个由 Role 初始化过程生成的临时帐户(具有 GUID 名称)下,该帐户具有访问证书私钥的权限;在OS Family 3中,WaWorkerHost运行在NETWORK SERVICE"账号下,该账号没有私钥访问权限.

目前的最佳选择(MS Azure 团队在下一个 SDK 中解决问题)是使用提升的权限运行角色 - 编辑 ServiceDefinition.csdef:

Problem

I am trying to deploy a worker role which will autoscale a few target sites. I am able to run the autoscaler locally and it works (I installed the certificates on my machine). However, it won't autoscale once I deploy it to Azure as a cloud app. (However, the worker role is running because I can see my non-autoscaling processes working in the same worker role.)

What I tried

I have followed the Deploying the Autoscaling Application Block instructions.

  • Added the "CN=Windows Azure Tools" certificate to the management certificates of the target subscription.
  • Added the "CN=Windows Azure Tools" certificate to the autoscaling application's certificates.
  • Specified the location of my cert in the worker role

  • Specified the location of the cert in my service store for configuring autoscaling

    What am I missing?

    Thanks

    解决方案

    Tuzo is right - cert should be in LocalMachine, but that's not enough. See this SO post. Basically, in OS Family 2, WaWorkerHost is running under a temporary account (with a GUID name) generated by Role initialization process, this account has permission to access certificate private key; In OS Family 3, WaWorkerHost is running under "NETWORK SERVICE" account, this account doesn’t have private key access permission.

    Best option for now (MS Azure team addressing issue in next SDK) is to run the role with elevated privileges - edit ServiceDefinition.csdef:

    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="blah" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2012-10.1.8">
      <WorkerRole name="blah" vmsize="Small">
        <Runtime executionContext="elevated" />
        ...      
       </WorkerRole>
    </ServiceDefinition>
    

    这篇关于Azure 自动缩放在本地有效,但在部署时无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆