简体   繁体   English

如何将工作角色部署到azure中?

[英]How can I deploy a worker role into azure?

I have an mvc4 web application working in azure. 我有一个在azure中工作的mvc4 Web应用程序。 I have now created a worker role which works as an email (reminders) sender. 我现在创建了一个工作角色,作为电子邮件(提醒)发件人。

How should I deploy this worker role into azure? 我该如何将这个角色部署到azure? Creating a cloud service through management portal doesn't seem right.. I don't see how will this worker role be connected to my web site? 通过管理门户创建云服务似乎不对..我不知道这个工作角色将如何连接到我的网站?

I use a Git for managing deployments. 我使用Git来管理部署。 Can I just commit and push my worker role? 我可以承诺并推动我的员工角色吗? This doesn't seem enough.. 这似乎不够......

Once deployed, how will I be able to stop this service? 部署后,我将如何停止此服务?

I would really much appreciate if someone could point me in the right direction. 如果有人能指出我正确的方向,我真的很感激。

An Azure Cloud Service is fine, and you could use a technology like Azure Storage Queues as a communication mechanism between the MVC 4 web app and the worker role. Azure云服务很好,您可以使用Azure存储队列等技术作为MVC 4 Web应用程序和辅助角色之间的通信机制。

Alternatively, you could host an ASP.NET Web API endpoint in your worker role and expose that. 或者,您可以在工作者角色中托管ASP.NET Web API端点并公开它。 See this blog post . 看到这篇博文

Starting and stopping the service can be done via the Azure portal. 可以通过Azure门户启动和停止服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM