From Visual Studio Team Services (VSTS) it’s possible to deploy to an Azure Subscription using an Active Directory Service Principal.
The Microsoft documentation refers to a blog post which describes a 3-clicks and a manual way to setup this principal.
For both the suggested ways (3-clicks or manual), there are some concerns from my side about the principal setup, which I think they could be improved:
- The principal which is created during the process gets the “Contributor” role granted on the whole Azure subscription, and using the manual powershell script, the default role is even “Owner” (this can be modified).
- The name of the Active Directory Application/Principal is some random guid which is difficult to be identified, see this picture:
Continue reading “A better way (and script) to add a Service Principal in Azure for VSTS”
Last night I was developing some code in .NET Core for the Dutch Azure Meetup and I was (again) encountering versioning problems and unexpected behavior.
I found this blog post which describes in some way the same problem I had.
Update 13-01-2017: I found this blog which also describes very well the issue.
What the blog post says is that if you use:
and you want use a specific version of .NET Core SDK you should add a global.json file (before executing the “dotnet new” command) like this:
The SDK’s in Windows are installed in the Program Files folder (or Program Files (x86) if you have a 32bit Windows) so let’s take a look there:
The following SDK’s are installed om my machine:
But how I know which SDK belongs to which .NET Core version? Continue reading “Demystifying .NET Core SDK versions”
For the quick answer jump directly to the conclusion
Yesterday I was setting up the build for an ASP .NET Core (Web API) application I wrote, this application was using a package from the VSTS Package Management repository.
To setup this build I was using the new dotnet Core tooling (in preview) which is available when creating a new Build Definition:
Continue reading “Solve 401 (Unauthorized) error when restoring packages using VSTS Package Management and .NET Core”
In this post I want to show you what I think it’s the best way to setup VSTS working with Azure Resource Manager Templates.
At the customer I am currently working for, we are setting up a new Azure Big Data ingestion environment and we wanted to do it using the Infrastructure as Code approach. With Azure this obviously goes with ARM Templates.
For source control, build and deployment we use Visual Studio Team Services (VSTS).
About VSTS, Build and Release Management
I have seen different setups with VSTS, some of them where the deployment take place from the build, or directly in Release Management without a build.
My approach is to have a clear separation of concerns between the Build and the Release Management.
The Build is for compiling, (Unit) Testing and creating artifacts for the deployment.
The Release Management’s responsibility is for deploying the artifacts created during the Build process. Continue reading “Setting up VSTS with ARM Templates”
When testing deployments of Azure RM resources (ie. using the Test-AzureRmResourceGroupDeployment powershell cmdlet) an empty Resource Group is created.
This Resource Group is often not needed at this point and can be deleted after you are done testing the deployment of the resources.
For deleting the Resource Group you can use the VSTS task delete resource group if empty.
This tasks deletes the Resource Group only if it does not contains any resources.
This week Pascal Naber, Sander Molenkamp and I started the Dutch Azure Meetup: http://www.dutchazuremeetup.nl
Azure offers a lot of services and features, and this grows almost daily. It’s hard to be up-to-date on all the Azure features. This meetup gives you the opportunity to learn about Azure in a practical way.
We want to offer a platform for Azure enthusiasts, where you can get hands-on with the technology, talk with and learn from each other. The meetup will not handle customer cases in theory but instead we talk about deep technical details, real world experiences and best practices.
Our first meetup is planned for the 2nd of June and is all about Azure Container Service:
Join the first Dutch Azure Meetup!
Docker is taking the world by storm and Microsoft Azure Container Service is where Azure and Docker meet!
During this first meetup Mark van Holsteijn will give you a brief introduction into Docker and Microsoft Container Service.After which you will have ample opportunity to get hands-on with Docker, Marathon, Azure and ASP.NET core.
We will show you how Azure Container Service provides an excellent platform for creating cross-cloud applications.
About the speaker
Mark van Holsteijn is Principal Consultant at Xebia specialized in cloud software architectures with open-source technologies.
18:45: Word of welcome Dutch Azure Meetup
18:50: Azure Container Service (by Mark van Holsteijn)
19:30: Hands-on with Docker and Azure Container Service
Recently I was writing an Azure Resource Manager Template to deploy a Web App. The Web App needed some Application settings (like connection strings, etc..) which I wanted to provision during the Resource Manager Template deployment. One of the settings needed was the Azure subscription id where the Web App was created.
I didn’t want to hardcode the subscription id, or provide it through a parameter (which is a way to postpone the hard-coding), so I did a little research and I found the solution.
In Azure RM Template you can use Resource Functions which can evaluate during the deployment run-time settings.
The one I needed was subscription() which has the following structure:
This means you can use the function like this:
There are more nice functions you may need to use like: resourceGroup(), resourceId ([resourceGroupName], resourceType, resourceName1, [resourceName2]…).