Auto Deploy To Azure VM Using TFS Portal (Part 1)

Create the Virtual Machine

In this article, we will learn how we can create a virtual machines and make auto-deploy to azure using the TFS portal.

Use the below link and create a VM and host the site on it by creating the folder and hosting it on IIS.

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal

Create a VSTF Account

Create a VSTF Account and host your project on it.

  • Connect to the team project

  • Then open the project and select add a solution to source control

 

  • Go to the Team Explorer>Pending Changes > Check in.

  • Then check in the code

Step 1: Set up continuous integration

Go to the dashboard of the VSTS account eg. https://autodeploytest.visualstudio.com/[ProjectName]

Create a new pipeline definition.

  1. Navigate to the pipelines tab, and then click pipelines.

2.  Create new pipeline

3. Select the source for the code from which we want to auto-deploy. Here I am using TFS. So, select Team Foundation Version Control.

4.  Select the path for the repo which has to publish. Local Path will be the folder that will have the publish code.

5. Select the template. In the right panel, click search .NET, and then click Apply.

6. Select the agent pool. Here we can use azure pipelines or custom agents.

For now, I am using an azure pipeline. Note, Azure Pipelines are limited to a few builds. For unlimited free build prefer custom agent.

7. Click the Triggers tab in the build definition. Enable the Continuous Integration This will ensure that the build process is automatically triggered every time you commit a change to your repository.

8. Click Save and queue to kick off your first build. On the Queue build dialog box, click Queue.

9. A new build is started. You’ll see a link to the new build on the top of the page. Click the link to watch the new build as it happens.

The rest of the steps will continue in Part 2.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories