Deploying Packages

Last updated

When defining your deployment process, the most common step type will be a package step. This step type allows you to deploy an application that you have packaged onto one or more deployment targets.

The process of deploying a package looks approximately like this:

  1. Acquire the package as optimally as possible (local package cache and delta compression)
  2. Create a new folder for the deployment (which avoids many common problems like file locks and leaving stale files behind)
    • Example: C:\Octopus\Applications\[Tenant name]\[Environment name]\[Package name]\[Package version]\ where C:\Octopus\Applications is the Tentacle application directory you configured when installing Tentacle)
  3. Extract the package into the newly created folder
  4. Execute each of your custom scripts and the deployment features you've configured will be executed to perform the deployment following this order by convention.
  5. Output variables and deployment artifacts from this step are sent back to the Octopus Server

Package deployment feature ordering
Each part of a package step is executed in a specific order by the open-source Calamari project to enable more complex deployment scenarios.

Adding a package step

When adding a step to your deployment process, choose the Deploy a Package option. For more information, see the add step section.

When deploying a package you will need to select the machine role that the package will be deployed to. You will also be asked to select the feed that is the source of the package, and the ID of the package to deploy.

Variable Package Feed and/or Package ID
You can dynamically select a Package Feed and/or the Package ID at deployment time using an Octopus variable expression. Learn more about using dynamically selecting packages at deployment time.

When multiple machines are in the role you select, Octopus deploys to all of the machines in parallel. If you need to change this behavior, you can configure a rolling deployment.

Configuring features

Octopus is built to make it easy to deploy .NET applications, and contains a number of useful built in features that can be enabled on NuGet package steps.

You can enable or disable features by clicking Configure features.

For more details on some of the features, see the topics below.

In This Section

The rest of this section covers these topics in some more detail, and explains how to implement them.