Installing tentacles via script

Hi, I am a total noob here. I have never used powershell and I am not a developer. However, I am tasked with getting octopus automated with AWS. I get most of the octopus stuff to work, but when it comes to scripting the tentacle installation, I am not having success.

I tried running the scripts suggested on the page here, but I don’t know enough to get it to work.

To test, I downloaded the MSI installer to a test server and then ran the script attached with the variables changed. Powershell does not recognize tentacle.exe as a command.

How do I get this to work? I thought I could just copy the scripts on your page, change the variables that are highlighted and run the script. It is not that simple though.

octopus.txt (889 Bytes)

Hey there,
Thanks for getting in touch, I’m sorry to hear you’re having trouble running the script to install and configure your new Tentacle.

One thing which comes to mind is that the tentacle manager MSI needs to already be installed before the script will run successfully. You can confirm by logging in and navigating to the default tentacle.exe directory by running: cd "C:\Program Files\Octopus Deploy\Tentacle". If you don’t see the directory it means that the tentacle was never installed to the default location and you will need to perform that step first.

A possible solution would be to navigate to where you downloaded the MSI installer then run:
msiexec /i Octopus.Tentacle.<version>.msi /quiet

from a command prompt with elevated privileges.

Please replace the values as necessary, for example <version> is a place holder in this case, so if you downloaded Octopus.Tentacle.3.15.2-x64.msi, you would need to replace <version> with 3.15.2-x64

In a lot of cases people often like to script this process entirely but running the command above should be enough to get you going. I would be very interested to know how you go with this, please feel free to let me know.

Kind Regards,

So you are saying we should install the tentacle on the AMI itself and configure it as the new machines spin up as opposed to both installing and configuring the tentacle as a new machine spins up.
My approach was to leave the AMI blank with no tentacle installed - script the installation and configuration as we auto-scale.
I was looking for a script that would help me do that.
However, this approach does seem to make sense since any server using this AMI will also be tied to octopus.
If I have further questions, I will let you know.

Hi Erik,
Personally, I tend to install the tentacle and then configure it at the same time for simplicity as well, we just need to remember that the MSI needs to be installed before the tentacle can be configured.

For scripting the tentacle installation, my favourite way is to do use Desired State Configuration (DSC). With DSC, you will be able to use a configuration file to declare that you want a Tentacle on a machine (or many machines), then DSC will use our pre-written script resources to take action and install it all for you. That’s only one of many ways to script it though, but for more information you can refer to our DSC Section of the automating Tentacle instalation documentation.

Kind Regards,

You can use chef opsworks for octopus tentacle automation you will get the powershell scripts on octopus website . Just add your octopus thumbprints to script (which is a self signed certificafe for octopus server).and you might have make little changes in script as you will be running it from remote machine(chefworkstation).