automated deployment with umbraco - proworks · automated deployment with umbraco mark bowser...
TRANSCRIPT
![Page 1: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/1.jpg)
Automated Deployment With Umbraco
Mark Bowser uWestFest ‘16 - San Diego, CA
![Page 2: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/2.jpg)
Mark Bowser Full Stack Web Developer
![Page 3: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/3.jpg)
Corvallis
![Page 4: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/4.jpg)
Goals
Not go too deep into techical
side
Show how the pieces work
together
Inspire people to try it out
![Page 5: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/5.jpg)
What does it take?
Branching strategy
TeamCity
Octopus Deploy
uSync?
MORE !?
![Page 6: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/6.jpg)
Why bother? Consistency
Reinfores good habits
Gateway to automated testing
Speedy deploys
Easy setup*
![Page 7: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/7.jpg)
Branching Strategy
![Page 8: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/8.jpg)
Feature Branches
Solves problems with:
• Large features
• Unapproved features
![Page 9: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/9.jpg)
master
F-1
F-2
dev
![Page 10: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/10.jpg)
Branch Naming
![Page 11: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/11.jpg)
Branch Naming
![Page 12: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/12.jpg)
Build Server
![Page 13: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/13.jpg)
Pulls from source
control
Builds project
Runs tests
Deploy?
Build Server
![Page 14: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/14.jpg)
Projects and Build Configurations
Nested Project Structure
Build Configurations
• Version Control Settings
• Build Triggers
• Build Steps
![Page 15: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/15.jpg)
Version Control Settings Git
Mercurial
TFS
Subversion
CVS
Other…
![Page 16: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/16.jpg)
Build Triggers
Manual (no trigger)
On commit
Scheduled
Other?
![Page 17: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/17.jpg)
Build Steps
MSBuild
Run Unit Tests
Run Commandline?
![Page 18: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/18.jpg)
So how do we actually
deploy stuff?
![Page 19: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/19.jpg)
MSBuild + WebDeploy
1. Install Web Deploy on server
2. Deal with windows service has
permissions
3. Create users on source and
dest machines
4. Deal with mostly vague
TeamCity errors
![Page 20: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/20.jpg)
I no longer recommend Web
Deploy
Complex. Easy to miss little things.
Vague error messages
No easy rollback
There is a better way!
![Page 21: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/21.jpg)
Octopus Deploy
![Page 22: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/22.jpg)
Not a build server
Consumes nuget feeds
Handles deployment
![Page 23: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/23.jpg)
Easier than Web Deploy
Good at rolling back
Very good documentation
Why Octopus?
![Page 24: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/24.jpg)
1. Consumes nuget feed
2. Creates Release
3. Deploys to new folder
4. Points IIS to that folder
5. Fixes permissions
What does an Octopus deploy
look like?
![Page 25: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/25.jpg)
TeamCity + Octopus Deploy Implementation
With our powers combined!
![Page 26: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/26.jpg)
1. Umbraco project configured to
be packaged into NuGet
2. Media set up in Virtual
Directory
3. TeamCity = NuGet Server
4. Octopus deploys NuGet
packages
Four Steps
![Page 27: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/27.jpg)
1. Nuget OctoPack
2. Create nuspec file Preparing Umbraco
for NuGet packaging
“Install-Package OctoPack”
![Page 28: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/28.jpg)
1. New SharedMedia directory
outside of umbraco
2. New Virtual Directory pointing
to SharedMedia
Umbraco Media in Virtual Directory
![Page 29: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/29.jpg)
1. Install Octopus Deploy Integration
plugin
2. Enable NuGet Server
3. OctoPackEnforceAddingFiles=true
4. MSBuild step should check “Run
OctoPack”
5. New “Octopus Deploy: Create
Release” build step
TeamCity NuGet Server
![Page 30: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/30.jpg)
1. Add an “External Feed” for
TeamCity Nuget Server
2. Script template for fixing
Umbraco permissions
3. New “Deploy Package” step
4. New “Fix Permissions” step
Prepare Octopus Deploy
![Page 31: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/31.jpg)
Pros of UaaS:
• Really easy to spin up new sites
• Handles content deployment as
well as code deployment
Pros of TeamCity + Octopus:
• More control
• Probably supports more exotic
setups
TeamCity + Octopus vs
UaaS?
![Page 33: Automated Deployment With Umbraco - ProWorks · Automated Deployment With Umbraco Mark Bowser uWestFest ‘16 - San Diego, CA . Mark Bowser Full Stack Web Developer . Corvallis](https://reader030.vdocument.in/reader030/viewer/2022040914/5e8ab4b6c36ab70fbf6d5ce8/html5/thumbnails/33.jpg)
Big pieces of Octopus:
• Tentacles
• Releases
• Environments
• Lifecycles
• Projects
• Channels
More on Octopus