Skip to content

Instantly share code, notes, and snippets.

@BillCacy
Created October 10, 2018 04:19
Show Gist options
  • Save BillCacy/af3ec2a2ae0d843ff8d8b1a1b8b36d86 to your computer and use it in GitHub Desktop.
Save BillCacy/af3ec2a2ae0d843ff8d8b1a1b8b36d86 to your computer and use it in GitHub Desktop.
Solr settings object for Blue/Green deployment.
Set-StrictMode -Version 2.0
$ErrorActionPreference = "Stop"
<#
.SYNOPSIS
Classes and properties utilized by the scripts to update SolrCloud in a blue/green environment
#>
class OctopusMachineSettings
{
[string[]]$Roles
[bool]HasRole([string]$role)
{
return $this.Roles -contains $role
}
}
class BlueGreenSolrCloud
{
[string]$InstallDir
[string]$Zookeepers
[string]$InstanceUrl
[string]$IndexConfigName
[string]$ActiveRoleName
[string]$NonActiveRoleName
}
class BlueGreenSolrSettings
{
[OctopusMachineSettings]$Machine = [OctopusMachineSettings]::new()
[BlueGreenSolrCloud]$Solr = [BlueGreenSolrCloud]::new()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment