TeamBuild and Web Deployment Projects - tfs

With the new TFS 2008 and the upcoming TFS 2010, are Web Deployment Projects depreciated? We used them in our 2005 projects because we needed the multiple distribution of files across a cluster but now that TeamBuild does that, and we are just now moving out of VSS to TFS 2008, I was wondering if there was an argument to be made on removing the WDPs and just go with a strict TeamBuild solution.
We use CruiseControl.NET to build currently but was looking at moving to one solution instead of just using the CC.NET plugin to build from TFS Source Control.

Typically speaking, in a team environment you want to use Web Application Projects anyway which lends itself to xcopy style deployments. We have dozens of applications that are under active development using this method.
When using Team Build, I highly recommend you get a copy of TFS Deployer which enables you to utilize powershell scripts that are hooked into the Build Quality settings.
Our setup is CI (leveraging TFS 2008) with TFS Deployer. A successful check in causes a build and deployment to our dev servers. When we change the build quality to "In Staging" TFS Deployer moves the projects to our staging servers. When our infrastructure team changes it to "In Production" in deploys to our web farms.
Simple, to the point

Related

TFS Build..Deploy vs Release

I have web applications that we build using build scripts and deploy as the last step of those build scripts, if everything builds and unit tests pass. We deploy to staging area.
With the new Release management functionality in TFS, Should I move the Deploy task from the build definition to the Release area? The Release Definition seems to only be able to copy files versus a build script can update an application running in IIS.
I honestly at this point do not see the need for the Release Management in TFS.
The Release Management is used to be an independent tool of TFS.
It has been integrated into Azure Pipelines and Team Foundation Server (TFS)as web-based version in TFS 2015 Update 2 and above or Azure Pipelines.
Release Management not only be able to copy files versus a build script but also as a Continuous Delivery (CD). It is a process by which code is built, tested, and deployed to one or more test and production environments. Deploying and testing in multiple environments drives quality.
CI(build) systems produce the deployable artifacts including infrastructure and apps. Automated release processes consume these artifacts to release new versions and fixes to existing systems. Monitoring and alerting systems run continually to drive visibility into the entire CD process. The Release service in TFS helps you set up and manage CD for your applications.
As for the difference on Release Management vs deploy task at the end of build pipeline, you could also take a look at this similar question: TFS Release Management vs build deploy task at the end

How to run TFS 2017 Agent In Production Environment without installing Visual Studio

In TFS 2017 Update 2, NOT the online TFS, how do I use Release Management/Build agents in a production environment without installing Visual Studio on the build box? Alternative best practices are welcome!
My TFS is in a controlled development environment with a different, untrusted domain from production. Installing Visual Studio on agent machines is not a problem here (needed for vstest, visualstudio, et al agent capabilities).
I can configure my production agents to work with TFS as described here: https://realalm.com/2016/11/25/tfs-2017-build-agent-in-untrusted-domain/
However, I am not permitted to load Visual Studio itself on any production servers. We are trying to use the Release Management and Continuous Deployment capabilities of TFS. However, I don't see how to get the agent capabilities into production as required by the agents.
I thought perhaps to have a workflow that builds/tests in our dev/test/qa environments, drops the files to a location, and then the production agent simply pulls the files and deploys them. But this seems to defeat the idempotency of compiled code and introduces potential for the files to be modified between environments. Also, the production build/release wouldn't have the associated build and test result artifacts and I'd have to backtrack through previous build histories for reporting. This environment is very concerned with compliance and auditing so adversely impacting the reports is a tough sell.
To repeat the question, then, how do I use RM/Build agents in a production environment without installing Visual Studio on the agent machine? We're new to CD so I'm open to the idea that I have the wrong workflow.
Although the build and release agent is the same software, you can create dedicated agent pools of "release" agents that don't have any build concerns installed on them.
Then it's just a matter of choosing the appropriate agent queue when creating a release definition for your production environments. Each environment within a release definition can be configured to run on a different agent queue.
Your build will run once, in any environment you want, and then publish a set of artifacts. This will be on your pool of agents dedicated to building, and the agents in this pool will be configured appropriately.
Your releases will download and deploy those artifacts. These will run on your pool of agents dedicated to deployment.

Team Foundation Server 2017 Build and Release

I'm trying to setup TFS 2017 in my company.
Everything is fine until I came to release tab.
I'm little bit confused.
How on earth I need to deploy everything to my local server. I read a lot of articles regarding this but still confused how to use artifacts.
Right now I have setted up source control and created build definition and stuck on release.
Anybody manage to setup release in TFS 2015 or 2017? Any help would be great!
I found this article that explains how to build and deploy web project on premise. Hope this will help somebody.
Need to use this arguments in Visual Studio Build task
/p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish
/p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True
/p:publishUrl=$(build.artifactstagingdirectory)\for-deploy\website
It will create in Artifacts folder with website that can be simply copied to remote machine in Release definition.
You should view artifacts as single deploy able packages, so if your application has a front end website and a database you can package them up the website as one artifact and the database as another during the build. When it comes to a release, your release could deploy the website to one server and the database to another or even the same server, the choice is yours. I tend to have development environments hosted on a single server but pre-production and production are load balanced, the only change from development to production is the name of the server to deploy the change to.

Continuous Delivery with TFS 2010 and Jenkins?

Our development team uses Visual studio 2013 Pro along with TFS 2010. We need the following abilities for our continous integration / delivery initiative:
1. Automatically build our web project on every checkin.
2. Automatically deploy green builds to development and/or test environments.
3. Provide build/deployment notifications via email.
Extra Credit: Run unit tests with each build.
We don't have a budget, the reason Jenkins is appealing. The setup is new to me and not sure how the pieces fit and what other tools are needed to preform the tasks above?
If you have MSDN subscriptions, you can use TFS for free. TFS 2015 can provide all these features. TFS 2010 can provide most of this as well.
Use a gated checkin or CI build definition in TFS (2010 and 2015) to automatically build on checkin and run tests. The build definition has the option to run tests as part of the build.
Use MSDeploy to package up your components into an automated package. Most people don't know you can use it for more than web applications. (For example, databases)
TFS also provides email alerts on many events.
Regarding automating the deployments, we used separate TFS (in 2010) build definitions to trigger deployments to each environment. Now we use TFS 2015 which supports release definitions that adds many more options.

How to automate the download and installation of Sitecore update packages generated from TFS build?

I am developing a Sitecore solution locally using TDS. Our source control and build server is Visual Studio Team Services (in the cloud). I would like to figure out a way to implement Continuous Integration and get builds to be automatically installed on an Integration server that is an Amazon VM (or it could be some other externally located server). I have the TDS build configuration set up to create a Sitecore Update Package. The build process works great. At the end of the build process I have the Sitecore Update Package sitting in a Drops folder in source control (TFS in the cloud). Now I can't figure out how to automate the process of getting that update package out of source control and downloading it to the Integration server and running the Sitecore command to install it.
In a perfect world you would use something along the lines of a fancy Microsoft Release Management to deploy it to the environment of choice. However, if you are like the majority of us mere mortals without the fancy tools - this should help: https://github.com/adoprog/Sitecore-Deployment-Helpers
With these pages you could just send a get request from TFS or use the logic to write a custom PowerShell post-build script. Hope this helps!
As you are using TFS you get to use Release Management for Visual Studio out of the box. This is a simple install but at this time is separate. I have an instance of RM running in a VM and attached to my VSO instance for running deployments.
I would expect this tool, which was bought by MS last year, would become more integrated in vNext.

Resources