Category Archives: Release Management

Dzone Guide to Continuous Delivery from @AgileSteveSmith & @Matthewpskelton

Our good friends and organisers of PipelineConf @AgileSteveSmith and @Matthewpskelton have contributed to the DZone Guide to Continuous Delivery.

The guide covers:

  1. SUMMARY & HIGHLIGHTS
  2. KEY RESEARCH FINDINGS
  3. INTRODUCING: CONTINUOUS DELIVERY BY STEVE SMITH
  4. CONTINUOUS DELIVERY PITFALLS BY J. PAUL REED
  5. THE CONTINUOUS DELIVERY TOOLCHAIN BY MATTHEW SKELTON
  6. CONTINUOUS DELIVERY VISUALIZED
  7. INFRASTRUCTURE AS CODE: WHEN AUTOMATION ISN’T ENOUGH BY MITCH PRONSCHINSKE
  8. CONTINUOUS DELIVERY MATURITY CHECKLIST

Dzone 2014 CD guideWell worth a read!

 

Upgrading to Octopus 2.0

On 20th December 2013, Paul Stovell and the Octopus Team released Octopus Deploy 2.0. We’ve had a chance to play with the product for sometime, and it’s a great next version.

Here’s 5 great reasons to upgrade;

  1. Configurable Dashboards
  2. Sensitive variables
  3. Polling Tentacles (Pull or Push)
  4. IIS website and application pool configuration
  5. Rolling deployments

So let’s take a look at how the upgrade process works.

Step 1 – Backup your existing database

Things to check before you upgrade;

  1. Your administrator username and password (especially, if you are not using Active Directory)
  2. Before attempting to migrate, make sure that you don’t have any projects, environments, or machines with duplicated names (this is no longer allowed in Octopus 2.0, and the migration wizard will report an error if it finds duplicates).
  3. IIS Configuration. Are you using ARR or rewrite rules of any kind.
  4. SMTP Server Settings (these are not kept in upgrade)

The first step is to ensure that you have a  recent database backup that you can restore in case anything goes wrong.

1 - Database Backup

Confirm the location of your backup file. You’ll need this file at a later stage in the upgrade process (and if anything goes wrong)

2-Database Backup Location

Step 2 – Install Octopus 2.0

Download the latest installer MSI from the Octopus Website at http://octopusdeploy.com/downloads

Next follow the installer instructions and the Octopus Manager process. This process is really straight forward, and if you’ve installed Octopus before you’ll be familiar with most of the process. There’s a great video here on how to install Octopus http://docs.octopusdeploy.com/display/OD/Installing+Octopus

Step 3 – Import Previous Octopus Database

Once you’ve installed Octopus 2.0, you’ll most likely want to import your old v1.6 database with all your existing configuration. To do this, select the “import from Octopus 1.6″ option and choose the database back-up from the process you followed in step 1 and follow the instructions.

3 - Import Octopus Database

Step 4 – Post Upgrade Steps (server)

When you have completed the installation it’s essential to task a copy of the master key for backups. Instructions on how to backup the key can be found here http://docs.octopusdeploy.com/display/OD/Security+and+encryption

Once you have the server installed there’s a couple of items you’ll need to configure again.

  1. SMTP Server Settings are not kept, so these will need to be re-entered.

Step 5 – Upgrading Tentacles

If you are upgrading from version 1.6 – Octopus 2.0 server can no longer communicate with Tentacle 1.6. So in addition to upgrading Octopus, you’ll also need to upgrade any Tentacles manually. There are two ways to achieve this;

1. Download and Install the new Octopus Deploy Tentacle MSI on each target server

2. Use  a PowerShell script to download the latest Tentacle MSI, install it, import the X.509 certificate used for Tentacle 1.6, and configure it in listening mode. The powershell script is as follows;

