Azure Lei Zhang的博客

weibo: LeiZhang的微博/QQ: 185165016/QQ群:319036205/邮箱:leizhang1984@outlook.com/TeL:139-161-22926

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Windows Azure Platform 系列文章目录

 

微软给开发人员三种方式将应用程序部署到Windows Azure平台上:

1)通过Windows Azure管理界面上传应用。具体的请参考

Windows Azure Platform (十)把本地的Azure Project部署到云端服务器上

2)通过PowerlShell部署Windows Azure应用程序,具体的的请参考微软MSDN文章:

Using PowerShell to Manage Windows Azure Applications

3)通过Visual Studio部署应用程序到Windows Azure平台。在这里我会向大家做详细的介绍。

 

1.创建Windows Azure项目

首先请大家新建一个Windows Azure项目,名称叫做VS2010PublishToAzure,然后添加一个Web Role。

选择项目-->右键-->Publish

 

2.用Visual Studio 2010创建证书

随后会弹出的Publish Windows Azure Application窗口,在"Choose your subscription"里选择Manage

 

在弹出的Windows Azure Project Management Settings对话框里,点击"new"

 

在Windows Azure Project Management Authentication对话框里,选择Create

 

在Create Certificate对话框里,输入名字叫MyAzure,然后选择OK

 

回到Windows Azure Project Management Authentication对话框,确保之前我们创建的Certificate(证书)已经被选中。

 

然后选择Copy the full path。这个功能是把创建的cer文件路径复制到您电脑的剪贴板上。

 

然后会弹出一个窗口,我们直接点击OK就可以了。

 

接下来我们我们选择Windows Azure Project Management Authentication里的Windows Azure Portal,系统会打开浏览器并且打开Windows Azure管理界面,然后我们输入用户名和密码登陆系统。

选择"托管服务、存储账户和CDN"-->管理证书-->添加证书

 

在弹出"添加新的管理证书"窗口里,选择"证书文件"右侧的浏览按钮,然后复制我们在剪贴板上的cer文件路径,并选择"确定"按钮。

 

这样就可以把本地的cer(证书文件)上传到了服务器上

 

请注意上图红色区域里的订阅ID,我们复制"订阅ID"的值到剪切板上。

然后返回到Visual Studio里,把"订阅ID"的值复制到第三个"Copy the subscription ID for your account..."里,并且给credentials起个名字,我们还是命名为"MyAzure"

 

 在Windows Azure Project Management Settings对话框里,你可以看到之前你状态的MyAzure证书,然后我们点击"Close" 按钮。

 

3.发布Azure服务

在Publish Windows Azure Application对话框里,选择我们之前的订阅(subscription),然后点击"Next"按钮。

 

在Common Settings页里

1)Hosted Service表示您要发布的托管服务

2)Environment表示您想使用开发环境(staing environment)和生产环境(production environment)

3)Build Configuration表示您想使用本地编译的Debug版本还是Release版本

4)Service Configuration表示您想使用本地的Cloud配置文件还是Local配置文件

 

我们选择"Enable Remote Desktop for all roles"来配置Azure 计算节点的远程桌面连接。

在弹出的"Remote Desktop Configuration"里,我们可以配置

1)User name是配置远程桌面连接需要的用户名

2)Password是配置远程桌面连接需要的密码

3)Confirm passsword是重新输入远程桌面连接需要的密码

4)Account exporation data是远程桌面连接的过期时间。

 

配置完成后我们选择"OK"

如果我们的Azure Project使用了Windows Azure Storage,我们也可以在Settings-->Advanced Settings里选择我们需要的Account,如下图红色区域

 

然后我们选择"Next"

在最后的"Summary"里我们选择"Publish"发布。

Visual Studio 2010就会建立连接并发本地的Azure项目发布到Windows Azure云平台上。

 

我们只要等待发布成功就可以啦!

  

posted on 2012-01-22 12:53  Lei Zhang的博客  阅读(2226)  评论(2编辑  收藏  举报