Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stress Free Deployments with Octopus Deploy

Similar presentations


Presentation on theme: "Stress Free Deployments with Octopus Deploy"— Presentation transcript:

1 Stress Free Deployments with Octopus Deploy
Presented by Andy Schwam

2 Andy Schwam Microsoft MVP Since 2010 ASPInsider
Visual Studio and Development Technologies ASPInsider Manager of Custom Application Global Indemnity I like to code! I like DevOps! I don’t like dealing with problems

3

4 Octopus Deploy From OctopusDeploy.com:
“Octopus is a friendly deployment automation tool for .NET developers.” “Octopus works with your build server to enable reliable, secure, automated releases of ASP.NET applications and Windows Services into test, staging and production environments, whether they are in the cloud or on-premises.” “You already have a source control server and a build server. Octopus doesn't replace them; it takes over where they finish off. Build/CI servers are great at compiling code and running tests. Octopus is great at taking the built artifacts, and configuring and distributing them to all the machines and environments that they need to run in.” Yes, they have a free version

5 What Octopus does/doesn't to
Build/Compile Test Package Add features to your application Deploy Configure Retain Logs Dashboard

6 Why are automated deployments important?
Do you like dealing with problems after a deployment? Adds a lot of stress Time consuming We (humans, developers) make mistakes Less Error Prone Take Less Time Easier Set up automation as soon as you create your new project.

7 Deploy Anything- Degrees of “easiness”
Web Applications Windows Services Virtual Directories ?? PowerShell* Ridiculously Easy Very Easy *in other words, do anything :)

8

9 Installation Install Octopus Deploy Server
Install Tentacles – deployment agents on target machines

10 Preparation Here is what I did prior to this demo:
Created a VS Solution/Web Application Added my solution to Source Control – TFS Set up a Continuous Integration build in TFS The build pushes packages into Octopus NOTE: My Laptop = Octopus Server, all tentacles and “servers”

11 First Demo Let’s see how easy it is to use Octopus
Create new Octopus Project

12 Environments and Targets
SysTest Systest1 QA QA1 UAT UAT1 UAT2 Production Prod1 Prod2 Prod3

13 Machine Roles Define the “usage” of a server.
Important because not every app goes to every server External Web Apps External Web Services Internal Web Apps Intranet AppServer We need to re-think our current roles

14 Environments, Targets and Roles
SysTest Systest1 Intranet PublicSites Services QA QA1 Intranet  PublicSites  Services  UAT UAT1 Intranet   PublicSites   Services   UAT2 Production Prod1 Prod2 Prod3

15 Re-use Machine QA1 UAT1 UAT2 Prod1 Prod2 Prod3 SysTest QA UAT
Production Prod1 Prod2 Prod3

16

17 Projects Octopus Project != Visual Studio Project
A deployment process, which specifies the steps that need to happen in a given order during the deployment Variables, which allow deployments to be parameterized across environments Process Update Database Deploy Backend Services  Deploy Web Application Send  Variables DB Connection = "abc" (QA) DB Connection = "xyz" (Prod) 

18 Demo .config Files Variables

19 Variables Scope Sensitive variables Environment Role Target Step
Channel Sensitive variables

20 Configuration Files Uses variables defined in Octopus *.config:
appSettings, applicationSettings, connection strings automatically replaced Others can be done too. Config Transforms

21 Lifecycles FULL QA-PROD SysTest QA UAT Production Faux QA Production

22 Some Additional Features
Scheduled Deployments Scripts

23 TFS Build Integration Prior to TFS 2015: TFS 2015/2017:
Publishing Packages to Octopus is easy too… Use TFS or some other Build system Prior to TFS 2015: Add OctoPack via Nuget to your app Set MSBuild Args in your build configuration TFS 2015/2017: Add a Package Application step Add a Push Packages to Octopus step

24 Trigger OctoPack from TFS < 2013

25 More Features Build Number Sync Create Release Automatically
Deploy to Target Automatically Retention Policy

26 Database Deployments Use DB UP Create console app
Set db connection string Add Nuget package: DbUp Update Program.cs Add Deploy.ps1

27 Channels Allows for deployment of same project using different Lifecycles Version Rules to enforce usage of correct Channel Normal releases Hotfixes Channel Scope can be used for Variables and Steps

28 Demo - Hotfixes Create a Hotfix build for Hotfix Branch
Use "-hotfix" for Package Step and Push Step Create Hotfix Lifecycle Channels: Default pre-release tag: ^$ Hotfix pre-release tag: hotfix

29 Running Scripts Scripts in Packages Scripts in Package Steps
PreDeploy.<ext> Deploy.<ext> PostDeploy.<ext> DeployFailed.<ext> Scripts in Package Steps Standalone Scripts Variables, Parameters, Logging, Output Variables

30 DEMO…

31 More Step Templates Guided Failures Scheduled Deployments
Automatic Release Creation Automatic Deployment Triggers Dashboard Project Groups Security – Teams, Roles, etc Among other things…You can define who can deploy apps to each environment

32 Thanks Any Questions? andy@ingenuitynow.net www.schwammysays.net

33 MORE The following slides never made it into the presentation

34 Deployment Targets Listening Tentacle
Polling Tentacle (sometimes needed to work around firewall issues) Offline Package Drop (machines that don’t run Tentacle) SSH Connection (for Linux) Cloud Region (deploy to Azure)

35 Packages Only binaries and files needed at runtime are included – no source code NuGet Packages Use OctoPack or VSTS extension Octopus 3.3 supports Zip Packages Octopus 3.5 supports Docker Images

36 Releases and Deployments
A release is a snapshot of the process and variables. Releases are deployed to Environments

37 Deployment - Project Define the Steps for the deployment
Web Deploy Update Database Run a script Send Manual Intervention Steps can be scoped to environment, machine, etc.

38 Access to Production Custom Security Roles
Developers can’t deploy to Production Sys Admins can deploy to Production Developers can create variables for Production Sys Admins mark variables sensitive


Download ppt "Stress Free Deployments with Octopus Deploy"

Similar presentations


Ads by Google