function Upgrade-Tentacle
{ 
  Write-Output "Beginning Tentacle installation"
  Write-Output "Downloading Octopus Tentacle MSI..."
  $downloader = new-object System.Net.WebClient
  $downloader.DownloadFile("http://download.octopusdeploy.com/octopus/Octopus.Tentacle.2.0.5.933.msi", "Tentacle.msi")
  
  Write-Output "Installing MSI"
  $msiExitCode = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/i Tentacle.msi /quiet" -Wait -Passthru).ExitCode
  Write-Output "Tentacle MSI installer returned exit code $msiExitCode"
  if ($msiExitCode -ne 0) {
    throw "Installation aborted"
  }
  
  Write-Output "Configuring and registering Tentacle"
   
  cd "${env:ProgramFiles(x86)}\Octopus Tentacle 2.0\Agent"
  Write-Output "Stopping the 1.0 Tentacle"
  
  & .\tentacle.exe create-instance --instance "Tentacle" --config "${env:SystemDrive}\Octopus\Tentacle\Tentacle.config" --console
  & .\tentacle.exe configure --instance "Tentacle" --home "${env:SystemDrive}\Octopus" --console
  & .\tentacle.exe configure --instance "Tentacle" --app "${env:SystemDrive}\Octopus\Applications" --console
  & .\tentacle.exe configure --instance "Tentacle" --port "10933" --console
  & .\tentacle.exe import-certificate --instance "Tentacle" --from-registry  --console
  Write-Output "Stopping the 1.0 Tentacle"
  Stop-Service "Tentacle"
  Write-Output "Starting the 2.0 Tentacle"
  & .\tentacle.exe service --instance "Tentacle" --install --start --console
  
  Write-Output "Tentacle commands complete"
}
  
Upgrade-Tentacle

Step 6 – Upgrade TeamCity Integration

The JetBrains TeamCity Plugin has also been released and requires an upgrade. To do this

  1. Download the plugin from the Octopus Website http://octopusdeploy.com/downloads.
  2. Shutdown the TeamCity server.
  3. Copy the zip archive (Octopus.TeamCity.zip) with the plugin into the <TeamCity Data Directory>/plugins directory.
  4. Start the TeamCity server: the plugin files will be unpacked and processed automatically. The plugin will be available in the Plugins List in the Administration area.

Please Note: The API Key’s for the users will have changed and will need to be re-entered into the Octopus Deploy Runner Configuration within the Build Step

Summary

We think that overall the Octopus Team have done a great job making the upgrade process easy. There’s still a few little issues to iron out, but overall the process is robust and simple. It’s a shame that automatic upgrade of the tentacles couldn’t have been supported as this may cause pain for customers with a large server install base, but Powershell automation makes for a great workaround.

As we learn more about Octopus 2.0, we’ll continue to let you know what we find. Good Luck with Upgrading — it’s definitely worth it!

DevOpsGuys use Octopus Deploy to deliver automated deployment solutions – ensuring frequent, low-risk software releases into multiple environments. Our engineers have deployed thousands of software releases using Octopus Deploy and we can help you do the same. Contact us today – we’d be more than happy to help.

Continuous Integration & Delivery – Christmas Reading Essentials

Continuous Integration: Improving Software Quality and Reducing Risk
Continuous Integration: Improving Software Quality and Reducing Risk
by Paul M. DuvallSteve MatyasAndrew Glover
Learn more

Add to Wish List

Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler))
Continuous Delivery: Reliable Software Releases through Build…
by Jez HumbleDavid Farley
Learn more

Add to Wish List

Agile Testing: A Practical Guide for Testers and Agile Teams
Agile Testing: A Practical Guide for Testers and Agile Teams
by Lisa CrispinJanet Gregory
Learn more

Add to Wish List

Continuous Delivery and DevOps: A Quickstart guide
Continuous Delivery and DevOps: A Quickstart guide
by Paul Swartout
Learn more

Add to Wish List

Test Driven Development: By Example
Test Driven Development: By Example
by Kent Beck
Learn more

Add to Wish List

Jenkins Continuous Integration Cookbook
Jenkins Continuous Integration Cookbook
by Alan Berg
Learn more

Add to Wish List

How Google Tests Software
How Google Tests Software
by James A. WhittakerJason ArbonJeff Carollo
Learn more

Add to Wish List

Jenkins: The Definitive Guide
Jenkins: The Definitive Guide
by John Ferguson Smart
Learn more

