Visual Studio Online, multiple Cloud projects, Continuous Integration - azure

I have a Visual Studio 2013 solution with 3 cloud service projects (1 Web Role, 2 Worker Roles) and a set of nUnit tests hosted in Visual Studio Online.
Through Azure portal, I've setup a continuous integration build that builds and deploys my solution on checkin. Azure, however asked me for a single Cloud Service to deploy solution into (although my project contains 3 of them) and obviously, the build only deploys one of the cloud projects (presumably the first one it finds). How can I make it deploy all three?
I'd rather not create three different builds.

From my experience, you cannot deploy all of your azure projects within your solution to azure at the same time using the VSO CI builds. If you look at your CI build definition under process you'll see that you can only specify one cloud service name to deploy to. We ended up having to create one solution, with one azure project, and one CI build per cloud service. We use the staging environments as a temporary deployment destination until all of our services are built/deployed, then swap them all at the same time to achieve a somewhat seamless/instant update.
Hope this helps.

I was able to get this to work with the new VSO VBuild Next System in TFS 2015.
You are able to build a specific *.ccproj cloud service project and from there use a specific task to publish to azure.
This allows me to have multiple cloud services and multiple web roles in the same solution.
You should also be able to build multiple cloud service projects and setup multiple publish tasks, all from the same build definition.
From MS...
We've built a brand new scriptable build system that's web-based and
cross-platform. We believe all new and most existing customers should
use it instead of the XAML build system.
More info:
https://msdn.microsoft.com/Library/vs/alm/Build/overview
Here is a view of my build tasks..

Related

VSTS and Azure use

I am trying to understand the relationship between VSTS and AZURE.
I am planning to deploy some apps in Azure and wanted to know if there is any way within Azure that we can maintain releases and builds? or do we have to use VSTS?
EDIT
I currently have everything in on-premise TFS and am using on-premise MS Release Management for managing my releases (which are a bit complicated).
Now Azure does offer continuous deployment using App Service integration but I feel that might be more apt for simpler applications with relatively simple release plans (Is this assumption correct?). Exploring Azure, I also see Octopus deploy (in the compute section). Does that mean that we can manage deployment inside of Azure without using VSTS? (I currently dont care about work items, backlogs and process inside of TFS)
Regarding the relationship between VSTS and Azure.
Want to authenticate users and control access with Azure AD Team Services: Access with Azure Active Directory (Azure AD)
Set up billing when you need more users, pipelines etc… Set up billing to pay for users, pipelines, and cloud-based load testing in Visual Studio Team Services
Regarding deploy apps to azure, there are many ways, for example:
Continuous Deployment to Azure App Service, the source code could be in VSTS, Git, Bitbucket etc…
VSTS build and release, the source code can be in VSTS, GitHub, External Git and Subversion: Build definition repository
Some tools, for example Visual Studio: Using Visual Studio 2015 and Deploying your first web app to your FREE Azure Subscription

Azure App Service Continuous Deployment with VSTS

I have set up Azure continuous deployment from a branch in my Visual Studio Team Services GIT Repository. Everything is working fine however I would like to run a few gulp tasks before the actual deployment takes place. Is there a way how I can do this?
Azure provides continuous deployment out of the box through the use of several sources of your code. What you will need will be more in the side of continuous integration, running tasks and flows to build the code.
There are many ways and tools of doing continuous integration, nevertheless the most compatible to do this in Azure would be within the build and release parts of Visual Studio Team Services.
Within your Azure subscription you can setup this following the next steps(it seems you have already setup your code in Visual Studio team services, then you can skip to step 3):
Creating a VSTS project
Putting your code in a Git Repo inside VSTS
Creating a Build definition
Adding your tasks from the Catalog
Adding and configuring your Gulp Tasks
Deploying the build to Azure

Deploy Web application over Azure using VSTS (Visual studio Team Service)

I want to fully automate the deployment of a web application using VSTS. I have a sample azure application and I want to create a build definition on it that contains building the solution, running unit tests, and deploying it over azure on IIS as its build steps. I am new to VSTS, I am finding it hard to automate the deployment using VSTS. Seeking some help on how to create the above build definition. Any slightest guidance will be helpful.
Madhur,
You will find step by step up to date examples on the Visual Studio website:
Build and deploy your ASP.NET 4 code to an Azure web app
Deploy ASP.NET apps to Azure web apps
First create a build definition to test and package you web app.
Second get familiar with release definition to deploy it on Azure. Or if you just want to do it in one place you can have everything in your build definition, it's up to you.
Also when creating a build or release definition on VSTS, the templates offered are very useful, everything is done so you juste have to feel the gaps. I advise you to take a look at it.
Ive written up a walkthrough of this process at my blog site, its for an asp.net core app but the principal is the same for a normal .net framework one, in fact its even easier because you just choose the Visual Studio Build template when creating the build definition. My walkthrough also takes you through how to deploy the Azure resources you need to host the website - its good practise to use infrastructure as code for these, and maintain that code in the same way you treat source code, with CI and CD processes.

Release Management Azure Website

How can I publish to an Azure Website (NO VM!) using Microsoft Release Management.
At the moment, ms release management only seems to support deploying to Azure VM's. I like MS Release Management system as it lets me control my deployment variables across multiple deployment stages.
Basically, this is not a supported scenario out of the box.
Your best bet here is to use an agent-based release template with a "springboard" server to manage the release, and custom PowerShell scripts that use the Azure SDK to interact with Azure. One of my colleagues did the leg work to figure it out a few months ago, and has a few comprehensive blog posts describing how he accomplished deploying an Azure Web Application via RM.
Visual Studio Release Management now offers built-in steps to manage Azure App Services. In a Release Management process add the Azure App Service Deploy step, and configure for your website. Note that this step requires your site to be published as a .zip file.
In addition to the deploy step, it is best practice to deploy to an inactive slot, or stop / start the site using the Azure App Service Manage steps in Release Management.
For now, you should take a look at the new build system, it has an out of box task to deploy a package to azure web app.

Windows Azure configuration management

We have built a small MVC4 application using Azure Cloud Services. It has been deployed through Visual Studio. Now we are going add a test environment where the application should be tested, before being deployed into production.
I would like to have our CI server to build, test and create a deployable package, This package could then be deployed to any environment, providing correct configurations.
But I have not found a convenient way to do this. It is easy to build a package for a specific environment, with configuration transformations for .config and .cscfg files.
Is having the CI server to build a separate package for each environment the way to go, or have I missed something?
There are ways described how the web.config could be modified when the WebRole is starting, but this feels a bit hacky, and not the way the guys at Microsoft intended when creating Cloud Services.
Using the CI server to deploy the specific configuration has been the easiest in my experience. I think using the Visual Studio "Build" section in Team Explorer is what your looking for. We use Team Foundation Service as our Continuous Integration and Continuous Delivery server. In Visual Studio we've created Production and Testing build configurations. In the Build tab we've created a Continuous Integration Build which will kick off unit tests on every checkin, and a Continuous Delivery Build That will deploy newly tested checked in code on a regular schedule. These Build Events can be set to use a specific (Production/Testing) build configuration.

Resources