First Deployment

👋 Welcome to Octopus Deploy!

This tutorial series will help you complete your first deployment in Octopus Deploy. We’ll walk you through the steps to deploy a sample hello world package to one or more of your servers.

If you’re using Octopus 2024.2 or earlier, please visit one of these legacy guides:

Before you start

To follow this tutorial, you will need an Octopus Deploy instance. If you haven’t already, set up an instance using one of these methods:

Log in to Octopus

  1. Log in to your Octopus instance and click New Project.

Get started welcome screen

Add project

Projects let you manage software applications and services, each with their own deployment process.

  1. Give your project a descriptive name, for example, Hello world deployment.

Octopus lets you store your deployment process, settings, and non-sensitive variables in either Octopus or a Git repository.

  1. For this example, keep the default Octopus option selected.
  2. Leave the rest as is and click Create Project.

Add new project screen

Add environments

You’ll need an environment to deploy to.

Environments are how you organize your infrastructure into groups representing the different stages of your deployment pipeline. For example, Development, Staging, and Production.

  1. Keep the default environments and click Create Environments.

Environment selection options and deployment lifecycle visuals

Create deployment process

The next step is creating your deployment process. This is where you define the steps that Octopus uses to deploy your software.

For this deployment, we will configure one step to print Hello World.

  1. In the “Welcome to your Project” dialog, click Thanks, got it.

Octopus lands you in the process step template library.

  1. In the Featured category, locate the Run a Script card and click Add Step.

Featured step templates

Step Name

You can leave this as the default Run a Script.

Script Source

You can source script files via 3 methods:

  • Inline script (default)
  • Git repository
  • Package
  1. Select Inline script as your script source.

Script source expander where users can select where to source scripts from

Inline Source Code

  1. Select an appropriate script language.
  2. Copy the script below and paste it into the source code editor.
Write-Host "Hello, World!"

Inline source code expander where users can type a script

Execution Location

  1. If you’re using Octopus Cloud, select Run once on a worker.
  2. If you’re using a self-hosted Octopus instance, select Run once on the Octopus Server.

Execution location expander where users can select where this step will run

Worker Pool

  1. If you’re using Octopus Cloud, keep the default Runs on a worker from a specific worker pool option selected.

If you’re using Octopus Cloud and a Bash script language, select the Hosted Ubuntu option from the dropdown. The Default Worker Pool is running Windows and doesn’t have Bash installed.

Execution location expander where users can select a worker pool

You can skip the other sections of this page for this tutorial.

Save your step and you can move on to create and deploy a release.

Release and deploy

Create release

A release is a snapshot of the deployment process and the associated assets (packages, scripts, variables) as they exist when the release is created.

  1. Click the Create Release button.
  2. Click Save.

Execute deployment

Deployments typically occur in a defined environment order (for example, Development ➜ Staging ➜ Production), starting with the first one. Later you can configure Lifecycles with complex promotion rules to accurately reflect how you want to release software.

  1. Click the Deploy to Development… button to deploy to the development environment.
  2. Review the preview summary and when you’re ready, click Deploy.

The Task Log will show you in real-time the tasks Octopus is taking to run your Hello World script.

Successful first deployment message

You successfully completed your first deployment! 🎉

Up next, we’ll introduce you to the power of variables.

All guides in this tutorial series

  1. First deployment (this page)
  2. Define and use variables
  3. Approvals with manual interventions
  4. Add deployment targets
  5. Deploy a sample package

Further Reading

Help us continuously improve

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

Send feedback

Page updated on Thursday, November 14, 2024