The Tentacle agent used by Octopus to automate deployments has long supported configuration via command line. It’s possible to automatically download the MSI, install it, configure the Tentacle instance, and even register it with an Octopus server, all via the command line.
When provisioning a Windows server via Amazon EC2, you can pass a PowerShell script as User data. This will get executed when the EC2 instance starts for the first time:
I’ve put together an example script based on our instructions on Automating Tentacle installation. You can find the script below. Paste it between the <powershell>
XML elements, then wait for the machine to start. When it finally starts, the machine will be registered with your Octopus server:
If you hit any problems, remote to the machine and look at the following two files:
C:\TentacleInstallLog.txt
C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog.txt
Here’s the PowerShell script:
When you set up your EC2 instance and assign a security group to it, make sure the Tentacle listen port that you specify (10933 by default) allows TCP traffic. The script automatically adds the exception to Windows Firewall, but you need to do the same for the AWS firewall.
Tags:
Related posts

Octopus Deploy 3.5 - Subscriptions, Azure AD, GoogleApps and Extensibility
Introducing Octopus Subscriptions, a new feature that allows you to subscribe to events that are happening within Octopus.

RFC - Cloud and Infrastructure Automation Support
Octopus has a number of customers doing infrastructure automation in cloud IaaS environments such as Amazon EC2 and Azure.

Azure VM extension for Octopus Deploy
Today ScottGu announced that the Octopus Deploy Tentacle agent is now available as an extension for Azure VM's.