How to use VSO and RMO to deploy an Azure Website 21 November 2014 Donovan-Brown Work (0) This is a neat post because we are going to be using all three Azure offerings SaaS, PaaS and IaaS.& [More]
How to deploy the Fabriakam Call Center application with DSC 20 November 2014 Donovan-Brown Work (0) Because there is not an Update 4 version of the Keller VM using the Visual Studio 2013 Update 3 Keller VM I will show you how to upgrade Release Management to Update 4 and create a vNext deployment for the Fabriakam Call Center application. First we have to uninstall Release Management Update 3. Log in as Brian Keller and uninstall the components in the following order: Deployer Client Server You will get an error during the uninstall of the server just click Close the program. Now download Update 4 of Release Management iso image from VisualStudio.com and mount the image to your VM. Install the components in the following order: Server: password for Administrator is P2ssw0rd Client: enter “vsalm” for Release Management service Deployer: password for Administrator is P2ssw0rd Upgrading just Release Management to Update 4 without the rest of the system will break build. The work around is to copy Microsoft.VisualStuio.Services.Common.dll and Microsoft.VisualStuio.Services.WebApi.dll from “C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\Client\bin” to “C:\Program Files\Microsoft Team Foundation Server 12.0\Tools”. Make sure restart the build service after you copy the files. The shortcut pinned to the Taskbar for the Release Management Client will be broken so fix it to point to the next installation of Release Management. To use DSC to deploy your application you have to make sure your DSC script is in the drop location so let’s address that first. Open the FabrikamFiber.CallCenter solution and add a Configuration folder to the FabrikamFiber.Web project. This folder will contain all the DSC scripts we need to deploy our project using DSC. Right click on the Configuration folder and select Add / New Item. Add a new text file named “install.ps1”. From the Solution Explorer right click “install.ps1” and select Properties. Change the “Copy to Output Directory” to “Copy always”. This will ensure the file ends up in the drop location. Enter the following text into install.ps1. Configuration InstallWebSite { Node $env:COMPUTERNAME { WindowsFeature InstallIIS { Name = "Web-Server" } WindowsFeature AspNet45 { Name = "Web-Asp-Net45" } File CopyBits { DestinationPath = $DestinationPath SourcePath = $applicationPath Type = "Directory" Recurse = "True" } } } InstallWebSite This is the DSC configuration that will ensure that IIS and ASP.net 4.5 are installed and copy the files to the server. The variable $DestinationPath will be defined on the component in Release Management and $applicationPath will be provided to the script from Release Management. Now check in your changes and queue a new build disabling tests. Make sure the build passes and open Release Management. The only way to add a new vNext server is by creating an Environment so let’s begin there. Click “Configure Paths” then “Environments”. Using the new menu select “New vNext: Standard”. Enter the following values: Name: DSC-Dev Owner: Brian Keller Description: Development environment for Web Team for internal apps using DSC. Now click the Create button under the Servers Tab. We are going to be deploying to the VM which is named VSALM. The DNS Name must contain the port to use to establish a PowerShell Remote connection. The default port for PowerShell Remoting is 5985. Name: VSALM DNS Name: VSALM:5985 Owner: Brian Keller Click Save & Close the Server dialog and click Save & Close on the Environment. Repeat this process for each environment linking to the same machine. Now we have to create vNext Release Path. Click “vNext Release Paths” then New.Name: Fabrikam Call Center DSC Description: Release path for the call center app using DSC. Add a stage. Stage: Dev Environment: DSC-Dev Automated: <Checked> Approver: Web Team Owner: Web Team Validator: Web Team Approver: Brian Keller Repeat this process for each stage of your deployment. When you are done Save & Close the Release Path. Now move to the “Configure Apps” tab so we can configure our vNext Components on the Components tab. From the New menu select “New vNext”. Name: Fabrikam Call Center DSC Builds with application: <Checked> Path to package: _PublishedWebsites\FabrikamFiber.Web Click “Configuration Variables” tab and Add a new configuration variable. Name: DestinationPath Type: Standard Now Save & Close your component. The final step is to create a vNext Release Template. Click New on the “vNext Release Templates” tab. Name: Fabrikam Call Center DSC Description: Call Center DSC Release Path: Fabrikam Call Center DSC Build definition: vsalm:8080/FabrikamFiber/Nightly Fabrikam (Dev) Can Trigger a Release from a Build: <Checked> Click Create. Right click on Components in the Toolbox and link your component. To build your Deployment Sequence simply drag the “Deploy Using PS/DSC” on to the Deployment Sequence. Expand the action and use the following values ServerName: VSALM UserName: .\Administrator Password: P2ssw0rd ComponentName: Fabrikam Call Center DSC PSScriptPath: Configuration\install.ps1 SkipCaCheck: True Leave the rest of the values empty. Under “Custom configuration” add a new “Standard Variable” and select “DestinationPath” set the value to “c:\FabrikamRM\WebSite\DEV” (without the ""). Copy and paste the sequence to the QA stage and change the value of the DestinationPath variable to “c:\FabrikamRM\WebSite\UAT” and repeat to the Prod stage using “c:\FabrikamRM\WebSite\PROD”. Click Save then click “New Release”. Use the latest version of the build and click Start. Good luck! If you have any questions feel free to ask me on Twitter @DonovanBrown install.ps1 (438.00 bytes)
Visual Studio 2013 Update 3 Keller VM share issue 20 November 2014 Donovan-Brown Work (0) Problem: When I attempt to open the drop folder of a build on the Update 3 version of the Visual Studio 2013 Keller vm I get the follow error. Solution: Give Everyone read permission to the c:\ffdrops folder. If you get promoted by a Network discovery and file sharing dialog select "Yes, turn on newtork discovery and file sharing for all public networks?".
How to run Microsoft Test Manager Suite in vNext Deployment 18 November 2014 Donovan-Brown Work (0) While preparing to speak at TechEd Europe I really had to run Release Management and Desired State Configuration (DSC) through their paces. I already blogged about one of my challenges of implementing tokenization in a DSC based deployment here. I also wanted to run Coded UI tests as part of my release. To do this I simply ran the attached PowerShell script during my release. The script is very similar to the tool I wrote for the Agent based deployment here. In this post I simply share the ps1 file that is attached and explain how to add it to your pipeline. For this post I will be using Update 4 of Release Management. The first thing you have to do is make sure the ps1 file is in the drop location of your team build. There are several ways you can do this, however, I simply added a Configurations folder to my Coded UI Test project in Visual Studio. The most important part is to make sure that “Copy to Output Directory” is set to either “Copy if newer” or “Copy always”. This will ensure the file is in the drop location of the build. Now queue a build and examine the drop location. You will need to know the relative path from the root of the drop location of your ps1 script for use in your “Deploy Using PS/DSC” action of your vNext Release Template. Now let’s add a new vNext component in Release Management. Select the “Builds with application” radio button and simply enter a “\” for the value. On the “Configuration Variables” tab you have to setup all the parameters for the ps1 file. Add each variable as a Standard configuration variable (Collection, TeamProject, PlanId, SuiteId, ConfigId BuildDirectory, TestEnvironment, Title and TestRunWaitDelay). You can refer to my previous post on where to locate the values for each configuration variable. One of the new features of Update 4 is the ability to define default values for variables that do not change very often. As you can see in the image below I set default values for Collection, TeamProject, TestEnvironment and TestRunWaitDelay. With our component created we can move on to the vNext Release Template. Create a new one and add your components. Now drag the “Deploy Using PS/DSC” action onto the deployment sequence. Select the desired server from the ServerName dropdown. That server must already have a Test Agent configured on that machine with tcm.exe. The UserName and Password that are provided is an account that has permission to establish a Remote PowerShell connection to the target machine. Please note that in Update 3 of Release Management this is NOT the account that will execute your ps1. The ps1 in Update 3 is run by local system. Which means for this to work local system must have access to your TFS or you will get an access denied error. Select your test component in the ComponentName dropdown. Now enter the relative path to the ps1 file in the drop location. You can leave the rest of the values blank. We now have to add the Custom configuration variables to the action. Click the plus button or use the down arrow and select “Standard variable”. On the newly added row select the configuration variable you want to set and enter the correct value. For the BuildDirectory variable enter “$applicationPath”. This variable is provided by Release Management and points to a location that contains the files of our component. Now you should be able to run a new release and execute automated test. RunTests.ps1 (4.94 kb)
Where are my diagnostic build logs? 12 October 2014 Donovan-Brown (0) Problem: I am trying to customize TfvcTemplate.12.xaml and can’t increase the verbosity level any longer. Solution: Open the desired build and click the Diagnostics menu and select View Logs. Explanation: In the past there was an argument on the build template that allowed you to control the output verbosity. However, in the new template that argument has been removed and is hardcoded to “Normal” on the call the msbuild. Nevertheless, the data is being captured in the logs placed in the drop location. Simply double click on the xml files. If you are prompted for how to open the file select Internet Explorer. There is an xsl file that will format the data making it easy to read in Internet Explorer. You can read more here.
How to connect SQL Server Data Tools 2012 to TFS 2013 12 October 2014 Donovan-Brown Work (0) Problem: I installed SQL Server 2012 Standard Edition with SP1 with SQL Server Data Tools and I need to version my projects in TFS 2013. Solution: The IDE for SQL Server Data Tools is Visual Studio 2010 Shell. By installing Microsoft Visual Studio Team Explorer 2010, Microsoft Visual Studio 2010 Service Pack 1 and Visual Studio 2010 SP1 Team Foundation Server Compatibility GDR you will be able to connect to TFS 2013. You can read more about the compatibility between Team Foundation clients and Team Foundation Server here. Please note that when you connect to a more recent version of TFS than that of the client, you only have access to those features supported by your client. You cannot access any features that Visual Studio 2010 does not support.
Getting Test Case Import Utilities for Visual Studio 2012 and Visual Studio 2010 to work with TFS 2013 18 June 2014 Donovan-Brown (0) Problem:Recently we had a customer try and use the Test Case Import Utilities for Visual Studi [More]
Validate code automatically during a Team Foundation Build 03 June 2014 Donovan-Brown Work (0) Problem: I need to run my Layer Diagram validation during my build. Solution: Edit your build definition and under Build process parameters, expand Advanced, and type the following in the MSBuild Arguments parameter: /p:ValidateArchitecture=true
I can't register the Microsoft Deployment Agent 2013 11 May 2014 Donovan-Brown Work (0) Updated: With update 2 the deployer account no longer as to be an admin on the machine. The account simply needs to correct permissions to deploy the desired components. Problem: When I attempt to register my deployer I get a 401 unauthorized error. Solution: Make sure the account you are using is an Administrator on the deployer machine and added to Release Management on the Server. Also the account running the installer must have access to the Sql Server on the Release Server machine.
Find by Status is not working 13 February 2014 Donovan-Brown Work (0) Problem: "Find by Status" of the TFS Power Tools always returns zero results even though people have files checked out. Solution: Make sure the developers workspaces are Server and not Local. Explanation: Only Server workspace communicate the status of check outs back to the Server local workspaces do not.