SlideShare a Scribd company logo
FILE -> NEW PROJECT TO
DEPLOY IN 10 MINUTES WITH
TEAMCITY AND OCTOPUS
DEPLOY
(and PowerShell)

London/NDC London

Tomas Jansson
06/12/2013
Tomas Jansson
Manager & .NET Group Lead
BEKK Oslo
Norwegian .NET User Group
@TomasJansson
tomas.jansson@bekk.no
github.com/mastoj
blog.tomasjansson.com
My story
What I
didn’t see I
didn’t know

http://www.thewallpapers.org/photo/23036/Meadow-And-Trees.jpg
One day I
did the
deploy

http://1.bp.blogspot.com/-AuV-3M279Yw/TvFwqK2SJFI/AAAAAAAAPss/avHyNeySJwU/s1600/recipes+002.JPG
But the
result!

http://th05.deviantart.net/fs34/PRE/f/2008/294/9/5/Messy_kid_by_Hollie32.jpg
Tomas angry

http://subcultureforthecultured.com/wp-content/uploads/2012/05/hulk1.jpg
File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy
The result!

http://img.directindustry.com/images_di/photo-g/blister-packaging-machines-60364-2546945.jpg
WHAT I WANT YOU TO EXPERIENCE TODAY

Some tips and tricks for Teamcity
Experience Octopusdeploy
Get to appreciate PowerShell
File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy
WHY CONTINUOUS DEPLOYMENT?

Bug impact

Features

Time

Shorter time between releases
 smaller impact

New features faster 
happier customers and
improved learning

Automated deploy  more
time for development and
happier developers
WHY CONTINUOUS DEPLOYMENT?

Bug impact

Money

Time

Shorter time between releases
 smaller impact

New features faster 
happier customers and
improved learning

Automated deploy  more
time for development
WHERE SHOULD I START?

Visualize what is needed for you to make a complete deployment

Build

Test

(5 min)

(5 min)

Provision
server
(1 hr)

Deploy
(20 min)

Then ask the following questions:
•

How often do I do each step during a day/week/month?

•

Which step can I improve?

My guess is; build, test, deploy and last provision of server
WHAT CAN I DO?

Build

Test

Deploy

Smaller solutions

Minimize DB-test/test setup

Clear artifacts

Decouple projects

Minimize network traffic

Automated deploy

Optimize code

Repetitive

Parallel testing
Repetitive

The
Goal
Automated

One
artifact
CONCEPTUAL SETUP

Dev

Test

Developers

Deployment
manager

Prod

VCS

Build server

Artifact repository
THE GOAL
Tools

http://api.ning.com/files/wi*oWNYzff-TE0NdSZQIetMjtPWOTyiTLnYIS91gI2PE-zRWP1h2dBj79yb-nK0AghzWRpShzOmdbE9LsAnGLqa1M*u8zGMs/Swiss_Giant.jpg
TEAMCITY

Continuous integration engine
JetBrains
Free for small teams
KEY FEATURES: TEAMCITY

Templating

Build template

Project X
Project X
Project X
Build Project X

Dependencies

Deploy template

Project X
Project X
Project X
Deploy Project X

You can start using conventions
for build and deploy

Build Project X

Deploy Project X
OCTOPUS DEPLOY

Automated deployment for .NET (Windows)
•

Created by Paul Stovell (@paulstovell)

•

Targeting .NET

•

Currently in v 2.0 public beta
NUGET & OCTOPUS DEPLOY
NUGET & OCTOPUS DEPLOY

Pull deploy
from v 2.0!
Octopus deploy is eating
their own dog food since
v 2.0.
Web application is using
the public REST API.

http://petcountrysupplies.co.uk/Dog%20Shop%20images/Dog%20Food/Dog%20Food.jpg
OCTOPUS DEPLOY PROCESS

•
•

Pre
deploy
•

Run transformations of
config files

•

Octopus does IIS setup

Check environment

•

Configure environment

•

Copy files needed for deploy

•

PostDeploy.ps1

•

Delete files

•

Clean up

Deploy.ps1

•

PreDeploy.ps1

PowerShell is
the key to
great success!

Deploy

Post
deploy
OCTOPUS CONCEPTS

Environments

Roles

An environment contains one or many machines

Defines where to deploy

Adding a machine is done in one place instead of
in every project

Multiple machines can have the same role in one
environment  deploy to multiple machines at
once
OCTOPUS CONCEPTS

Project groups

Project

A collection of projects

Definition of what to deploy

Map environment to project groups

One project can multiple deploy steps

Great if you have multiple customers

A step can:
•

Deploy a NuGet package

•

Run a PowerShell script

•

Send an email

•

Require manual intervention

•

Deploy to Windows Azure

•

Upload files by FTP

Variables can be configured per environment,
role, machine and/or step
OCTOPUS CONCEPTS

Release package

Deploy

A definition of a release

An actual deploy of a release

Has a version number
Contains specific packages (version can differ
from release version)
PowerShell
GETTINGS STARTED WITH PROGRAMMING IIS IN POWERSHELL

> Import-Module WebAdministration
> $iisAppPoolsPath = "IIS:AppPoolsMyAppPool"
> New-Item $iisAppPoolsPath
Name
---MyAppPool

State
----Started

Applications
------------

> $iisSitesPath = "IIS:SitesMySite"
> New-Item $iisSitesPath -bindings @{protocol="http";bindingInformation="*:8321:*"}
-physicalPath "c:tmp"
Name
---MySite

ID
-5

State
----Stopped

Physical Path
------------c:tmp

Bindings
-------http *:8321:*

> Set-ItemProperty $iisSitesPath -name applicationPool -value "MyAppPool"
> Start-Website "MySite"
BETA Demo!

http://www.mrwallpaper.com/wallpapers/despicable-me-hitman-minion-1920x1080.jpg
SUMMARY

•

Continuous deployment doesn’t have to be hard

•

The right tools will help you a long way (TeamCity and Octopus deploy)

•

Learn PowerShell, it will make your life easier
RESOURCES

Blog post about the setup: http://tinyurl.com/PowerOctoTeam
Octopus Deploy: http://www.octopusdeploy.com
TeamCity: http://www.jetbrains.com/teamcity/
OctoWebSetup GitHub project: https://github.com/mastoj/OctoWebSetup
OctoWebSetup NuGet download: https://nuget.org/packages/OctoWebSetup/
Octopusdeploy automation script: https://gist.github.com/mastoj/7746853
Questions?
Thank you!
@TomasJansson

More Related Content

What's hot (6)

PDF
5 must-to-read books on docker
Ganesh Samarthyam
 
PDF
Building web applications using the web.
Christian Heilmann
 
PDF
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
Vincenzo Barone
 
PDF
From MVP to a Product
Justyna Wojtczak
 
PDF
JupyterHub tutorial at JupyterCon
Carol Willing
 
PDF
Using GruntJS
Egor Miasnikov
 
5 must-to-read books on docker
Ganesh Samarthyam
 
Building web applications using the web.
Christian Heilmann
 
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
Vincenzo Barone
 
From MVP to a Product
Justyna Wojtczak
 
JupyterHub tutorial at JupyterCon
Carol Willing
 
Using GruntJS
Egor Miasnikov
 

Viewers also liked (9)

PPTX
F# as our day job by 2016
Tomas Jansson
 
PPTX
What does the future hold for us in asp.net 5
Tomas Jansson
 
PDF
From coach to owner - What I learned from the other side
Amir Barylko
 
PDF
Agile requirements
Amir Barylko
 
PDF
Cpl12 continuous integration
Amir Barylko
 
PDF
Iterations-zero-n
Amir Barylko
 
PPTX
Polyglot heaven
Tomas Jansson
 
PDF
CPL12-Agile-planning
Amir Barylko
 
PPT
Enter the Team City
Kashif Ali Siddiqui
 
F# as our day job by 2016
Tomas Jansson
 
What does the future hold for us in asp.net 5
Tomas Jansson
 
From coach to owner - What I learned from the other side
Amir Barylko
 
Agile requirements
Amir Barylko
 
Cpl12 continuous integration
Amir Barylko
 
Iterations-zero-n
Amir Barylko
 
Polyglot heaven
Tomas Jansson
 
CPL12-Agile-planning
Amir Barylko
 
Enter the Team City
Kashif Ali Siddiqui
 
Ad

Similar to File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy (20)

PPTX
Deployment taken seriously with Octopus Deploy and TeamCity
Tomas Jansson
 
PPTX
Smarter deployments with octopus deploy
Thibaud Gravrand
 
PPTX
Getting started with Octopus Deploy
Karoline Klever
 
PDF
Octopus Deploy Tech Fest 2014
adriantwright
 
PPTX
Automated release management - DevConFu 2014
Kristoffer Deinoff
 
PPTX
Automated release management with team city & octopusdeploy - NDC 2013
Kristoffer Deinoff
 
PPTX
Octopus Deploy @Erie Day of Code
Cassey Lottman
 
PPTX
AzureDay Kyiv 2016 Release Management
Sergii Kryshtop
 
PPTX
Continuous Delivery with TFS msbuild msdeploy
Peter Gfader
 
PPTX
XP Days Ukraine 2016 Building CD Pipeline in Azure
Sergii Kryshtop
 
PPTX
Harish Aspnet Deployment
rsnarayanan
 
PPTX
Web deploy
Larry Nung
 
PPTX
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Is Antipov
 
PDF
How to deploy to production 10 times per day v2 for Levi9
Andrii Shumada
 
PDF
Deployment Strategies Powerpoint Presentation Slides
SlideTeam
 
PPTX
Maksym Khamrovskyi, Kostiantyn Averin "Octopus: on the way to deployment bril...
Fwdays
 
PPTX
JSS build and deployment
David Szöke
 
PPTX
Romulus crisan + radu pascal click'n'deploy
Codecamp Romania
 
PPTX
Mule tcat server - deploying applications
Shanky Gupta
 
PDF
Automating AWS And Azure Resources with Octopus Deploy
Ebru Cucen Çüçen
 
Deployment taken seriously with Octopus Deploy and TeamCity
Tomas Jansson
 
Smarter deployments with octopus deploy
Thibaud Gravrand
 
Getting started with Octopus Deploy
Karoline Klever
 
Octopus Deploy Tech Fest 2014
adriantwright
 
Automated release management - DevConFu 2014
Kristoffer Deinoff
 
Automated release management with team city & octopusdeploy - NDC 2013
Kristoffer Deinoff
 
Octopus Deploy @Erie Day of Code
Cassey Lottman
 
AzureDay Kyiv 2016 Release Management
Sergii Kryshtop
 
Continuous Delivery with TFS msbuild msdeploy
Peter Gfader
 
XP Days Ukraine 2016 Building CD Pipeline in Azure
Sergii Kryshtop
 
Harish Aspnet Deployment
rsnarayanan
 
Web deploy
Larry Nung
 
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Is Antipov
 
How to deploy to production 10 times per day v2 for Levi9
Andrii Shumada
 
Deployment Strategies Powerpoint Presentation Slides
SlideTeam
 
Maksym Khamrovskyi, Kostiantyn Averin "Octopus: on the way to deployment bril...
Fwdays
 
JSS build and deployment
David Szöke
 
Romulus crisan + radu pascal click'n'deploy
Codecamp Romania
 
Mule tcat server - deploying applications
Shanky Gupta
 
Automating AWS And Azure Resources with Octopus Deploy
Ebru Cucen Çüçen
 
Ad

More from Tomas Jansson (8)

PPTX
Functional webapplicaations using fsharp and suave
Tomas Jansson
 
PPTX
OWIN Web API with Linky
Tomas Jansson
 
PPTX
Roslyn
Tomas Jansson
 
PPTX
Getting started with Elasticsearch and .NET
Tomas Jansson
 
PPTX
State or intent
Tomas Jansson
 
PPTX
NServiceBus workshop presentation
Tomas Jansson
 
PPTX
SignalR - Building an async web app with .NET
Tomas Jansson
 
PPTX
REST for .NET - Introduction to ASP.NET Web API
Tomas Jansson
 
Functional webapplicaations using fsharp and suave
Tomas Jansson
 
OWIN Web API with Linky
Tomas Jansson
 
Getting started with Elasticsearch and .NET
Tomas Jansson
 
State or intent
Tomas Jansson
 
NServiceBus workshop presentation
Tomas Jansson
 
SignalR - Building an async web app with .NET
Tomas Jansson
 
REST for .NET - Introduction to ASP.NET Web API
Tomas Jansson
 

Recently uploaded (20)

PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
July Patch Tuesday
Ivanti
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
July Patch Tuesday
Ivanti
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Python basic programing language for automation
DanialHabibi2
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 

File -> new project to deploy in 10 minutes with TeamCity and Octopus Deploy

Editor's Notes

  • #2: Present thetopic Deployment
  • #3: Trenger en ny profilbilde
  • #4: Minimizeimpactofbugs long lead time thebugswill have more affect and youneed to take more seriousdecisionaboutwhat to doMinimize time for fix automated (fast) deploy makes it easier to release a fix fasterMore time for whatyouaresupposed to do
  • #5: Minimizeimpactofbugs long lead time thebugswill have more affect and youneed to take more seriousdecisionaboutwhat to doMinimize time for fix automated (fast) deploy makes it easier to release a fix fasterMore time for whatyouaresupposed to do
  • #6: I haven’tevenmentioned risk here,whichalsoshould be takenintoaccount
  • #7: Things I have deployed: .NET web applications, Web services, EPiServer, SharePoint, Database migrations, Windows Services