Setting up a continual deployment with Visual Studio Release Management


Tuesday we are doing a DevOps Lab for MSIT and wanted to streamline/tune the walk through for this internal audience.

In this lab, you will learn about the four of the five major DevOps Enablers:

  1. Continuous Integration
  2. Continuous Deployment
  3. Continuous Testing
  4. Application Monitoring

This lab will be the second in that series-setting up Continuous Deployment using Visual Studio Release Management

Now that we have our CI build working and creating the Web Deploy package. It is time to get set up continual deployment in a release pipeline.  Note: at the time of authoring this document Release Management was not available publically in VSO….you will have to use  shared account  https://partsunlimited.visualstudio.com/DefaultCollection/MSIT/_releasepipeline 

Step 1. In Visual Studio Online click on the Release Hub. Note: if you don’t see you "Release" in your Visual Studio Online account it is due to the fact it is still hidden with a feature flag and you will have to have the lab proctor add you to the PartsUnlimited VSO Account.

image

Step 2.  Click the Action button (Green Plus) to create new release definition

Please name this with your email address as it is likely we will be creating lots of release!

image

Step 3. The stereotypical dev team will have three environments…lets create those.  Click the Action button (Green Plus) for environments twice…giving us a total of three environments.

Name the environments:

a. Dev

b. QA

c. Prod

image

Step 4.   You will note there are lots of options for deploying your build, running Tests  and giving you insight into your build process as part of the build.  Lets set that up:

1. Select the "Dev" Environment

2. Click the Action button (Green Plus) for tasks (see image above) select the "Test" category and add a task that runs all unit tests in the solution on the build controller.

image

Step 5. Setup up the Test task…while there is no specific actions here it is worth reviewing the options for running tests…

Step 6. Setup the Dev environment as part of the release deployment.  Click the Action button (Green Plus) for tasks (see image above) select the "Deployment" category and add a task that deploys an Azure Website

image

Step 7.  Set Azure Web Site Deployment task.  For Azure subscription set it to use the parts unlimited sponsorship, set the web site location to be West US, set the website name to PartsunlimitedwebDev and the package to be the package we are created in the CI Lab:

c:\agent\PartsUnlimitedWebsite.zip

image

Step 8. Add Approvers to the QA Environment step of the build release.  So that bad builds or content doesn’t show up unexpectedly you can set up approvers.  To do this right click on the environment and choose Assign Approvers.

image

Step 9. Add Approvers to the Pre-deployment stage of the QA –Environment.

NOTE: Make and sure and the account you are logged in with or you will have to reassign the approver to complete this build

image

Step 10.  Add task and go to the "Test" category

image

Step 11. Add Load Testing to the QA Environment

image

Step 12. Setup the Test environment as part of the release deployment.  Select the QA environment. Click the Action button (Green Plus) for tasks (see image above) select the "Deployment" category and add a task that deploys an Azure Website

image

Step 13.  Set Azure Web Site Deployment task.  For Azure subscription set it to use the parts unlimited sponsorship, set the web site location to be West US, set the website name to PartsunlimitedwebTest and the package to be the package we are created in the CI Lab:

c:\agent\PartsUnlimitedWebsite.zip

Step 14. Setup the Prod environment as part of the release deployment.  Select the Prod environment and Click the Action button (Green Plus) for tasks (see image above) select the "Deployment" category and add a task that deploys an Azure Website

image

Step 13.  Set Azure Web Site Deployment task.  For Azure subscription set it to use the parts unlimited sponsorship, set the web site location to be West US, set the website name to Partsunlimitedweb and the package to be the package we are created in the CI Lab:

c:\agent\PartsUnlimitedWebsite.zip

Step 9. Save the Release Definition

image

Step 10. If you cannot save the release make sure the account is in the release managers group.  To add your account to the Release managers group click on the gear.  Click on Security tab.

image

Step 12. Select Release Managers > Members > Add and add the account you are logged in with

image

 

Step 13.  Now that all the components of this release pipeline are completed it is time to set it to run on the completion of a build. Click on Triggers

image

Step 14. Check the check box for continuous deployment and select the build you created above

image

Step 15 As a test it is probably worth verifying your release pipeline will work when started manually.  Click the Action button (Green Plus) to create new release.

image

Step 16. This will prompt you which build do you want to run the release on…Choose a build and select "Create"

image

Step 17. Check the status.  Open the Release by selecting the hyperlink for that Release.

 image

image 

Step 18. If you remember earlier in the lab, the release has an approval step in it.  Select the release hyper link you just created above and select "logs"

  image

Step 19.  Approve the release to the QA environment

image

Step 20.  Review the Release

 

image


Comments (0)

Skip to main content