diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6b638..2c6fb16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to the [Alteryx deploy](https://github.com/Akaizoku/alteryx- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.1](https://github.com/Akaizoku/alteryx-deploy/releases/1.1.1) - 2021-11-23 + +### Changed + +- Updated default sources location + +### Fixed + +- Fixed an issue with upgrade from 2021.3 (or lower) to 2021.4 ([#2](https://github.com/Akaizoku/alteryx-deploy/issues/2)) + ## [1.1.0](https://github.com/Akaizoku/alteryx-deploy/releases/1.1.0) - 2021-11-21 ### Added diff --git a/README.md b/README.md index 94cb4f0..eb0b141 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Example script structure with embedded dependencies: ### Alteryx -Alteryx installation files must be made available in the source directory (default `D:\Sources`). See the [compatibility section](#compatibility) for more information about the supported versions. +Alteryx installation files must be made available in the source directory (default `C:\Sources`). See the [compatibility section](#compatibility) for more information about the supported versions. You can download them from . @@ -344,12 +344,12 @@ Below are the steps to restart the Alteryx application. Transcript log files are generated in the log directory of the script. -- The naming convention is as follows: `_-Alteryx.log` +- The naming convention of the transcript log file is: `_-Alteryx.log` - The format of the log is: `\t\t` -Additional log files are generated during the installation, upgrade, or uninstallation of Alteryx as an XML file in teh same log directory. +Additional log files are generated by [InstallAware](https://www.installaware.com/) during the installation, upgrade, or uninstallation of Alteryx as an XML file in the same log directory. Those are disabled by default because of the negative impact on the speed of execution, but they can be enabled by setting the configuration variable `InstallAwareLog` to `true`. -- The naming convention is as follows: `_.log` +The naming convention of the InstallAware log file is: `_.log` Below is an example of a successful installation log: @@ -385,6 +385,7 @@ Only the first version supported is listed. Later releases should also be compat | ---------------- | -------- | ---------- | ------ | ------- | | [1.0.0] | [2021.3] | 5.0 | 1.2.4 | 1.0.0 | | [1.1.0] | [2021.3] | 5.0 | 1.2.5 | 1.0.1 | +| [1.1.1] | [2021.3] | 5.0 | 1.2.5 | 1.0.1 | ## Known issues @@ -405,4 +406,5 @@ It can be prevented by configuring a temporary directory (`TempDirectory`) that [PSAYX]: https://www.powershellgallery.com/packages/PSAYX [1.0.0]:https://github.com/Akaizoku/alteryx-deploy/releases/1.0.0 [1.1.0]:https://github.com/Akaizoku/alteryx-deploy/releases/1.1.0 +[1.1.1]:https://github.com/Akaizoku/alteryx-deploy/releases/1.1.1 [2021.3]:https://help.alteryx.com/release-notes/server/server-20213-release-notes diff --git a/conf/default.ini b/conf/default.ini index 4d0e2f0..7eff010 100644 --- a/conf/default.ini +++ b/conf/default.ini @@ -15,7 +15,7 @@ TempDirectory = \tmp # Resources directory ResDirectory = \res # Sources directory -SrcDirectory = C:\Program Files\Alteryx\Sources +SrcDirectory = C:\Sources # Alteryx installation directory InstallationPath = C:\Program Files\Alteryx # Backup directory diff --git a/powershell/Invoke-BackupAlteryx.ps1 b/powershell/Invoke-BackupAlteryx.ps1 index ff77cd8..c98bc47 100644 --- a/powershell/Invoke-BackupAlteryx.ps1 +++ b/powershell/Invoke-BackupAlteryx.ps1 @@ -10,7 +10,7 @@ function Invoke-BackupAlteryx { File name: Invoke-BackupAlteryx.ps1 Author: Florian Carrier Creation date: 2021-08-26 - Last modified: 2021-11-21 + Last modified: 2021-11-22 #> [CmdletBinding ( SupportsShouldProcess = $true @@ -35,8 +35,8 @@ function Invoke-BackupAlteryx { Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState # Variables $ISOTimeStamp = Get-Date -Format "yyyyMMdd_HHmmss" - $BackupPath = Join-Path -Path $Properties.BackupDirectory -ChildPath "${ISOTimeStamp}_Alteryx_Server.zip" - $TempBackupPath = Join-Path -Path $Properties.TempDirectory -ChildPath "${ISOTimeStamp}_Alteryx_Server" + $BackupPath = Join-Path -Path $Properties.BackupDirectory -ChildPath "${ISOTimeStamp}_Alteryx_Server_$($Properties.Version).zip" + $TempBackupPath = Join-Path -Path $Properties.TempDirectory -ChildPath "${ISOTimeStamp}_Alteryx_Server_$($Properties.Version)" $MongoDBPath = Join-Path -Path $TempBackupPath -ChildPath "MongoDB" $ServicePath = Join-Path -Path $Properties.InstallationPath -ChildPath "bin\AlteryxService.exe" # Backup options diff --git a/powershell/Update-Alteryx.ps1 b/powershell/Update-Alteryx.ps1 index a1e53c8..61b399f 100644 --- a/powershell/Update-Alteryx.ps1 +++ b/powershell/Update-Alteryx.ps1 @@ -10,7 +10,7 @@ function Update-Alteryx { File name: Update-Alteryx.ps1 Author: Florian Carrier Creation date: 2021-09-02 - Last modified: 2021-11-20 + Last modified: 2021-11-22 #> [CmdletBinding ( SupportsShouldProcess = $true @@ -45,29 +45,31 @@ function Update-Alteryx { $AlteryxService = Get-AlteryxUtility -Utility "Service" -Path $Properties.InstallationPath # Clear error pipeline $Error.Clear() - } - Process { - Write-Log -Type "CHECK" -Object "Starting Alteryx Server upgrade to $($Properties.Version)" # Retrieve current version - Write-Log -Type "INFO" -Object "Retrieving current version" + Write-Log -Type "DEBUG" -Object "Retrieving current version" if ($PSCmdlet.ShouldProcess("Alteryx version", "Retrieve")) { - $BackupVersion = Get-AlteryxVersion -Path $AlteryxService + $AlteryxVersion = Get-AlteryxVersion -Path $AlteryxService + Write-Log -Type "DEBUG" -Object $AlteryxVersion + $BackupVersion = Select-String -InputObject $AlteryxVersion -Pattern "\d+\.\d+.\d+(.\d+)?" | ForEach-Object { $PSItem.Matches.Value } } - Write-Log -Type "DEBUG" -Object $BackupVersion + } + Process { + Write-Log -Type "CHECK" -Object "Starting Alteryx Server upgrade from $BackupVersion to $($Properties.Version)" # Create back-up - Invoke-BackupAlteryx -Properties $Properties -Unattended:$Unattended + $BackUpProperties = Copy-OrderedHashtable -Hashtable $Properties + $BackUpProperties.Version = $BackupVersion + Invoke-BackupAlteryx -Properties $BackUpProperties -Unattended:$Unattended # Upgrade Install-Alteryx -Properties $Properties -InstallationProperties $InstallationProperties -Unattended:$Unattended # Check for errors if ($Error.Count -gt 0) { + # Rollback Write-Log -Type "ERROR" -Object "Upgrade process failed with $($Error.Count) errors" Write-Log -Type "WARN" -Object "Restoring previous version ($BackupVersion)" - # Overwrite target version - $Properties.Version = $BackupVersion # Reinstall Alteryx - Install-Alteryx -Properties $Properties -Unattended:$Unattended + Install-Alteryx -Properties $BackUpProperties -Unattended:$Unattended # Restore backup - Invoke-RestoreAlteryx -Properties $Properties -Unattended:$Unattended + Invoke-RestoreAlteryx -Properties $BackUpProperties -Unattended:$Unattended } else { Write-Log -Type "CHECK" -Object "Alteryx Server upgrade completed successfully" }