Windows Azure Cloud Service (44) 将Cloud Service加入Virtual Network Subnet,并固定Virtual IP Address(VIP)
《Windows Azure Platform 系列文章目录》
在之前的文章中,笔者已经详细介绍了如何将Virtual Machine加入Virtual Network,并且绑定固定的Private IP和Virtual IP Address (公网IP地址)
Windows Azure Virtual Network (5) 设置Azure Virtual Machine固定Private IP
Windows Azure Virtual Network (6) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (1)
Windows Azure Virtual Network (7) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (2)
但是以上的功能仅限于IaaS,如果我们需要在PaaS Cloud Service设置Private IP和Virtual IP Address,应该如何设置?
再想象一个场景,当我们前端使用PaaS Cloud Service (Web Server)实现横向扩展,后端使用2台SQL Server Virtual Machine (Always-On)做数据库服务器。
这种混合PaaS+IaaS的场景,如何让PaaS Cloud Service加入Virtual Network,使用内部IP地址与SQL Server VM进行通信呢?
本章内容分为以下三个部分:
一.管理Virtual IP Address(公网IP地址)
二.管理Virtual Network
三.配置Azure Cloud Service
一.管理Virtual IP Address(公网IP地址)
我们可以通过Azure PowerShell来申请Virtual IP Address,具体读者可以参考之前的Blog:
国外使用Azure Global的用户,可以参考:
Windows Azure Virtual Network (6) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (1)
Windows Azure Virtual Network (7) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (2)
国内使用世纪互联运维的Azure China用户,可以参考:
Azure China (8) 使用Azure PowerShell创建虚拟机,并设置固定Virtual IP Address和Private IP
如果读者用的是百度查询IP地址,经常会发现Azure上海的IP地址经常会显示来自北京,这是由于百度的IP库比较老,请读者注意
这里笔者不想申请新的Reserved IP Address,我们使用命令:
Get-AzureReservedIP
可以查看到之前已经申请的Reserved IP Address,如下图:

我们就继续使用上面的LeiTestVMReservedIP,这个地址是191.234.18.61
上图中,InUse状态为False,没有被占用
二.管理Azure Virtual Network
我们创建一个新的Azure Virtual Network,命名为PaaSVNet
增加2个subnet,命名为Web-Subnet和DB-Subnet,如下图:

Web-Subnet IP Rang为10.0.0.0-10.0.0.127
DB-Subnet IP Rang为10.0.0.128-10.0.0.255
三.配置Azure Cloud Service
我们新建一个Cloud Service,项目命名为LeiPaaSReservedIP,只添加WebRole即可,截图略。
1.将Instance Count数量修改为2
2.修改ServiceConfiguration.Cloud.cscfg文件配置,增加以下内容:

上图中的设置中:
(1)Instance Count为2,需要2个Instance
(2)VirtualNetworksSite节点,设置为虚拟机网络名称,PaaSVNet
(3)InstanceAddress节点设置为WebRole1
(4)Subnet设置为步骤二中的子网名称,为Web-Subnet
(5)ReservedIP设置为我们在步骤一中的Reserved IP Name (LeiTestVMReservedIP)
然后我们将我们的Cloud Service部署到Azure平台上,观察Reserved IP Address,已经使用在步骤一的Public IP:191.234.18.61)

然后我们观察虚拟网络PaaSVNet中的Private IP使用情况

