Hello there.
I’m currently trying to figure out how to migrate our Icinga installation procedure for Windows VMs from the old and deprecated (but pretty easy to use) Kickstart script to the new installation procedure.
Currently we have the following installation being executed via Ansible:
(excerpt)
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11";
$ProgressPreference = "SilentlyContinue";
$global:IcingaFrameworkKickstartSource = 'https://raw.githubusercontent.com/Icinga/icinga-powershell-kickstart/master/script/icinga-powershell-kickstart.ps1';
$Script = (Invoke-WebRequest -UseBasicParsing -Uri $global:IcingaFrameworkKickstartSource).Content;
$Script += "`r`n`r`n Start-IcingaFrameworkWizard -RepositoryUrl 'https://github.com/Icinga/icinga-powershell-framework/archive/v$frameworkversion.zip'
-ModuleDirectory 'C:\Program Files\WindowsPowerShell\Modules' -AllowUpdate $TRUE -SkipWizard $TRUE;";
Invoke-Command -ScriptBlock ([Scriptblock]::Create($Script));
$pluginurl = "https://github.com/Icinga/icinga-powershell-plugins/archive/refs/tags/v" + $pluginsversion + ".zip"
$serviceurl = "https://github.com/Icinga/icinga-powershell-service/releases/download/v" + $serviceversion + "/icinga-service-v" + $serviceversion + ".zip"
Use-Icinga
Start-IcingaAgentInstallWizard -UseDirectorSelfService 0 -AutoUseFQDN 0 -AutoUseHostname 1 -LowerCase 1 -UpperCase 0 -PackageSource 'https://packages.icinga.com/windows/'
-AllowVersionChanges 1 -UpdateAgent 1 -AgentVersion $agentversion -Endpoints $endpoints -CAPort $caport -AcceptConnections 0 -AddFirewallRule 1 -ConvertEndpointIPConfig 1
-EndpointConnections $endpointConnections -ParentZone $parentZone -AddDirectorGlobal 1 -AddGlobalTemplates 1 -GlobalZones $globalZones -CAEndpoint $caendpoint -EmptyTicket 0
-Ticket $ticket -ServiceUser $serviceuser -InstallFrameworkPlugins 1 -PluginsUrl $pluginurl -InstallFrameworkService 1 -FrameworkServiceUrl $serviceurl
-ServiceDirectory 'C:\Program Files\icinga-framework-service\' -ServiceBin 'C:\Program Files\icinga-framework-service\icinga-service.exe' -RunInstaller
Now I wanted to convert this to the currently proposed way from the docs:
https://icinga.com/docs/icinga-for-windows/latest/doc/110-Installation/01-Getting-Started/
When running
[Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11';
$ProgressPreference = 'SilentlyContinue';
[string]$ScriptFile = 'C:\Users\Public\IcingaForWindows.ps1';
Invoke-WebRequest `
-UseBasicParsing `
-Uri 'https://packages.icinga.com/IcingaForWindows/IcingaForWindows.ps1' `
-OutFile $ScriptFile;
& $ScriptFile -ModuleDirectory 'C:\Program Files\WindowsPowerShell\Modules\' -SkipWizard;
it simply installs the Framework in the latest version, which I don’t want.
I need to specify the versions for all the components.
Sadly the documentation is lacking information about the usage options of the -InstallCommand
or the -AnswerFile
parameters (or it is hidden somewhere^^).
I hope that I could use those to, at least, say what version the Framework should be installed in.
The other components (Agent, Plugins, Service) could then be installed with Install-IcingaComponent -Name ... -Version ...
as far as I can see.
edit: well… or it doesn’t
PS C:\Windows\system32> Install-IcingaComponent -name plugins
[Error]: The component "plugins" was not found on stable channel with version "release"
PS C:\Windows\system32> Install-IcingaComponent -name plugin -version 1.8.0
[Error]: The component "plugin" was not found on stable channel with version "1.8.0"
PS C:\Windows\system32> Install-IcingaComponent -name plugins -version "icinga-powershell-plugins-1.8.0"
[Error]: The component "plugins" was not found on stable channel with version "icinga-powershell-plugins-1.8.0"
PS C:\Windows\system32> Install-IcingaComponent -name plugins -version "icinga-powershell-plugins-1.8.0.zip"
[Error]: The component "plugins" was not found on stable channel with version "icinga-powershell-plugins-1.8.0.zip"
Anyone here already played around with the new installer and can give some hints/tips?
That would be greatly appreciated!
Cheers