Installing Octopus Deploy with Chef

Hey there!

So I have created an open source octopus deploy cookbook for chef. Currently all it does is just install / remove a particular version of the server and tentacles on a server. I am starting on the configuration right now actually but I wanted to get some information on how to do it better. In our first internal version we would look to see if the service and config file existed and if they didn’t we would call the respective cli interface to configure the instance. I wanted to make this a little more intelligent and do partial changes instead of someone manually removing the instance and re configuring. When looking at the octo tentacle and server I was wondering if there was anyway to create these files without calling the tentacle cli interface? So that you could generate it with a template and then just call the tentacle and point it at the config to reinstall itself if the file changes as a result of the chef run.

<?xml version="1.0" encoding="utf-8"?>
<octopus-settings xmlns:xsd="" xmlns:xsi="">
  <set key="Octopus.Home">C:\Octopus</set>
  <set key="Octopus.Storage.MasterKey">[redacted]</set>
  <set key="Tentacle.Certificate">[redacted]</set>
  <set key="Tentacle.CertificateThumbprint">[redacted]</set>
  <set key="Tentacle.Communication.TrustedOctopusServers">[{"Thumbprint":"[redacted]","CommunicationStyle":0,"Address":null,"Squid":null,"SubscriptionId":null}]</set>
  <set key="Tentacle.Deployment.ApplicationDirectory">D:\WebApps</set>
  <set key="Tentacle.Services.NoListen">false</set>
  <set key="Tentacle.Services.PortNumber">10933</set>

Hi Brent,

Thanks for reaching out. This is a bit tricky, as there are a couple of keys in that xml that can only be generated using the CLI like “Octopus.Storage.MasterKey”, “Tentacle.Certificate” and “Tentacle.CertificateThumbprint”. The rest you can manually/programatically modify them and restart the Tentacle service for it to take the changes.

Let’s say you want to change the port of the Tentacle by adding a new config file. You’re gonna have to:

  1. Take the 3 keys mentioned above from the current config file.
  2. Inject them into the new one.
  3. Modify the port into the new one.
  4. Copy the new config into the Tentacle.
  5. Restart the service.

Hope this helps you with the development of the cookbook.


I was hoping for better news :). We already have a way to configure a tentacle / server for the first use which essentially checks for the config file and service to be created and if either does not exist then we run the command line arguments to create / configure the service. I saw those 3 keys actually and did not know if there would be any way to generate them with chef so that octo could just magically work but at this point it doesn’t sound like it.