Overview

The role of Octopus is to deploy our application to the appropriate infrastructure & environments.

Currently we have 3 Environments.

  • Integration
  • Staging
  • Production

Staging is really just an Azure slot(named staging) for the production Azure Website.

Note: By default if you create at least one slot, there is always a default "production" slot that exists which is what is live and where your main domain points to.

Create a Process Step for each Step Below

  1. "Deploy DB Migrations" : Environments => [Integration, Staging] : Runs Migrations
  2. "Deploy Worker" : Environments => [Integration, Staging] : Used for Cron and other BG Tasks
    1. TODO - Update Cron Jobs Environments => [Integration, Staging]
  3. "Deploy Team" Environments => [Integration, Staging] : Deploys Team Website
  4. "Deploy Athlete" Environments => [Integration, Staging] : Deploys Athlete Website
  5. "Deploy WWW" Environments => [Integration, Staging] : Deploys WWW Website
  6. "Deploy Dugout" Environments => [Integration, Staging] : Deploys Dugout Website
  7. "Switch Athlete To Production" Environments => [Production] : Switches Azure Slot from Staging -> Production
  8. "Switch Team To Production" Environments => [Production] : Switches Azure Slot from Staging -> Production
  9. "Switch WWW To Production" Environments => [Production] : Switches Azure Slot from Staging -> Production
  10. "Switch Dugout To Production" Environments => [Production] : Switches Azure Slot from Staging -> Production

ScreenShot of our Steps

ScreenShot: Example of our process steps

For each of these steps, make sure to click the "configure features" link, and then enable:

  • "Customer Deployment Scripts"
  • "Configuration Variables"
  • For the "Migration Step" also enable "Configuration Transforms" (for this project we use transforms, for the other sites we use XML Merge Tool)

Screenshot of Azure Website Deployment Step

ScreenShot: Azure Website Deployment Step

Site Deployment Steps

For each deployment step of a site, set the:

  • Step Name: Deploy Team
  • Package ID: ex: FieldLevel.Team.Web.Site
  • Choose the Azure Subscription
  • Web App: Instead of specifying a website, we are going to set a variable ex: #{FL.DeploySlotTeam} which we can then define in our Variables section based upon Environment.

In the example above: the values (defined in our Variable Set) for FL.DeploySlotTeam is:

fl-team-production(staging) => Staging #This make sures we deploy to the staging slot.

fl-team-integration => Integration # For Integration we don't use slots so default goes to produciton slot

Configure Integration Environment on Octopus Deploy

Typically you will have a a few environments that you want to deploy to. Production, Integration, Staging.

We will start off w/ an Integration Environment.

  • Click "Environments"
  • Click "Add Environment"
  • Set Name: "Integration"

Configure Azure Deployment Target for "team-integration.fieldlevel.com"

  • Choose your "Integration Environment"
  • Click "Add deployment target"
  • Choose Azure Web App, click next.
    • Deployment Target settings:
    • Display Name: team-integration.fieldlevel.com
    • Environment: Integration
    • Role: Web App
    • Style: Azure Web App
    • Account: [Your Azure Account that you setup]
    • Web App: fl-team-integration - Central US


blog comments powered by Disqus

Published

03 September 2015

Category

deployment

Tags