Skip to content

Instantly share code, notes, and snippets.

@ducas
Created June 17, 2014 22:46
Show Gist options
  • Select an option

  • Save ducas/1fad358d63835fb53c88 to your computer and use it in GitHub Desktop.

Select an option

Save ducas/1fad358d63835fb53c88 to your computer and use it in GitHub Desktop.
Initialize an Octopus Deploy Tentacle by downloading, installing and setting up the Tentacle software
$OctopusThumbprint = "YOUR_THUMBRPRINT"
$OctopesServer = "http://your.octopusserver.com"
$ApiKey = "YOUR_API_KEY"
$Role = "a-role"
$Environment = "UAT"
$TentacleDownloadUrl = "http://octopusdeploy.com/downloads/latest/OctopusTentacle64"
$InstallDirectory = "C:\Program Files\Octopus Deploy\Tentacle"
function Get-TentacleInstaller() {
Import-Module "BitsTransfer"
$Filename = Join-Path $($env:TEMP) "OctopusTemtacle64.msi"
Start-BitsTransfer $TentacleDownloadUrl -Destination $Filename
$Filename
}
function Invoke-Installer($InstallerFilename) {
msiexec /i $InstallerFilename /quiet
}
function Setup-Tentacle() {
Push-Location $InstallDirectory
Tentacle.exe create-instance --instance "Tentacle" --config "C:\Octopus\Tentacle\Tentacle.config" --console
Tentacle.exe new-certificate --instance "Tentacle" --console
Tentacle.exe configure --instance "Tentacle" --home "C:\Octopus" --console
Tentacle.exe configure --instance "Tentacle" --app "C:\Octopus\Applications" --console
Tentacle.exe configure --instance "Tentacle" --port "10933" --console
Tentacle.exe configure --instance "Tentacle" --trust $OctopusThumbprint --console
Tentacle.exe register-with --instance "Tentacle" --server $OctopesServer --apiKey=$ApiKey --role $Role --environment $Environment --comms-style TentaclePassive --console
Tentacle.exe service --instance "Tentacle" --install --start --console
}
function Initialize-Tentacle() {
$Installer = Get-TentacleInstaller
Invoke-Installer $Installer
Setup-Tentacle
}
Initialize-Tentacle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment