mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Replaces 'latest' version with 'release' and standardizes is
This commit is contained in:
parent
c9afe63ab8
commit
6e50603b30
6 changed files with 35 additions and 21 deletions
|
|
@ -15,6 +15,10 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
|||
|
||||
* [#62](https://github.com/Icinga/icinga-powershell-framework/issues/62) Deprecates `--key` argument for certificate generation for Icinga 2.12.0 and later
|
||||
|
||||
### Deprecations
|
||||
|
||||
* The value `latest` for the installation wizard argument `AgentVersion` is deprecated and has been replaced by `release`
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* The `-AcceptConnections` argument for the install wizard had the opposite effect in the previous versions. Please review your configuration on a test setup before proceeding with a mass-rollout to ensure the Agent behaves as expected
|
||||
|
|
|
|||
|
|
@ -26,3 +26,7 @@ Using `-AcceptConnections 0` is now working properly by letting the Agent establ
|
|||
With v1.1.0 a new argument is added to the wizard which will prompt a question if hostnames or FQDN for connection data from the Agent to the parent node(s) shall be converted to IP addresses. If you are unsure of the result, you can manually add `-ConvertEndpointIPConfig 0` to your finished configuration string or scripts or answer the question with `no` to keep the current behavour.
|
||||
|
||||
By using `-ConvertEndpointIPConfig 1` or answering the wizard question with `yes`, all endpoint configuration data for your parent node(s) are resolved from hostname/FQDN to IP Addresses if possible
|
||||
|
||||
#### Renames 'latest' Agent version
|
||||
|
||||
The value `latest` for the Icinga Agent version argument has been deprecated and replaced by `release`. For now the value is changed for you, following with a deprecation warning. Please update all your Icinga Director and script configuration.
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
.FUNCTIONALITY
|
||||
Download and install a PowerShell module from a custom or GitHub source
|
||||
.EXAMPLE
|
||||
PS>Get-IcingaPowerShellModuleArchive -ModuleName 'Plugins' -Repository 'icinga-powershell-plugins' -Stable 1;
|
||||
PS>Get-IcingaPowerShellModuleArchive -ModuleName 'Plugins' -Repository 'icinga-powershell-plugins' -Release 1;
|
||||
.EXAMPLE
|
||||
PS>Get-IcingaPowerShellModuleArchive -ModuleName 'Plugins' -Repository 'icinga-powershell-plugins' -Stable 1 -DryRun 1;
|
||||
PS>Get-IcingaPowerShellModuleArchive -ModuleName 'Plugins' -Repository 'icinga-powershell-plugins' -Release 1 -DryRun 1;
|
||||
.PARAMETER DownloadUrl
|
||||
The Url to a ZIP-Archive to download from (skips the wizard)
|
||||
.PARAMETER ModuleName
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
The repository to download the ZIP-Archive from
|
||||
.PARAMETER GitHubUser
|
||||
The user from which a repository is downloaded from
|
||||
.PARAMETER Stable
|
||||
Download the latest stable release
|
||||
.PARAMETER Release
|
||||
Download the latest release
|
||||
.PARAMETER Snapshot
|
||||
Download the latest package from the master branch
|
||||
.PARAMETER DryRun
|
||||
|
|
@ -41,7 +41,7 @@ function Get-IcingaPowerShellModuleArchive()
|
|||
[string]$ModuleName = '',
|
||||
[string]$Repository = '',
|
||||
[string]$GitHubUser = 'Icinga',
|
||||
[bool]$Stable = $FALSE,
|
||||
[bool]$Release = $FALSE,
|
||||
[bool]$Snapshot = $FALSE,
|
||||
[bool]$DryRun = $FALSE
|
||||
);
|
||||
|
|
@ -50,7 +50,7 @@ function Get-IcingaPowerShellModuleArchive()
|
|||
$Tag = 'master';
|
||||
[bool]$SkipRepo = $FALSE;
|
||||
|
||||
if ($Stable -Or $Snapshot) {
|
||||
if ($Release -Or $Snapshot) {
|
||||
$SkipRepo = $TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -59,10 +59,10 @@ function Get-IcingaPowerShellModuleArchive()
|
|||
|
||||
if ([string]::IsNullOrEmpty($DownloadUrl)) {
|
||||
if ($SkipRepo -Or (Get-IcingaAgentInstallerAnswerInput -Prompt ([string]::Format('Do you provide a custom repository for "{0}"?', $ModuleName)) -Default 'n').result -eq 1) {
|
||||
if ($Stable -eq $FALSE -And $Snapshot -eq $FALSE) {
|
||||
$branch = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Which version to you want to install? (snapshot/stable)' -Default 'v' -DefaultInput 'stable').answer;
|
||||
} elseif ($Stable) {
|
||||
$branch = 'stable';
|
||||
if ($Release -eq $FALSE -And $Snapshot -eq $FALSE) {
|
||||
$branch = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Which version do you want to install? (release/snapshot)' -Default 'v' -DefaultInput 'release').answer;
|
||||
} elseif ($Release) {
|
||||
$branch = 'release';
|
||||
} else {
|
||||
$branch = 'snapshot'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
.FUNCTIONALITY
|
||||
Download and install a PowerShell module from the 'icinga-powershell-' namespace
|
||||
.EXAMPLE
|
||||
PS>Install-IcingaFrameworkComponent -Name 'plugins' -Stable;
|
||||
PS>Install-IcingaFrameworkComponent -Name 'plugins' -Release;
|
||||
.EXAMPLE
|
||||
PS>Install-IcingaFrameworkComponent -Name 'plugins' -Stable -DryRun;
|
||||
PS>Install-IcingaFrameworkComponent -Name 'plugins' -Release -DryRun;
|
||||
.PARAMETER Name
|
||||
The name of the module to install. The namespace 'icinga-powershell-' is added
|
||||
by the function automatically
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
.PARAMETER Url
|
||||
Specify a direct Url to a ZIP-Archive for external or local web ressources or
|
||||
local network shares
|
||||
.PARAMETER Stable
|
||||
Download the latest stable version from a GitHub source
|
||||
.PARAMETER Release
|
||||
Download the latest Release version from a GitHub source
|
||||
.PARAMETER Snapshot
|
||||
Download the latest master branch from a GitHub source
|
||||
.PARAMETER DryRun
|
||||
|
|
@ -42,7 +42,7 @@ function Install-IcingaFrameworkComponent()
|
|||
[string]$Name,
|
||||
[string]$GitHubUser = 'Icinga',
|
||||
[string]$Url,
|
||||
[switch]$Stable = $FALSE,
|
||||
[switch]$Release = $FALSE,
|
||||
[switch]$Snapshot = $FALSE,
|
||||
[switch]$DryRun = $FALSE
|
||||
);
|
||||
|
|
@ -63,7 +63,7 @@ function Install-IcingaFrameworkComponent()
|
|||
)
|
||||
) `
|
||||
-Repository $RepositoryName `
|
||||
-Stable $Stable `
|
||||
-Release $Release `
|
||||
-Snapshot $Snapshot `
|
||||
-DryRun $DryRun;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function Get-IcingaAgentMSIPackage()
|
|||
);
|
||||
|
||||
if ([string]::IsNullOrEmpty($Version)) {
|
||||
throw 'Please specify a valid version: "snapshot", "latest" or a specific version like "2.11.0"';
|
||||
throw 'Please specify a valid version: "release", "snapshot" or a specific version like "2.11.0"';
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($Source)) {
|
||||
|
|
@ -19,7 +19,7 @@ function Get-IcingaAgentMSIPackage()
|
|||
$Architecture = Get-IcingaAgentArchitecture;
|
||||
$LastUpdate = $null;
|
||||
|
||||
if ($Version -eq 'snapshot' -Or $Version -eq 'latest') {
|
||||
if ($Version -eq 'snapshot' -Or $Version -eq 'release') {
|
||||
$Content = (Invoke-WebRequest -Uri $Source -UseBasicParsing).RawContent.Split("`r`n");
|
||||
$UsePackage = $null;
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ function Get-IcingaAgentMSIPackage()
|
|||
$UsePackage = $MSIPackage;
|
||||
break;
|
||||
}
|
||||
} elseif ($Version -eq 'latest') {
|
||||
} elseif ($Version -eq 'release') {
|
||||
if ($line -like '*snapshot*' -Or $line -like '*-rc*') {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,6 +136,12 @@ function Start-IcingaAgentInstallWizard()
|
|||
}
|
||||
}
|
||||
|
||||
# 'latest' is deprecated starting with 1.1.0
|
||||
if ($AgentVersion -eq 'latest') {
|
||||
$AgentVersion = 'release';
|
||||
Write-IcingaConsoleWarning -Message 'The value "latest" for the argmument "AgentVersion" is deprecated. Please use the value "release" in the future!';
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrEmpty($Hostname) -And $null -eq $AutoUseFQDN -And $null -eq $AutoUseHostname) {
|
||||
if ((Get-IcingaAgentInstallerAnswerInput -Prompt 'Do you want to specify the hostname manually?' -Default 'n').result -eq 1) {
|
||||
$HostFQDN = Get-IcingaHostname -AutoUseFQDN 1 -AutoUseHostname 0 -LowerCase 1 -UpperCase 0;
|
||||
|
|
@ -199,7 +205,7 @@ function Start-IcingaAgentInstallWizard()
|
|||
$InstallerArguments += '-AllowVersionChanges 1';
|
||||
|
||||
if ([string]::IsNullOrEmpty($AgentVersion)) {
|
||||
$AgentVersion = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please specify the version you wish to install ("latest", "snapshot" or a version like "2.11.3")' -Default 'v' -DefaultInput 'latest').answer;
|
||||
$AgentVersion = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please specify the version you wish to install ("release", "snapshot" or a specific version like "2.11.3")' -Default 'v' -DefaultInput 'release').answer;
|
||||
$InstallerArguments += "-AgentVersion '$AgentVersion'";
|
||||
|
||||
Write-IcingaConsoleNotice ([string]::Format('Installing Icinga version: "{0}"', $AgentVersion));
|
||||
|
|
@ -227,7 +233,7 @@ function Start-IcingaAgentInstallWizard()
|
|||
|
||||
if ($UpdateAgent -eq 1) {
|
||||
if ([string]::IsNullOrEmpty($AgentVersion)) {
|
||||
$AgentVersion = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please specify the version you wish to install ("latest", "snapshot", or a version like "2.11.0")' -Default 'v' -DefaultInput 'latest').answer;
|
||||
$AgentVersion = (Get-IcingaAgentInstallerAnswerInput -Prompt 'Please specify the version you wish to install ("release", "snapshot" or a specific version like "2.11.3")' -Default 'v' -DefaultInput 'release').answer;
|
||||
$InstallerArguments += "-AgentVersion '$AgentVersion'";
|
||||
|
||||
Write-IcingaConsoleNotice ([string]::Format('Updating/Downgrading Icinga 2 Agent to version: "{0}"', $AgentVersion));
|
||||
|
|
|
|||
Loading…
Reference in a new issue