Posted with : Studying

Start using Octopus to deploy apps

This post explains all steps needed to install, work with Octopus Deploy that I have passes through. After some short of investigations, it's really nice and should be in hands of .NET developers / production engineers.

Setup Octopus

Octopus requirements are important, it requires Windows Server 2K8+. It shouldn't be installed on any Windows terminal OS (eg Windows 7) because after that it doesn't work correctly.

I had some errors with Octopus on Windows 7, eg

Push-Location : Cannot find drive. A drive with the name 'IIS' does not exist.
At D:\Octopus\Applications\Test - Local\Demo.XBanking\\Octopus.Feature
s.IISWebSite_BeforePostDeploy.ps1:214 char:6

The same thing with Octopus Tentacle (check it requirements there), it can be installed correctly on Windows 7 but doesn't work correctly when I connect from Windows Server 2K8 (Octopus Server).

Using Octopus

1. Creating Environments

Just put some information into the form the create an Environment.


More than one environment can be created depending on requirements of the applications.

2. Creating Projects

Just put some information into the form the create a Project.


3. Define process of deployment for your project

Process of deployment can be devided into multiple steps. Each project may require different steps than others.

Below are example steps of a XBanking web applicaiton:

  • (1) Sends an email to a list of people
  • (2) Deploys the application from a package to web server(s)
  • (3) Sends a failure email if the deployment was failed
  • (4) Sends a success email if the deployment was success


4. Configure SMTP

Because the deployment process contains some mailing steps, so it requires to provide SMTP information. It will ask you to do some testing to besure that the setting is good.


5. Build package for your application

There are a number of options to create NuGet package of your application. In this document, I use OctoPack way. That requires to install OctoPack package into the running project (Web Application, Console / Windows Application...)

After that we can use MSBuild command to

  • Build the solution (line 1)

  • Generate a package (line 2)

  • Publish the package to Octopus Built-in NuGet server (line 3 + 4)

msbuild Demo.XBanking.sln   /t:Build 

After above step, the should be displayed in Octopus feed


6. Creating Releases and make deployment

Now it's ready to create project release(s) and deploy to target environment(s). Octopus should send emails regarding each deployment status.



  1. Octopus Key Concepts
  2. Octopus Deployment Basics
Written on October 23, 2015