扩展Windows Azure的角色编程 [英] Scale Windows Azure roles programmatically

查看:123
本文介绍了扩展Windows Azure的角色编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要寻找一些code,将扩展一个角色给我要缩放的角色ID实例一定量。我找人来实现此方法。

I am looking for some code that will scale a role to a given amount of instances given the roleID I want to scale. I am looking for someone to implement this method.

Private Shared Sub DoScaleOperation(RoleID As String, InstanceCount As Integer)
    'TODO:
    'Check if the current number of instances in the role RoleID matches InstanctCount
    'and if the numbers don't match then scale down or scale up as appropriate.
End Sub

此方法应该适用于这两个开发环境和云环境。有谁知道如何做到这一点?

This method should work for both the dev environment and the cloud environment. Does anyone know how to do this?

还出curiorsity我的疑惑角色实例的名称将是一个规模达什么,什么将是一个规模下降过程中删除了实例的名称。我希望该实例的名称会像RoleID_(0至InstanceCount - 1)。

Also out curiorsity I an wondering what the names of the Role Instances will be on a scale up and what will be the names of the instances removed during a scale down. I am hoping the names of the instances will be something like RoleID_(0 to InstanceCount - 1).

推荐答案

有是要以编程方式更改实例数在Azure中调用的API:的 http://msdn.microsoft.com/en-us/library/windowsazure/ee460809.aspx 这API不起作用在当地的开发环境。您需要提供您的呼叫管理证书。
您还可以使用Azure的cmdlet来改变实例计数。

There is an API that you want to call in order to programmatically change instance count in Azure: http://msdn.microsoft.com/en-us/library/windowsazure/ee460809.aspx This API does not work in local dev environment. You will need to provide a management certificate with your call. You can also use Azure cmdlets to change instance counts.

这篇关于扩展Windows Azure的角色编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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