Windows Azure Platform Family of articles Catalog
In the previous article, I have described in detail how to add virtual machine to virtual network, and bind a fixed private IP address (public IP addresses)
Windows Azure Virtual Network (5) Set up Azure virtual machine fixed private IP
Windows Azure Virtual Network (6) Set up Azure virtual machine fixed public IP (virtual IP Address, VIP) (1)
Windows Azure Virtual Network (7) Set up Azure virtual machine fixed public IP (virtual IP Address, VIP) (2)
But the above features are limited to IaaS, and if we need to set up private IP and virtual IP Address in the PAAs Cloud service, how should I set it?
Imagine a scenario where the front end uses the PAAs Cloud service for scale-out and the backend uses 2 SQL Server Virtual machine as the database server.
With this hybrid Paas+iaas scenario, how do you let PAAs Cloud service join virtual Network and use an internal IP address to communicate with the SQL Server VM?
The contents of this chapter are divided into the following three sections:
I. Managing virtual IP address (public IP addresses)
Two. Managing Virtual Network
Three. Configure Azure Cloud Service
I. Managing virtual IP address (public IP addresses)
We can request the virtual IP Address via Azure PowerShell, which can be consulted by the previous blog:
For users who use Azure global abroad, you can refer to:
Windows Azure Virtual Network (6) Set up Azure virtual machine fixed public IP (virtual IP Address, VIP) (1)
Windows Azure Virtual Network (7) Set up Azure virtual machine fixed public IP (virtual IP Address, VIP) (2)
Domestic use of verse connected operation of the Azure China users, you can refer to:
Azure China (8) Create a virtual machine with Azure PowerShell and set up a fixed-virtual IP address and private IP
If the reader is using Baidu query IP address, often will find that the IP address of Azure Shanghai is often displayed from Beijing, this is due to Baidu's IP library is older, please readers attention
Here I do not want to apply for the new reserved IP address, we use the command:
Get-azurereservedip
You can view the reserved IP address that you have previously applied to, such as:
We will continue to use the above Leitestvmreservedip, this address is 191.234.18.61
The InUse status is false and is not occupied
Two. Managing Azure Virtual Network
We create a new Azure Virtual Network, named paasvnet
Add 2 Subnet, named Web-subnet and Db-subnet, for example:
Web-subnet IP rang is 10.0.0.0-10.0.0.127
Db-subnet IP rang is 10.0.0.128-10.0.0.255
Three. Configure Azure Cloud Service
We create a new cloud Service, the project named Leipaasreservedip, only add Webrole can, slightly.
1. Change the number of instance count to 2
2. Modify the ServiceConfiguration.Cloud.cscfg file configuration to add the following:
In the settings in:
(1) Instance count is 2 and requires 2 Instance
(2) Virtualnetworkssite node, set as virtual machine Network name,paasvnet
(3) Instanceaddress node set to WebRole1
(4) Subnet is set to the subnet name in Step two , which is web-subnet
(5) ReservedIP set to our reserved IP Name (leitestvmreservedip) in step one
Then we deploy our cloud service to the Azure platform and observe the reserved IP address, already using the public IP in step one: 191.234.18.61)
Then we observe the private IP usage in the virtual network paasvnet
Web role has been added to the web-subnet Subnet
Because the instance count is set to 2, these 2 PAAs instance occupy the 2 IP addresses of 10.0.0.4 and 10.0.0.5
Windows Azure Cloud Service (44) Joins Cloud service to virtual Network Subnet and secures virtual IP Address (VIP)