Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save espoelstra/c56638c2bc127f837047b4029a047a4c to your computer and use it in GitHub Desktop.
Save espoelstra/c56638c2bc127f837047b4029a047a4c to your computer and use it in GitHub Desktop.
Automate Octopus Deploy Server Install and Configuration
$commandArgs = "/i Octopus-Server.msi /quiet INSTALLLOCATION=C:\OctopusServer /lv Octopus-Server-Install-Log.txt"
Start-Process "msiexec" $commandArgs -Wait -Verb RunAs
$ErrorActionPreference = "Stop"
$OctopusMsi = "Octopus-Server.msi"
$InstallPath = "C:\OctopusDeploy"
$Server = $InstallPath + "\Octopus.Server.exe"
Write-Host "Installing Octopus Deploy server to $InstallPath"
$commandArgs = "/i $OctopusMsi /quiet INSTALLLOCATION=$InstallPath /lv Octopus-Server-Install-Log.txt"
Start-Process "msiexec" $commandArgs -Wait -Verb RunAs
Write-Host "Configuring Octopus Deploy server"
Start-Process $Server 'create-instance --instance="OctopusServer" --config="C:\OctopusStorage\OctopusServer\OctopusServer.config"' -Wait -Verb RunAs
Start-Process $Server 'configure --instance="OctopusServer" --home="C:\OctopusStorage" --storageMode="Embedded" --upgradeCheck="True" --upgradeCheckWithStatistics="True" --webAuthenticationMode="Domain" --webForceSSL="True" --webListenPrefixes="http://localhost:80/" --storageListenPort="10931"' -Wait -Verb RunAs
Start-Process $Server 'service --instance="OctopusServer" --stop' -Wait -Verb RunAs
Start-Process $Server 'admin --instance="OctopusServer" --username="[YOUR-ADMIN-USERNAME]" --wait="5000"' -Wait -Verb RunAs
Start-Process $Server 'license --instance="OctopusServer" --licenseBase64="[YOUR-LICENSE-HERE]" --wait="5000"' -Wait -Verb RunAs
Start-Process $Server 'service --instance="OctopusServer" --install --reconfigure --start' -Wait -Verb RunAs
Write-Host "Installation and configuration complete" -ForegroundColor Green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment