Monday, August 22, 2016

Unattended installation octopus server - PowerShell DSC



I’ve been using Octopus deploy at work, and created a custom DSC resource to do the installation and configuration. The resource is now available to use from PowerShell gallery. You can use the Install-Module cmdlet to download the DSC resource

Install-Module Octopus

This will install the Octopus module. The module has a DSC resource OctopusServer that can be used for installation and configuring the octopus server on a node. You can create a simple configuration as below.

Configuration OctopusServerConfiguration{
    param(
        [PSCredential] $credentials
    )
    Node localhost{
        OctopusServer OctoServer{
            ServerName = $env:COMPUTERNAME
            Port = 8085
            Credentials = $credentials
            Ensure = "Present"
        }
    }

}