Octopus First Impressions

Octopus First ImpressionsCouple nights ago installed Octopus! It made me want to jump out of a perfectly good airplane! My initial intention was to blog a getting started but Bob Yexley beat me to it with Octopus Deploy – My Favorite New Toy. Instead, I will share a few thoughts, first impressions and some suggestions. But first, restating the problem is important.

The Problem

I probably don’t really need to spend too much time here, do I? I mean, xcopy (with manual configuration, etc…yuck) is far too brittle and error-prone, MSDeploy/WebDeploy is just too much friction, third party installers and Wix are too much work (seriously, who has time for that?), and in enterprise/corporate environments, who really has the option of handling deployments through Visual Studio? What other options are there?

Well now, there’s Octopus.

If the problem is not enough take a gander at Why Octopus from the creator, Paul Stovell. Before going to much further, please note I still need to checkout the ChuckNorris Dropkick project from Dru Sellers.

First Impressions

You MUST install Octopus Deployment! How can the community help improve and move this framework along faster?!?

  • Installation is a snap!
  • Created First Deployment Quickly
  • No out of box IIS configuration
  • Deployed first Demo.NuGet MVC 3 application in minutes
  • Command line tooling with Octopus Deploy
  • TeamCity Integration

After I setup Octopus and deployed my first ASP.NET MVC 3 application in minutes my mind started racing. How great would it be to have the ability to create a deployment or kick off a deployment from TeamCity. So, does this integration exist?

Yes! I commend Paul Stovell, he thought of it already, take a look at Octopus Deploy Project on GitHub. This command line tool provides the ability to control Octopus deployments from within TeamCity work-flows. I’ve included an example from Octopus Deploy site for convenience. Paul also started a series on TeamCity integration, Octopus and TeamCity: Part I.

I was a bit disappointed when deploying a web application there is no default script to automate basic setup of a web site or web application. Instead the web site or web application must be created manually, then Octopus will simply update the content. There is an option to create a PowerShell script to automate IIS management which should be called in PreDeploy.ps1 but that is for another day. For now, a simple one time setup of the web site or web application is fine. As part of convention, there are three PowerShell scripts that Octopus looks for, PreDeploy, Deploy and PostDeploy.

If you do not create your own web site you will see an error message in deployment output similar to below. 2012-04-01 21:12:44 WARN Could not find an IIS website or virtual directory named 'Demo.NuGet' on the local machine. If you expected Octopus to update this for you, you should create the site and/or virtual directory manually. Otherwise you can ignore this message.


  • Currently must manually create the web site or web application, IIS WebSites.
  • Create a custom environment variable to override the OctopusWebSiteName pre-defined variable to web site root or web application.
  • Create a custom environment variable to override the OctopusPackageDirectoryPath pre-defined variable to the path of the web site or web application.
  • When updating environment variables they do not affect previously created deployment configuration. It would be nice to be able to override that and apply to all deployment versions.


  • Prepackaged basic IIS creation script for web site and web application
  • Support for including and executing WebDeploy package to handle web site and web application configuration
  • Out of the box Octopus support in TeamCity in the form of Deployment Tasks
  • A blog on how the community can help contribute, improve, move project along faster.
  • Create a Chocolatey package for Octopus and Octopus.Tentacle.

TeamCity Octopus Deploy Example: creating a release

Assuming you have a project named HelloWorld:

octo create-release --server=http://your-octopus/api --project=HelloWorld

This will create a new release of the HelloWorld project using the latest available NuGet packages for each step in the project. The version number of the release will be the highest NuGet package version. You can override this using:

octo create-release --server=http://your-octopus/api --project=HelloWorld --version=1.0.3

To create a release and deploy it to an environment named Production:

octo create-release --server=http://your-octopus/api --project=HelloWorld --deployto=Production

Note that packages that have already been deployed to the selected machines will not be re-deployed. You can force them to be re-deployed using the --force argument:

octo create-release --server=http://your-octopus/api --project=HelloWorld --deployto=Production --force