Skip to content

Instantly share code, notes, and snippets.

@goyalmohit
Created November 25, 2017 21:47
Show Gist options
  • Save goyalmohit/2ee479fb8a2f906676c65e6e51c1ed57 to your computer and use it in GitHub Desktop.
Save goyalmohit/2ee479fb8a2f906676c65e6e51c1ed57 to your computer and use it in GitHub Desktop.
Install and Configure Octopus Server using PowerShell DSC
Configuration SampleConfig
{
Import-DscResource -Module OctopusDSC
Node "localhost"
{
cOctopusServer OctopusServer
{
Ensure = "Present"
State = "Started"
# Server instance name. Leave it as 'OctopusServer' unless you have more than one instance
Name = "OctopusServer"
# The url that Octopus will listen on
WebListenPrefix = "http://localhost:80"
SqlDbConnectionString = "Server=(local)\SQLEXPRESS;Database=Octopus;Trusted_Connection=True;"
# The admin user to create
OctopusAdminUsername = "admin"
OctopusAdminPassword = "<my secret password>"
# optional parameters
AllowUpgradeCheck = $true
AllowCollectionOfAnonymousUsageStatistics = $true
ForceSSL = $false
ListenPort = 10943
DownloadUrl = "https://octopus.com/downloads/latest/WindowsX64/OctopusServer"
}
}
}
# Execute the configuration above to create a mof file
SampleConfig
# Run the configuration
Start-DscConfiguration -Path ".\SampleConfig" -Verbose -wait
# Test the configuration ran successfully
Test-DscConfiguration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment