SlideShare a Scribd company logo
1 of 36
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
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
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)

5 must-to-read books on docker
5 must-to-read books on docker5 must-to-read books on docker
5 must-to-read books on docker
 
Building web applications using the web.
Building web applications using the web.Building web applications using the web.
Building web applications using the web.
 
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
Philipp Von Weitershausen   Plone Age  Mammoths, Sabers And Caveen   Cant The...Philipp Von Weitershausen   Plone Age  Mammoths, Sabers And Caveen   Cant The...
Philipp Von Weitershausen Plone Age Mammoths, Sabers And Caveen Cant The...
 
From MVP to a Product
From MVP to a ProductFrom MVP to a Product
From MVP to a Product
 
JupyterHub tutorial at JupyterCon
JupyterHub tutorial at JupyterConJupyterHub tutorial at JupyterCon
JupyterHub tutorial at JupyterCon
 
Using GruntJS
Using GruntJSUsing GruntJS
Using GruntJS
 

Viewers also liked

What does the future hold for us in asp.net 5
What does the future hold for us in asp.net 5What does the future hold for us in asp.net 5
What does the future hold for us in asp.net 5
Tomas Jansson
 
Cpl12 continuous integration
Cpl12 continuous integrationCpl12 continuous integration
Cpl12 continuous integration
Amir Barylko
 

Viewers also liked (9)

F# as our day job by 2016
F# as our day job by 2016F# as our day job by 2016
F# as our day job by 2016
 
What does the future hold for us in asp.net 5
What does the future hold for us in asp.net 5What does the future hold for us in asp.net 5
What does the future hold for us in asp.net 5
 
From coach to owner - What I learned from the other side
From coach to owner - What I learned from the other sideFrom coach to owner - What I learned from the other side
From coach to owner - What I learned from the other side
 
Agile requirements
Agile requirementsAgile requirements
Agile requirements
 
Cpl12 continuous integration
Cpl12 continuous integrationCpl12 continuous integration
Cpl12 continuous integration
 
Iterations-zero-n
Iterations-zero-nIterations-zero-n
Iterations-zero-n
 
Polyglot heaven
Polyglot heavenPolyglot heaven
Polyglot heaven
 
CPL12-Agile-planning
CPL12-Agile-planningCPL12-Agile-planning
CPL12-Agile-planning
 
Enter the Team City
Enter the Team CityEnter the Team City
Enter the Team City
 

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

Puppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax Media
Puppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax MediaPuppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax Media
Puppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax Media
Puppet
 
Puppet Camp Presentation 15
Puppet Camp Presentation 15Puppet Camp Presentation 15
Puppet Camp Presentation 15
Dejan Golja
 

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

Intro to OpenShift, MongoDB Atlas & Live Demo
Intro to OpenShift, MongoDB Atlas & Live DemoIntro to OpenShift, MongoDB Atlas & Live Demo
Intro to OpenShift, MongoDB Atlas & Live Demo
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWS
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Learning Docker with Thomas
Learning Docker with ThomasLearning Docker with Thomas
Learning Docker with Thomas
 
Puppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax Media
Puppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax MediaPuppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax Media
Puppet Camp Sydney 2015: Sneak peek into the Puppet environment at Fairfax Media
 
Getting started with Octopus Deploy
Getting started with Octopus DeployGetting started with Octopus Deploy
Getting started with Octopus Deploy
 
Best Practice in Accelerating Data Applications with Spark+Alluxio
Best Practice in Accelerating Data Applications with Spark+AlluxioBest Practice in Accelerating Data Applications with Spark+Alluxio
Best Practice in Accelerating Data Applications with Spark+Alluxio
 
Apache Mesos at Twitter (Texas LinuxFest 2014)
Apache Mesos at Twitter (Texas LinuxFest 2014)Apache Mesos at Twitter (Texas LinuxFest 2014)
Apache Mesos at Twitter (Texas LinuxFest 2014)
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 
Containers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific TrioContainers, Docker, and Microservices: the Terrific Trio
Containers, Docker, and Microservices: the Terrific Trio
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Puppet Camp Presentation 15
Puppet Camp Presentation 15Puppet Camp Presentation 15
Puppet Camp Presentation 15
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
 
Docker SF Meetup January 2016
Docker SF Meetup January 2016Docker SF Meetup January 2016
Docker SF Meetup January 2016
 
Towards Collaborative Portable Web Spaces
Towards Collaborative Portable Web SpacesTowards Collaborative Portable Web Spaces
Towards Collaborative Portable Web Spaces
 
2014 12-08 - odf plugfest - operations based odf editing with ox documents
2014 12-08 - odf plugfest - operations based odf editing with ox documents2014 12-08 - odf plugfest - operations based odf editing with ox documents
2014 12-08 - odf plugfest - operations based odf editing with ox documents
 
Drupal point of vue
Drupal point of vueDrupal point of vue
Drupal point of vue
 
GAB 2017 NICE - Docker Hands-On-Lab
GAB 2017 NICE - Docker Hands-On-LabGAB 2017 NICE - Docker Hands-On-Lab
GAB 2017 NICE - Docker Hands-On-Lab
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 

More from Tomas Jansson

Deployment taken seriously with Octopus Deploy and TeamCity
Deployment taken seriously with Octopus Deploy and TeamCityDeployment taken seriously with Octopus Deploy and TeamCity
Deployment taken seriously with Octopus Deploy and TeamCity
Tomas Jansson
 

More from Tomas Jansson (9)

Functional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suaveFunctional webapplicaations using fsharp and suave
Functional webapplicaations using fsharp and suave
 
OWIN Web API with Linky
OWIN Web API with LinkyOWIN Web API with Linky
OWIN Web API with Linky
 
Roslyn
RoslynRoslyn
Roslyn
 
Getting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NETGetting started with Elasticsearch and .NET
Getting started with Elasticsearch and .NET
 
Deployment taken seriously with Octopus Deploy and TeamCity
Deployment taken seriously with Octopus Deploy and TeamCityDeployment taken seriously with Octopus Deploy and TeamCity
Deployment taken seriously with Octopus Deploy and TeamCity
 
State or intent
State or intentState or intent
State or intent
 
NServiceBus workshop presentation
NServiceBus workshop presentationNServiceBus workshop presentation
NServiceBus workshop presentation
 
SignalR - Building an async web app with .NET
SignalR - Building an async web app with .NETSignalR - Building an async web app with .NET
SignalR - Building an async web app with .NET
 
REST for .NET - Introduction to ASP.NET Web API
REST for .NET - Introduction to ASP.NET Web APIREST for .NET - Introduction to ASP.NET Web API
REST for .NET - Introduction to ASP.NET Web API
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

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

Editor's Notes

  1. Present thetopic Deployment
  2. Trenger en ny profilbilde
  3. 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
  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. I haven’tevenmentioned risk here,whichalsoshould be takenintoaccount
  6. Things I have deployed: .NET web applications, Web services, EPiServer, SharePoint, Database migrations, Windows Services