Add to Wish List

Growing Object-Oriented Software, Guided by Tests
Growing Object-Oriented Software, Guided by Tests
by Steve FreemanNat Pryce
Learn more

Add to Wish List

Succeeding with Agile: Software Development Using Scrum
Succeeding with Agile: Software Development Using Scrum
by Mike Cohn
Learn more

Add to Wish List

User Stories Applied: For Agile Software Development
User Stories Applied: For Agile Software Development
by Mike Cohn
Learn more

Add to Wish List

Refactoring to Patterns
Refactoring to Patterns
by Joshua Kerievsky
Learn more

Add to Wish List

Essential Scrum: A Practical Guide to the Most Popular Agile Process (Addison-Wesley Signature Series (Cohn))
Essential Scrum: A Practical Guide to the Most Popular Agile…
by Kenneth S. Rubin
Learn more

Add to Wish List

Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL and RESTful Web Services
Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL…
by Robert Daigneau
Learn more

Add to Wish List

Web Operations: Keeping the Data On Time
Web Operations: Keeping the Data On Time
by John AllspawJesse Robbins

Maturing the Continuous Delivery Pipeline

The Maturity Model is a useful assessment tool for understanding your organizations level of Continuous Delivery adoption. Many organizations today have achieved what is needed to move from Level-1 (Regressive) to Level-0 (Repeatable), which is a significant accomplishment and as a reader of this blog post, you’re either about to start your journey of improvement or are already underway.

Continuous Delivery Maturity Model
Continuous Delivery Maturity Model

The Maturity Model

The advice for organizations wanting to adopt Continuous Delivery is ever more abundant, but for organizations that started adoption some time ago, the guidance on how to mature the process is still sparse. In this article, we explore one continuous improvement methodology that may help your organization mature its’ Continuous Delivery process.

Humble and Farley outline maturity Level 0 (Repeatable) – as one having process which is documented and partly automated.1 For this to be true, an organization must have first classified its’ software delivery maturity, identified areas for improvement, implemented some change and measured the effect. As Humble observes;

The deployment pipeline is the key pattern that enables continuous delivery.2

Humble also identifies that Deming’s Cycle is a good process to apply to initial adoption. 1 The process, according to Deming, should then be repeated so that further improvements can be planned and implemented; having the advantage the  data and experience from previous cycles is available. This process of continuous improvement is the first step to maturing the continuous delivery process.

Continuous Delivery and Kaizen

Continuous Delivery is a set of practices and principles aimed at building, testing and releasing software faster and more frequently.3 One key philosophy at the heart of Continuous Delivery, is Kaizen. The Japanese word, Kaizen, means continuous improvement. By improving standardized activities and processes, Kaizen aims to eliminate waste.  Within Kaizen are three major principles;

  1. 5S
  2. Standardization
  3. The elimination of waste; known as muda.

The 5S principle characterizes a continuous practice for creating and maintaining an organized and high-performance delivery environment. As 5S has the focus of waste reduction, it appears prudent to explore the 5s methodology as an approach to optimizing the Continuous Delivery pipeline.

What is 5S?

5S is a lean engineering principle focused on waste reduction and removal. The methodology is recursive and continuous and it’s primary goal is to make problems visible  so that they can be addressed.4

There are five primary 5S phases, derived from five Japanese words that translate to; sort (seiri), straighten (seiton), shine (seiso), standardize (seiketsu) and sustain (shitsuke).5

The 5s principle is more commonly applied to workplace organization or housekeeping. Since the delivery pipeline is a key component of the process, it is therefore a fundamental place where work will take place. The pipeline exhibits elements that are common with any physical work environment including;

  1. Tools, process, paperwork.
  2. Storage areas for artifacts, such as files.
  3. A requirement that components must be, physically or virtually, located in the correct location, and that they are connected by process.
  4. Tools and process need maintenance and cleaning. E.g. retention policies.
  5. Systems and procedures can be standardized and can benefit from standardization.

When applied to the delivery pipeline, the five primary 5S phases can be defined as;

  • Phase 1 – sort (seiri)
    • Analysis of processes and tools used in the delivery pipeline. Tools and processes not adding value should be removed.
  • Phase 2 – straighten (seiton)
    • Organization of processes and tools to promote pipeline efficiency.
  • Phase 3 – shine (seiso)
    • Inspection and pro-active/preventative maintenance to ensure clean operation throughout the delivery pipeline.
  • Phase 4 – standardize (seiketsu)
    • Standardization of working practice and operating procedure to ensure consistent delivery throughout pipeline.
  • Phase 5 – sustain (shitsuke)
    • Commitment to maintain standards and to practice the first 4S. Once the 4S’s have been established, they become the new way to operate.

Implementing 5s in the Delivery Pipeline

Experience has shown that there are several key factors that should be considered in the adoption of 5S.

  1. Begin with small changes. Remember that 5s is a continuous and recursive process.
  2. Involvement is crucial.6 Encompass everyone involved in the deployment pipeline.
  3. Create Champions – find leaders who love &  live the philosophy and encourage them to promote it.

5s implementation involves working through each phase (or S) in a methodical way. This is commonly achieved by Kaizen events, which are focused activities, designed to quickly identify and remove wasteful process from the value stream and are one of the prevalent approaches to continuous improvement.

Phase 1 – sort (seiri)

The first step of 5s is to sort. The purpose is to identify what is not needed in the delivery pipeline and remove it.

Additional process and practice can easily creep into the delivery mechanism, especially in the early phases of Continuous Delivery adoption, when you are experimenting.

The removal of items can either mean total elimination of a tool or process, since it is redundant, or the flagging, known as “Red Tagging”, of a tool or process which needs to be evaluated before it is disposed of. The review of red tagged tools and process should evaluate their importance and determine if they are truly required.

Suggested Steps

1. Evaluate all tools and process in the delivery pipeline and determine what is mandatory.

2. Ascertain what is not needed. Assess what it’s elimination status is, e.g. immediately or Red Flag.

3. Remove unnecessary or wasteful tools and  process.

Phase 2 – straighten (seiton)

The second step requires items in the delivery pipeline to be set in order. This requires the pipeline to be arranged so that  maximum efficiency is achieved for delivery.

To achieve seiton, the key components of the automated pipeline should be analysed, and should include the following;

  • Automated build process.
  • Automated unit, acceptance tests including code analysis.
  • Automated deployment process.

It is suggested that for the pipeline to be truly efficient the most commonly used items are the easiest and quickest to locate, such as;

  • Build status reports and metrics including KPI’s such as Mean-time-to-release (MTTR)
  • Automated test coverage, error and defect reports

In this step, actions can also be taken to visually label elements of the pipeline so that demarcation of responsibility  is clear. This may mean categorizing tools, process and target locations E.g. servers into  groups such as production and pre-production or development and test.

Suggested Steps

1. Analyse the value stream including tools and process.

2. Ensure the necessary information is available quickly to those who need it.

3. Visually distinguish or categorize key pipeline components.

Phase 3 – shine (seiso) 

Once the waste has been removed and only what is required has been kept and ordered, the next phase inspects the delivery pipeline to ensure that it’s operation is as clean as possible.

During pipeline execution large amounts of data can be produced. If this information is not dealt with efficiently it can become a waste product, detracting from the value of the delivery process.

Inspection of this data is vital. Data generated in the pipeline is likely to include instrumentation, metrics and logging information, as well as build artifacts and report data.

In context of the delivery pipeline, cleaning can be defined as archiving, roll-up or removal of delivery pipeline data. House keeping routines should be evaluated to ensure that data retention rules are applied and that waste, in the form of build artifacts, metric and report data and instrumentation data are correctly archived or removed as required.

Implementation of this phase requires assignment of cleaning responsibilities and scheduling of cleaning process.

Suggested Steps
1. Inspect data to understand what should be rolled-up, archived or deleted.

2. Ensure that responsibilities for data management are clearly assigned within the team.

3. Create a scheduled, automated cleaning processes.

Phase 4 – standardize (seiketsu)

