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 ...
随机推荐
- 使用UG UISTYLER 窗体编辑器,创建对话框 part 1
在UG 二次开发中,经常需要一些交互的输入,参数的更改啊,零件的选取什么的,UG 自身提供了创建这一类对话框的功能.当然也可以使用MFC或winForm 作为交互.但使用自带的比较快和简洁,风格也统一 ...
- java 动态代理示例,带主要注释
Java proxy是基于反射,仅仅支持基于接口的动态代理. java 动态代理是一切架构的基础,必须了解. 废话少说,先上代码获得感性认识. 示例代码有主要注释. 接口: public interf ...
- python 之readability与BeautifulSoup
以前要采集某个网页,一般做法是写程序源代码爬出来,然后用正则去匹配出来,这种针对指定的网页去爬效果还可以,但是如果是批量的网页这种实现就会变得不现实,在这时候就有readability出手的意义了,r ...
- 公共代码参考(Volley)
Volley 是google提供的一个网络库,相对于自己写httpclient确实方便很多,本文参考部分网上例子整理如下,以作备忘: 定义一个缓存类: public class BitmapCache ...
- Java设计模式12:装饰器模式
装饰器模式 装饰器模式又称为包装(Wrapper)模式.装饰器模式以多客户端透明的方式扩展对象的功能,是继承关系的一个替代方案. 装饰器模式的结构 通常给对象添加功能,要么直接修改对象添加相应的功能, ...
- 换个角度理解云计算之MapReduce
上一篇简单讲了一下HDFS,简单来说就是一个叫做“NameNode”的大哥,带着一群叫做“DataNode”的小弟,完成了一坨坨数据的存储,其中大哥负责保存数据的目录,小弟们负责数据的真正存储,而大哥 ...
- 如何选择前端框架:ANGULAR VS EMBER VS REACT
最近一段时间是令前端工程师们非常兴奋的时期,因为三大Web框架陆续发布新版本,让我们见识到了更强大的Web框架.Ember2.0在2个月之前已经发布,从1.0升级到2.0非常简单.几周之前React发 ...
- boost常用记录
1.BOOST_FOREACH 经常会遍历容器,写for/while循环到手痛,使用BOOST_FOREACH可以减少我们的工作.支持容器vector/list/set/deque/stack/que ...
- Redis教程(十四):内存优化介绍
转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/142.html 一.特殊编码: 自从Redis 2.2之后,很多数据类型都 ...
- paip.python错误解决23
paip.python错误解决 作者Attilax 艾龙, EMAIL:1466519819@qq.com 来源:attilax的专栏 地址:http://blog.csdn.net/attilax ...