DevOps style deployment in Visual Studio 2015 preview – A detailed look

Muthukumaran [MSFT]

By now you must be aware about the DevOps style deployment capability that was announced in Visual Studio 2015 preview. If not already, you would want to refer the announcement blog; Announcing DevOps style deployments using Visual Studio 2015 Preview and Azure. Brian Keller’s Channel9 Video is a great place to start to learn more about this feature.

In this blog, we would like to share few additional details on how this capability works and how Developers can make use of it. To get started please refer to Pre-requisites and the instructions to create a deployment project that was shared in announcement blog. In order for you to deploy the application to Azure environment, you can do one of the following:

  • Select the Deployment project and right click to pick “Deploy” option

 

 

 

or

  • Right click near the tool bar and enable “Cloud Deployment” option. This should add a new “Deployment” dropdown in the Tool bar.

  

 

 

 

The announcement blog explains most of the parameters that needs to be filled in the doc view that gets opened to create a new deployment. The default deployment project template has few parameters exposed in UI. While most parameters are self-explanatory and their purpose well understood, let’s specifically look at the “dropLocation” and “dropLocationSasToken” parameters.

Please note that, even though you are connected to a Visual Studio Online Team project, the environment deployment will have to pick the application package from your developer box when the deployment is done for a solution that is not yet checked-in. Given that the developer would first iterate through the application and the deployment scripts in his local box first before he makes it available in source control, the application package that needs to be deployed to Azure environment will be present in the local developer box when deployment is being attempted in the above flow. The application package should be made available in an Azure blob storage before it can be deployed onto the newly provisioned environment.

 

 

 

“dropLocation” is the Azure blob storage where the application package will be uploaded first, before it gets deployed onto the Azure environment. You can click on the folder icon and supply the required values for storage account and container in the dialogue that pops. Once you provide these values, the SasToken will automatically be generated and will be used for Visual Studio to upload the package. When you click on Deploy, Visual studio does few things before it can get the environment deployed. The new deployment project added to the solution will have “References” to your Application project. Visual studio will build all the referred projects to generate the package.

 

 

The Visual studio output window now has a “Deployment” option to list the logs related to deployment.  When the deployment is triggered, Visual Studio first builds all the referenced application projects to generate the package. Once the package is available it uploads the package to Azure and then begins the environment provisioning.

 

 

 

 The json file created under the Topologies tree contains the configuration needs for your application deployment.

 

 

 

The default file that gets created out of the template can be edited by developers to customize according to their deployment needs. If you are editing the file and would like to ensure the file schema is still appropriate, you can leverage the “Validate Template” option. Right click on the json template and pick “Validate Template”.

 

 

Enjoy the new capability and let us know your feedback.

0 comments

Discussion is closed.

Feedback usabilla icon