Deployment process

Now that you have access to an Octopus Server, your infrastructure is configured, and your applications packaged, you’re ready to start deploying your software.

A deployment process is a set of steps that Octopus Server orchestrates to deploy your software. Each project has a single deployment process.

You define your deployment processes by creating projects and then adding steps and variables to the project. Each step contains a specific action (or set of actions) executed as part of the deployment process each time you deploy your software.

Octopus has over 300+ built-in and community-contributed step templates for deploying almost anything.

Once you have set up a deployment process, you won’t need to change it between deployments. However, you can add or edit steps anytime as your process or infrastructure changes.

A simple deployment process in Octopus Deploy

A Hello world deployment process

To define a simple deployment process in Octopus that executes a hello world script on the Octopus Server, complete the following steps:

  1. Navigate to Projects.
  2. Select Add Project.
  3. Name the project, for instance, Hello world, and click Save.
  4. Click Create Process.
  5. Choose the type of step you’d like to add to filter the available steps: Script.
  6. Find the Run a Script step and click Add Step.
  7. In the process editor, give the step a name, for instance, Run Hello world script.
  8. In the Execution Location section, select Run on the Octopus Server.
  9. Paste the following PowerShell script into the Inline Source Code editor:
Write-Host "Hello, World!"
  1. Click Save.

You now have a simple hello world deployment process.

If you’re using Octopus Cloud you can’t run scripts directly on the Octopus Server. Instead, you can select Run once on a worker which will run the script on a dynamically provisioned worker.

Create a release

  1. From the process page, click Create Release, and then click Save.
  2. Click Deploy to Development…, then click Deploy.

This will deploy the release. In the task summary, you’ll see the release was deployed to your Development environment, and the step Run Hello world script ran on the Octopus Server or selected worker.

Hello world task summary

This is an example of a very simple process. The following sections go into more detail about each part of the process.

Projects

Before you can define how your software is deployed, you must create a project for the deployment process. Projects contain the deployment steps and configuration variables that define how your software is deployed.

Learn more about projects.

Lifecycles

Lifecycles control how your software is promoted through your environments and which projects are associated with which environments.

Learn more about lifecycles.

Deployment steps

Steps contain the actions your deployment process will execute each time your software is deployed.

Deployment processes can have one or many steps, steps can run in sequence or parallel, in addition to a variety of deployment steps, you can include manual intervention steps to get sign off before deployment, email notification steps to keep everybody informed about your process, or even skip steps under different circumstances.

Learn more about steps.

Configuration features

When you deploy your software, it needs to be configured for the specific environments it will be deployed to. Configuration files let you define custom installation directories, database connections, and other settings that make it possible to deploy your software.

Learn more about configuration features.

Variables

Octopus supports variables to make it easier to define application settings for your deployment processes without the need to hardcode them. For instance, you might use different connection strings for apps deployed to Test and Production. Variables let you define these settings and then refer to them by the variable name throughout the deployment process, meaning you don’t have to manually change them between deployments, or even give them much thought after the variables and deployment process have been defined.

Learn more about variables.

Conditions

You can specify run conditions on the steps that you define to give you greater control over the deployment process.

Learn more about conditions.

Deploying releases

In Octopus you create releases to be deployed. Projects have multiple releases and releases can be deployed multiple times across different infrastructure.

Learn more about releases.

Working with the Octopus API

Octopus Deploy is built API-first, which means everything you can do through the Octopus UI can be done with the API. In the API we model the deployment process the same way, starting at the project:

  • Project
  • Deployment process
  • Steps
  • Actions

We have provided lots of helpful functions for building your deployment process in the .NET SDK, or you can use the raw HTTP API if that suits your needs better.

Learn about using the Octopus REST API.

Record the HTTP requests made by the Octopus UI to see how we build your deployment processes using the Octopus API. You can do this in the Chrome developer tools, or using a tool like Fiddler.

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Wednesday, August 28, 2024