27
Ricci Gian Maria [email protected] @alkampfer http://www.codewrecks.com/ http://www.getlatestversion.it/author/alkampfer/ http://blogs.ugidotnet.org/rgm How to deploy .NET applications with TFS Build ALM Deep dive with TFS 2013 #vsalmdeep

Deploy applications with TFS Build

Embed Size (px)

Citation preview

Page 1: Deploy applications with TFS Build

Ricci Gian [email protected]

@alkampfer

http://www.codewrecks.com/http://www.getlatestversion.it/author/alkampfer/http://blogs.ugidotnet.org/rgm

How to deploy .NET applications with TFS Build

ALM Deep dive with TFS 2013

#vsalmdeep

Page 2: Deploy applications with TFS Build

Session Lineup

Deploy or Release??

Why TFS Build

Continuous deployment

Deploy Web Applications

What about my Sql Server Database?

And for other type of Applications (non web)?

#vsalmdeep

Page 3: Deploy applications with TFS Build

Event Sponsor

#vsalmdeep

Page 4: Deploy applications with TFS Build

Deploy or Release?

#vsalmdeep

Deploy

The act of installing software in a set of computers

Does not requires accounting or ownership

Release

The act of making software available downstream

Monitored and repeatable process

Multi-stage process

Page 5: Deploy applications with TFS Build

Why continuous deployment?

#vsalmdeep

No error made by manual procedures

Is a good deploy documentation

Consistent

Repetable

Automated

Verified and testable

Page 6: Deploy applications with TFS Build

TFS Build or….

#vsalmdeep

TFSBuild Agent Environment

Page 7: Deploy applications with TFS Build

Release Management?

#vsalmdeep

TFS Build Package

RM

Page 8: Deploy applications with TFS Build

Why using Build?

#vsalmdeep

Pro

No additional cost or license

Simpler to setup

Already in place for CI

Cons

Lesser pre-built actions

Does not support pipelines

Push process instead of pull process

Page 9: Deploy applications with TFS Build

What is behind Azure publising?

#vsalmdeep

Lots of options

We will focus on VSO/TFS integration

Page 10: Deploy applications with TFS Build

DEMODeploy to Azure Web Site

#vsalmdeep

Page 11: Deploy applications with TFS Build

What is behind Azure publising?

#vsalmdeep

Page 12: Deploy applications with TFS Build

What is behind Azure publising?

#vsalmdeep

VSO/TFS Build

agent

Azure Web Site

Page 13: Deploy applications with TFS Build

Why Vso and not Git/dropbox/…?

#vsalmdeep

Automatic trigger (scheduled, each check-in, gatedcheck-in, etc)

Fully extensible as every build

Centralized log

Binary in Drop folder

Publishing of Symbol Source

Integrated with all TFS World (es: feedback tool)

Page 14: Deploy applications with TFS Build

What about on-premise?

#vsalmdeep

All combinations of infrastructure are possible

VSO + Elastic Build + Azure site (default)

VSO + Build on premise + Azure Web Site

TFS and Build on premise + Azure Web Site

VSO + Build on premise + local IIS web site

TFS and Build on premise + local IIS web site

Page 15: Deploy applications with TFS Build

DEMOChange build to publish to IIS

#vsalmdeep

Page 16: Deploy applications with TFS Build

What about my sql server DB?

#vsalmdeep

Sql Server (and all SQL) bring some pain for deploy

Store latest schema changes with code (sourcecontrolled)

Verify new schema is valid before deployment

Update an existing database with latest schemawithout touching data

Deploy the schema even if someone had mademanual changes from last deploy

Deploy some static data in certain tables

Ensure some test data for test environments

Page 17: Deploy applications with TFS Build

Database projects to the rescue

#vsalmdeep

A db project uniforms database development tonormal code development

A single project in visual studio

Compile to Data-tier application and Deployable

Build agentDAC

Page 18: Deploy applications with TFS Build

DEMODeploy with Database projects

#vsalmdeep

Page 19: Deploy applications with TFS Build

Fail as soon as possible

#vsalmdeep

Minimize time from when a bug is introduced in codeto the time this bug is discovered

Fail as soon as possible

You need automatic testing

Unit test

Integration test

Performance test

User acceptance test

etc

Page 20: Deploy applications with TFS Build

What to test?

#vsalmdeep

Integration, performance, acceptance test need fulltest environments

Continuous deployment helps to keep theseenvironments aligned with latest bits

You can run Automatic Tests against theseenvironments to immediately detect problems insoftware.

Page 21: Deploy applications with TFS Build

DEMOBuild – deploy – performance test with TFS and

VS web performance tests

#vsalmdeep

Page 22: Deploy applications with TFS Build

Click-once

#vsalmdeep

Standard desktop application can be published withclick once

Build should be customized at least in two points

Before the build takes place

generate assembly file number incrementally

After the build takes place

publish click once application locally in the buildserver

Use mage.exe to modify publish (optional)

Move published file in the definitive location

Page 23: Deploy applications with TFS Build

DEMODeploy click once application using console

application

#vsalmdeep

Page 24: Deploy applications with TFS Build

Nuget packages

#vsalmdeep

Private or public nugget servers are exceptional toshare common dll

Build should be customized at least in two points

Before the build takes place

generate assembly file number incrementally

After the build takes place

Generate nuget packages on the build server

Push packages to the nuget server

Page 25: Deploy applications with TFS Build

TFS 2013 new workflow

#vsalmdeep

Simplified Workflow

Easily customizable

Extensible out-of-the-box with scripts (es PowerShell)

Page 26: Deploy applications with TFS Build

DEMOPublish nuget packages with new TFS 2013

build workflow and powershell

#vsalmdeep

Page 27: Deploy applications with TFS Build

Questions?

?#vsalmdeep