The primary focus of step four is to ensure that  the working practice, training and operating procedures remain consistent. Standardization allows for continuous improvement and each of the first 3S’s should be regulated.

A critical element of seiketsu is to ensure that the process is reviewed on a regular basis or cycle. This ensures that best practices are maintained and areas  where standards have slipped are quickly identified.

A settled and regular process or practice becomes one that is hard to give up. Therefore,  if standardization, is implemented correctly, it can support culture change.

Suggested Steps

1. Ensure that the team have clear responsibilities for the tasks that need to be completed.

2. Create ownership and pride in the process.

3. Ensure champions provide guidance and support changes to the 5s process.

Phase 5 – sustain (shitsuke)

The purpose of the final phase is to ensure that the 5s process is not a one-time event. To achieve this,  the focus of the fifth  phase centers on culture. To sustain 5s organizations must engage in support, commitment and gainful communication, with the aim of keeping the team devoted to continuous improvement.

There are a number of elements which influence cultural support of 5s . Which elements take precedence varies within every organization and is heavily dependent on the existing culture of that organization. Key points are:

  1. Communication – aims & objectives need to be clear for all  team members.
  2. Education –  5s methodology, concepts and practices need to be communicated.
  3. Recognition –  team members need to feel that their efforts are recognized.

It is interesting to note that the literal translation of shitsuke is discipline. The final phase of 5s can also be one of the hardest to implement.

Suggested Steps

1. Establish an open channel for discussion and feedback, to facilitate continual learning.

2. Adopt the habit of auditing regularly and reward the best teams.

3. Ensure that all  problems are addressed quickly make sure that root cause analysis is completed to discover the cause.

Summary

The adoption of Kaizen events to implement 5s within the Continuous Delivery pipeline can provide significant support to maturing the model, by providing a continuous improvement process within a well-defined and standardized structure.

Lean manufacturing has been using the 5S pratice as a common method for lean implementation for years. Nearly 70% of of lean manufacturing companies use this approach 7, but the use of 5S as an adoption method for lean in software development would appear less common, as it has not be commonly applied to development practices.

Lean software development principles provide the promise of companies becoming more competitive by delivering software faster, increasing quality, and reducing cost leading to greater customer satisfaction, all of which align closely to the key principles of  Continuous Delivery.

– TheDevMgr

References

1. Humble, J. Farley D. (2010). Continuous Delivery: Reliable Software Releases Through Build, Test, and Deployment Automation. Indiana: Addison Wesley. 419.

2.  Humble, J. Farley D. Continuous Delivery: Anatomy of the Deployment Pipeline.  [September 7, 2010.]  InformIT. http://www.informit.com/articles/article.aspx?p=1621865

3. McGarr, Mike. Continuous Delivery. SlideShare.net [June 17, 2011.] http://www.slideshare.net/jmcgarr/continuous-delivery-8341276

4. Liker, Jeffery K. The Toyota Way. New York City : McGraw Hill, 2004.

5. MLG UK. 5S – The Housekeeping Approach Within Lean. MLG UK. [Cited: February 5th 2013] http://www.mlg.uk.com/html/5s.htm

6. Maready, Brian. Transparency = speed . Lean Lessons. [May 27, 2010] http://leanbuilt.blogspot.com/2010/05/transparency-speed.html.

7. Compdata Surveys. Lean Manufacturing and Safety Help Manufacturers Survive Tough Times.  Compdata Surveys. [December 13, 2010.] http://www.compdatasurveys.com/2010/12/13/lean-manufacturing-and-safety-help-manufacturers-survive-tough-times/

Automated release management for .NET with OctopusDeploy

Introducing OctopusDeploy

We are big fans of OctopusDeploy and have been using it since its beta release in early 2012. If you’re not familiar with OctopusDeploy, here’s the background;

1. It’s an automated release management tool for Microsoft .NET, comprising of a centralized server and agents, known as Tentacles, which are installed on each target server.

2. It uses the NuGet package format,  an open source package manager for the Microsoft .NET Framework.

3. Tentacle agents listen on TCP port 10933 by default and HTTP requests are encrypted using a pair of X509 certificates.

