Azure自动缩放在本地工作,但未部署时 [英] Azure Autoscaling works locally but not when deployed
问题描述
问题
我正在尝试部署一个将自动调整几个目标网站的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.)
我尝试过的
我已经按照部署自动缩放应用程序块说明。
我缺少什么?
谢谢
推荐答案
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屋!