How to pre-provision tentacles with Calamari

Hey Support,

Any way to pre-provision tentacles with Calamari ?
We have short-lived instances, and would like to skip the extra time it takes for tentacles to download Calamari during deploys.



Hi Anders,

Thanks for getting in touch. We don’t ship Calamari embedded in Tentacle and haven’t optimised for this particular scenario, though I will admit we have talked about it in the past.

There is something you can do though. In #1660 we changed how Calamari is updated, and the PR shows how you can update Calamari for a single machine, manually. Since Octopus is built API-first, you could:

  • Stand up your instance
  • Install Octopus Tentacle
  • Register the Machine
  • Update Calamari on the Machine

You can do this using the Octopus.Client like this:
var task = client.Repository.Tasks.ExecuteCalamariUpdate("Calamari update from ApiTests", new[] { uatWebServerA.Id, uatWebServerB.Id });

Hope that helps!

Ok, how about this:

Using Chef for creating machine images:

  • Download Calamari zip file from github
  • Extract on Tentacle under C:\Octopus\Calamari<version>
  • Touch C:\Octopus\Calamari<version>\Success.txt

I just need to fool the tentacle into thinking it has calamari…


Hi Anders,

Thanks for getting back to me. Taking a look over the code, your suggestion should work, though I haven’t tested it personally. My concern to your approach would be “which Calamari version is the right one to install?” The version of Calamari we package with Octopus is the version that has passed our automated testing. Just grabbing Calamari from GitHub might get you a version of Calamari that isn’t the same one that shipped with Octopus. We do try to maintain a broad compatibility between Octopus and Calamari builds, but there will be times where we will ship them out of cadence with each other.

When Calamari is updated we push it to the endpoint, there’s no URI to pull Calamari from, so unfortunately there’s no easy way for you to grab the bundled version, apart from calling the API method I mentioned to update Calamari for that machine.

I’d be interested to hear how you get on.


I’m facing a similar problem as Anders.
In our environment I have created a PowerShell DSC module that deploys projects based on Target Role and Environment when a new Tentacle (instance) gets deployed by auto-scaling event. Because Octopus project deployment is triggered by the instance itself using octo.exe in our case the Calamari does not get and upgrade.

Also we use OctoPosh Powershell module to de-register tentacle form Octopus deploy server on tentacle termination. This step would fail because PS comdlets that I use to de-register tentacle come back with errors about Calamari upgrade.

Can someone elaborate on how to use Octopus.client to upgrade calamari?
Looking at the above example and wiki page its is not clear to me how to use this client? Can I use Powershell to utilize this client?

Is it possible to invoke web requests from Powershell to Octopus deploy API?



Hi Janis,

Thanks for getting in touch. The way we do it via the Octopus Client is to create a Task via the API like this:

var task = client.Repository.Tasks.ExecuteCalamariUpdate("Pre-load latest calamari", new[] { myBrandNewMachineId });

OctoPosh doesn’t currently have a cmdlet that would allow you to do this directly. I’ll get in touch with Dalmiro, the author of Octoposh, and see what he thinks about making this easier.

Hope that helps.

Hi Janis,

I’ve added a task to add a cmdlet to make Calamari upgrades easier with Octoposh:

This will require me to upgrade the Octopus.client library from Octoposh’s current 2.6.x to Octopus’ latest 3.2.x, which will require a bit of work because lots of things changed between versions.

I’ll have a working Octoposh version with the latest Octopus library by the end of this week.

In the meantime this script should help you automating the Calamari upgrade:

Hope that helps,

1 Like