Introduction
For enabling the continues deployment from VSTS to Azure, e.g. provision the environment and deploy code, you must create connection between VSTS project and Azure subscription. It should be done in individual project and not in the VSTS top level. Therefore, each project can connect to different Azure subscription.
It contains two main parts, and normally you need both of them
- Connect Azure Classic (for deploying your application code)
- Connect Azure Resource Manager (for provisioning your environment)
How to connect Azure Classic
- Make sure you are the admin of VSTS project and also the admin of Azure subscription
- Go to your project management page, such as https://your_instance.visualstudio.com/DefaultCollection/your_project_name/_admin
- Select “Services” in the tab, then “Azure Classic”
- Change radio button to “Certificate Based“, then download the setting file by following publish settings file
- Setting file is downloaded
- Carefully copy values from that file into the form
- Done
How to connect Azure Resource Manager
- Make sure you are the admin of VSTS project and also the admin of Azure subscription
- Go to your project management page, such as https://your_instance.visualstudio.com/DefaultCollection/your_project_name/_admin
- Select “Services” in the tab, then “Azure Resource Manager”
- Follow the instruction in the page that link from the picture, to fill up all information that is needed in the form.
- A key step from the instruction is to run a powershell script. This script can be download from the page.
- Download and run the script, it will ask for:
- The name of your Azure Subscription name
- A password that you would like to set for the Service Principal that is going to be created
- Copy the name from your Azure subscription, in this case, it is “MSDN Dev/Test Pay-As-You-Go”
- Complete the script execution. It will pop up a window for logging. Log in.
- Finally you will get values that you can use for the form
- Copy paste into the form from VSTS project, the click OK
- Done