Web Role已经加入了Web-Subnet子网
因为将Instance Count设置为2,这2个PaaS Instance占用了10.0.0.4和10.0.0.5这2个IP地址
参考资料: https://msdn.microsoft.com/library/azure/jj156091.aspx
Windows Azure Cloud Service (44) 将Cloud Service加入Virtual Network Subnet,并固定Virtual IP Address(VIP)的更多相关文章
- Windows Azure Virtual Network (6) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (1)
<Windows Azure Platform 系列文章目录> 注意:本文介绍的是Global Azure (http://www.windowsazure.com),如果你使用的是由世纪 ...
- Windows Azure Virtual Network (7) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (2)
<Windows Azure Platform 系列文章目录> 本文介绍的是,当用户在创建Azure Virtual Machine的时候,忘记绑定公网IP,需要重新绑定公网IP的具体操作 ...
- [Windows Azure] Create and use a reporting service in Windows Azure SQL Reporting
Create and use a reporting service in Windows Azure SQL Reporting In this tutorial you will learn ab ...
- [Windows Azure] What is a cloud service?
What is a cloud service? When you create an application and run it in Windows Azure, the code and co ...
- 比较Windows Azure 网站(Web Sites), 云服务(Cloud Services)and 虚机(Virtual Machines)
Windows Azure提供了几个部署web应用程序的方法,比如Windows Azure网站.云服务和虚拟机.你可能无法确定哪一个最适合您的需要,或者你可能清楚的概念,比如IaaS vs PaaS ...
- [Windows Azure] How to use the Queue Storage Service
How to use the Queue Storage Service version 1.7 version 2.0 This guide will show you how to perform ...
- [Windows Azure] Building the web role for the Windows Azure Email Service application - 3 of 5
Building the web role for the Windows Azure Email Service application - 3 of 5. This is the third tu ...
- [Windows Azure] Configuring and Deploying the Windows Azure Email Service application - 2 of 5
Configuring and Deploying the Windows Azure Email Service application - 2 of 5 This is the second tu ...
- [Windows Azure] Windows Azure Web Sites, Cloud Services, and VMs: When to use which?
This document provides guidance on how to make an informed decision in choosing between Windows Azur ...
随机推荐
- jsoup使用样式class抓取数据时空格的处理
最近在研究用android和jsoup抓取小说数据,jsoup的使用可以参照http://www.open-open.com/jsoup/;在抓纵横中文网永生这本书的目录内容时碰到了问题, 永生的书简 ...
- myrocks之事务处理
前言 mysql目前支持的事务引擎有innodb,tokudb. rocksdb加入mysql阵营后,mysql支持的事务引擎增长至3个.myrocks目前支持的事务隔离级别有read-committ ...
- HTTP协议中POST、GET、HEAD、PUT等请求方法以及一些常见错误
(来源:http://www.tuicool.com/articles/Ermmmyn) HTTP请求方法: 常用方法: Get\Post\Head (1)Get方法. 取回请求URL标志的任何信息, ...
- Linux下添加新硬盘,分区及挂载(转)
挂载好新硬盘后输入fdisk -l命令看当前磁盘信息,卸载硬盘分区 umount /dev/sdb 可以看到除了当前的第一块硬盘外还有一块sdb的第二块硬盘,然后用fdisk /dev/sdb 进行分 ...
- WebDAV 配置及相关工具
最近在项目中安装和调试服务器,杯具的是,服务器是内网地址,而且不可以直接SSH.SFTP,只能通过中间一台linux作为跳板,然后在SSH命令行里去操作目标机器. 如果只是命令行操作也就无所谓了,但是 ...
- FB引擎系列-之CloudSand
CloudSand,欲打破之前的集中版本制作的模式, http://code.taobao.org/p/cloudsand包含服务器端代码(php)和客户端代码(unity) EasyDown的时 ...
- HTML5打造的炫酷本地音乐播放器-喵喵Player
将之前捣腾的音乐频谱效果加上一个播放列表就成了现在的喵喵播放器(Meow meow Player,额知道这名字很二很装萌~),全HTML5打造的网页程序,可本地运行也可以挂服务器上用. 在线Demo及 ...
- MR原理
三.MapReduce运行原理 1.Map过程简述: 1)读取数据文件内容,对每一行内容解析成<k1,v1>键值对,每个键值对调用一次map函数 2)编写映射函数处理逻辑,将输入的< ...
- WPF中关于自定义控件的滚动条鼠标停留在内容上鼠标滚轮滚动无效的问题
问题起因:在一个用户控件里放置了1个TreeView垂直顺序放置. 当用户控件中的内容超过面板大小时,滚动条会自动出现 ,但是只有当鼠标指示在右边滚动条的那一条位置时,才支持鼠标滚轴滚动. 点在控件内 ...
- EasyUI Field
效果: JS: var sortIndex = $("#ListDiv").find(".datagrid-view2").find(".datagr ...