《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.410.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)的更多相关文章

  1. Windows Azure Virtual Network (6) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (1)

    <Windows Azure Platform 系列文章目录> 注意:本文介绍的是Global Azure (http://www.windowsazure.com),如果你使用的是由世纪 ...

  2. Windows Azure Virtual Network (7) 设置Azure Virtual Machine固定公网IP (Virtual IP Address, VIP) (2)

    <Windows Azure Platform 系列文章目录> 本文介绍的是,当用户在创建Azure Virtual Machine的时候,忘记绑定公网IP,需要重新绑定公网IP的具体操作 ...

  3. [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 ...

  4. [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 ...

  5. 比较Windows Azure 网站(Web Sites), 云服务(Cloud Services)and 虚机(Virtual Machines)

    Windows Azure提供了几个部署web应用程序的方法,比如Windows Azure网站.云服务和虚拟机.你可能无法确定哪一个最适合您的需要,或者你可能清楚的概念,比如IaaS vs PaaS ...

  6. [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 ...

  7. [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 ...

  8. [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 ...

  9. [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 ...

随机推荐

  1. iBatis简单介绍

    1.       Ibatis是开源软件组织Apache推出的一种轻量级的对象关系映射(ORM)框架,和Hibernate.Toplink等在java编程的对象持久化方面深受开发人员欢迎. 对象关系映 ...

  2. 添加Labels的两种方法

    private void AddLabel(IFeatureLayer pLayer,string fieldname,ITextSymbol Symbol) { container.DeleteAl ...

  3. 2013-08-12【随笔2】-Roy

    最近总是因为一下小事情,就会变得闹心,就会自己胡思乱想,自己吓唬自己,自己给自己找烦恼. 是因为每天无所事事,日子过得没有了重点,然后每天人心惶惶,有点杞人忧天了. 还是因为这样平淡的日子,消磨了我们 ...

  4. Linux下Crontab命令用法

    第1列分钟1-59第2列小时1-23(0表示子夜)第3列日1-31第4列月1-12第5列星期0-6(0表示星期天)第6列要运行的命令 下面是crontab的格式:分 时 日 月 星期 要运行的命令 这 ...

  5. Jexus 5.8.2 Beta1发布:为Asp.Net Core进入生产环境提供平台支持

    Jeuxs 5.8.2beta1于7月10日正式发布. 有如下更新: 1,为FastCGI提供KEEP_CONN支持,优化FastCGI工作线程池调度算法: 2,完善反向代理的负载均衡策略,支持“随机 ...

  6. hadoop 笔记(hbase)

    hbase 基础: hbase是基于列的数据,其数据模式如下: 1.安装 1.1)hbase安装分为单机.伪分布式.分布式,单机下安装不依赖于hadoop:因为不需要分布式文件系统支持: 1.2)安装 ...

  7. Java多线程4:synchronized锁机制

    脏读 一个常见的概念.在多线程中,难免会出现在多个线程中对同一个对象的实例变量进行并发访问的情况,如果不做正确的同步处理,那么产生的后果就是"脏读",也就是取到的数据其实是被更改过 ...

  8. Vue.js线程机制问题还是数据双向绑定有延迟的问题

    最近用select2做一个下拉多选,若只是从后端获取一个列表渲染还好说,没有任何问题.但要用select2对数据初始化时进行selected的默认选项进行显示,就出现问题了. vm.$set('are ...

  9. 说说设计模式~建造者模式(Builder)

    返回目录 建造者模式是我的"设计模式"里创建型模式里的最后一篇,这种模式在实现中,很多架构都用到了,如MVC,MVP,MVVM,它们都是有建造者模式的精髓的,即,创建与表现分享,我 ...

  10. Node.js与Sails~自定义响应体responses

    回到目录 在Node.js里,你可以控制请求和响应,自己可以定义自己的响应方式,如对文本如何响应,对json如何响应,对图像流如何响应等等,而这些在Sails架构里,变得更加容易和清晰了,它位于项目的 ...