Azure, DevOps

Access Team City from Windows VM deployed in Azure through Public IP

There might be a situation where you are planning to have your DevOps Continuous Integration and Deployment processes to be implemented from a VM having Windows OS you have provisioned in Azure. This post mainly emphasize on how you can access your Team City from one of the VM commissioned in Azure through Public IP. Since I am not dealing with how to setup the Team City, hence I will skip the setup process and rather focus on the access over public IP. Please go through the step-by-step instructions.

Step 1: Add Inbound rules to the server firewall for allowing communications

Login to the VM and then access the Windows Firewall . Create a new Inbound rule.

image

Select Protocol and Ports and specify port 80 where the rule applies. The port 80 is the port that has been configured for your localhost when you had setup Team City which goes like http://localhost/login.html. You can assign any other port that you had configured with.

image

image

Select Allow Connection from the Action pane

image

Rest continue with the default option for the Profile and then provide a name for this Rule you have created and finish to add the new rule.

Step 2: Configure the Azure VM from the Azure Portal

Login to the portal and select the VM that you have created and select the IP address.

image

Provide a DNS name and assign to Static IP

image

Select the Network Security Group <VM_Name>.nsg assigned for the VM in order to allow traffic for port 80. Select the Inbound Security Rules and Add a rule.

image

While adding the rule, add the name of the rule, ensure that you have selected HTTP for Service and Action is Allow.

image

Once the rule is added, Redeploy the VM.

image

That’s it. Now you can provide the Team City URL http://<dns-name>/login.html and you will be able to view the Team City Login page through Internet.