Azure自动缩放在本地工作,但未部署时 [英] Azure Autoscaling works locally but not when deployed

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

问题描述

问题

我正在尝试部署一个将自动调整几个目标网站的worker角色。我可以在本地运行自动分页器,它可以工作(我的机器上安装了证书)。但是,一旦将其部署到Azure作为云应用程序,它将不会自动调整。 (但是,工作角色正在运行,因为我可以看到我的非自动缩放进程在同一个工作角色中工作。)

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.)

我尝试过的

我已经按照部署自动缩放应用程序块说明。

  • 将CN = Windows Azure工具证书添加到目标订阅的管理证书。
  • 将CN = Windows Azure Tools证书添加到自动缩放应用程序的证书中。
  • 指定我的证书在工作角色的位置

  • 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

    我缺少什么?

    谢谢

    推荐答案

    Tuzo是对的 - 证书应该在LocalMachine ,但这还不够。请参阅此SO帖子。基本上,在OS Family 2中,WaWorkerHost正在由Role初始化过程生成的临时帐户(具有GUID名称)下运行,该帐户具有访问证书私钥的权限;在OS Family 3中,WaWorkerHost在NETWORK SERVICE帐户下运行,该帐户没有私钥访问权限。

    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.

    现在最好的选择(MS Azure团队寻址下一个SDK中的问题)是以提升的权限运行角色 - 编辑ServiceDefinition.csdef:

    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天全站免登陆