The following diagram shows the release management components;

Deployment Components
Deployment Components

Release Management On-premise or Off-premise

One of the highlights of using OctopusDeploy is its’ ability to deploy software to servers located in any environment. The highlight reel goes a little something like this;

Whether your servers live in the cloud, in a data centre, or under your desk , Octopus can securely upload, install and configure your applications.

Just install a tiny service agent called Tentacle on your servers, and then use our easy installation wizard to set up a secure connection between the Octopus and Tentacle based on public/private key encryption technology. Your server is ready for deployments!

We’ve installed OctopusDeploy many times and have used some of the following installation scenarios to deploy to on-premise and off-premise data centres.

Scenario 1: On-Premise Installation with On-Premise Deploy

One of the more common ways of installing Octopus is one where the NuGet Server and Octopus Server are located on your own network,  along-side Continuous Integration servers or source control systems.

In this installation, OctopusDeploy will pull NuGet packages from a NuGet Server (such as MyGetJetBrains TeamCity, a NuGet Feed Server or just a local file path) and push the deployment out to target servers located on a local network.

Since all servers are located on the same network, this configuration is straight-forward and requires not much more than Windows Firewall configuration to be completed,  where TCP traffic over port 10933 (presuming the default ports) is allowed between the OctopusDeploy server and the target servers.

On-Premise Installation with On-Premise Deploy
On-Premise Installation with On-Premise Deploy

Scenario 2 :On-Premise Configuration with Off-Premise Deploy

This installation presumes that your target servers are not within your own network. E.g. hosted in an off-premise data centre E.g. a cloud environment. Configuration is the same as Scenario 1, and Windows Firewall will still need to be configured.

However, in this scenario it is likely that additional layers of security will be in place E.g. a hardware firewall. Network teams will need to ensure that TCP traffic on the OctopusDeploy port (10933 by default) is allowed into each server.

This deployment scenario has some complications however. Each target server needs to be publicly addressable. For load balanced server farms this is going to add a level of complexity, as firewalls and content switches/load balancers will need to be configured to allow each target server to be individually and publicly available to an external caller.

More common, is the fact that servers located in the off-premise data centre might not be publicly addressable with good reason. E.g. Web Servers in a DMZ can receive traffic originating from public networks, whereas application and database servers (and firewalls) are configured only to receive traffic generated within the off-premise data centre.

If you do decide to expose servers publicly to allow Octopus to deploy from an on-premise to an off-premise location, you can take some solace from the fact that the Paul Stovell from OctopusDeploy has ensured deployment is secured with HTTP requests that are encrypted using a pair of X509 certificates.

On-Premise Configuration with Off-Premise Deploy
On-Premise Configuration with Off-Premise Deploy

Scenario 3 :Off-Premise Installation with Off-Premise Deploy

Finally, you might want to consider a scenario where the Octopus Server is hosted within the off-premise data centre that software will be deployed into.

The NuGet server can remain on-premise in this scenario. Since Octopus will generate outbound HTTP (TCP:80) traffic to a known destination ( in our experience ), security guys (not all) are cool (don’t complain complain less) with this approach.

Advantages over Scenario 2

1. Octopus and target servers are now located within the same network, or are on trusted networks.

2. Servers do not have to be made publicly addressable. Non public servers can be deployed to.

3. Load balanced challenges in Scenario 2 are overcome. Octopus can now individually address all servers.

4. Deployment time can be reduced, as NuGet packages are transferred once from NuGet source and are deployed across local or trusted networks.

Disadvantages

1. Additional server infrastructure is required in data centre to host OctopusDeploy Server.

Off-Premise Installation with Off-Premise Deploy
Off-Premise Installation with Off-Premise Deploy

We hope that’s given you a flavor of the installation scenarios available to Octopus Deploy! More information on OctopusDeploy can be found at http://octopusdeploy.com

DevOpsGuys use Octopus Deploy to deliver automated deployment solutions – ensuring frequent, low-risk software releases into multiple environments. Our engineers have deployed thousands of software releases using Octopus Deploy and we can help you do the same. Contact us today – we’d be more than happy to help.