diff --git a/Automation/Publish-Module.ps1 b/Automation/Publish-Module.ps1 index d4d0bb8..33608f6 100644 --- a/Automation/Publish-Module.ps1 +++ b/Automation/Publish-Module.ps1 @@ -1,12 +1,12 @@ <# # Copyright (c) 2014 All Rights Reserved by the SDL Group. -# +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,6 +32,7 @@ switch ($PSCmdlet.ParameterSetName) $repository="PSGallery" $moduleNamesToPublish+="ISHServer.12" $moduleNamesToPublish+="ISHServer.13" + $moduleNamesToPublish+="ISHServer.14" break; } 'Public+Internal' { @@ -40,7 +41,7 @@ switch ($PSCmdlet.ParameterSetName) $moduleNamesToPublish+="ISHServer.12" $moduleNamesToPublish+="ISHServer.13" $moduleNamesToPublish+="ISHServer.14" - break + break } } @@ -68,7 +69,7 @@ foreach($moduleName in $moduleNamesToPublish) break } } - + $revision=0 $date=(Get-Date).ToUniversalTime() $build=[string](1200 * ($date.Year -$startYear)+$date.Month*100+$date.Day) @@ -77,7 +78,7 @@ foreach($moduleName in $moduleNamesToPublish) $progressActivity="Publish $moduleName" Write-Progress -Activity $progressActivity - if(($Repository -eq "PSGallery") -and ($moduleName -eq "ISHServer.14")) + if(($Repository -eq "PSGallery") -and ($moduleName -eq "ISHServer.15")) { throw "Not allowed to publish $moduleName to $repository" } @@ -94,7 +95,7 @@ foreach($moduleName in $moduleNamesToPublish) Write-Verbose "Temporary working folder $modulePath is ready" Copy-Item -Path "$PSScriptRoot\..\Source\Modules\ISHServer\*" -Destination $modulePath -Recurse - Get-ChildItem -Path $modulePath -Filter "ISHServer.*.psm1"|Where-Object -Property Name -Ne "$($moduleName).psm1"|remove-Item -Force + Get-ChildItem -Path $modulePath -Filter "ISHServer.*.psm1"|Where-Object -Property Name -Ne "$($moduleName).psm1"|remove-Item -Force $psm1Path=Join-Path $modulePath "$moduleName.psm1" $metadataPath=Join-Path $modulePath "metadata.ps1" @@ -110,7 +111,7 @@ foreach($moduleName in $moduleNamesToPublish) $sourceVersion="$sourceMajor.$sourceMinor" if($publishDebug) { - $sourceVersion+=".$build.$revision" + $sourceVersion+=".$build.$revision" Write-Verbose "Increased $moduleName version with build number $sourceVersion" } Write-Debug "sourceMajor=$sourceMajor" @@ -158,12 +159,12 @@ foreach($moduleName in $moduleNamesToPublish) #region manifest Write-Debug "Generating manifest" - - Import-Module $psm1Path -Force + + Import-Module $psm1Path -Force $exportedNames=Get-Command -Module $moduleName | Select-Object -ExcludeProperty Name $psm1Name=$moduleName+".psm1" $psd1Path=Join-Path $modulePath "$moduleName.psd1" - + $possition = "None" $releaseNotes=foreach ($line in $changeLog) { if ($line.StartsWith("**")){ @@ -185,7 +186,7 @@ foreach($moduleName in $moduleNamesToPublish) } $releaseNotes+=@( "" - "https://github.com/Sarafian/ISHServer/blob/master/CHANGELOG.md" + "https://github.com/sdl/ISHServer/blob/master/CHANGELOG.md" ) $hash=@{ @@ -215,13 +216,13 @@ foreach($moduleName in $moduleNamesToPublish) break } 'ISHServer.14' { - $hash.Description="Prerequisite automation module for SDL Knowledge Center Content Manager 14.0.* (LiveContent Architect, Trisoft InfoShare)" + $hash.Description="Prerequisite automation module for SDL Tridion Docs 14.0.* (SDL Knowledge Center Content Manager, LiveContent Architect, Trisoft InfoShare)" $hash.Guid="05077a18-b95e-458c-9adc-5ad7d95aed5d" break } } - New-ModuleManifest @hash + New-ModuleManifest @hash Write-Verbose "Generated manifest" #endregion diff --git a/CHANGELOG.md b/CHANGELOG.md index 2574cd9..53a948c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +**1.7** + +Issues: +- GH-48: Add installaton of AdoptOpenJDK and JRE pre-requisite (ISHServer.14 only) +- GH-50: Upgrade .NET Framework pre-requisite to 4.7.2 for the upcoming release of Tridion Docs 14.0.0 (ISHServer.14 only) +- GH-52: Add support for Windows Server 2019 (ISHServer.14 only) +- GH-55: Review/Update README, CHANGELOG, RELEASNOTES, versions, ... + **1.6** Issues: diff --git a/README.md b/README.md index b626fab..9ee30f8 100644 --- a/README.md +++ b/README.md @@ -1,84 +1,110 @@ # ISHServer -A PowerShell module to help automate installation of prerequisites for **Knowledge Center Content Manager**. +A PowerShell module to help automate installation of prerequisites for **SDL Tridion Docs** (SDL Knowledge Center Content Manager, LiveContent Architect, Trisoft InfoShare). -# Available ISHServer modules +# Available ISHServer modules -## ISHServer.13 +## ISHServer.14 -[ISHServer.13**](https://www.powershellgallery.com/packages/ISHServer.13/) is the specific module matching the prerequisite requirements of the **Knowledge Center 2018** release. +[ISHServer.14**](https://www.powershellgallery.com/packages/ISHServer.14/) is the specific module matching the prerequisite requirements of the **Tridion Docs 14** release. -## ISHServer.12 +## ISHServer.13 -[ISHServer.12**](https://www.powershellgallery.com/packages/ISHServer.12/) is the specific module matching the prerequisite requirements of the **Knowledge Center 2016** release. +[ISHServer.13**](https://www.powershellgallery.com/packages/ISHServer.13/) is the specific module matching the prerequisite requirements of the **Knowledge Center 2018** release. + +## ISHServer.12 + +[ISHServer.12**](https://www.powershellgallery.com/packages/ISHServer.12/) is the specific module matching the prerequisite requirements of the **Knowledge Center 2016** release. ## Prerequisite and CD sources The module can retrieve files from the following type of sources: -- FTP. -- Amazon Web Services S3 bucket. -- Azure file and blob storage. +- FTP +- Amazon Web Services S3 bucket +- Azure file and blob storage -For each different type of credentials are required. +For each, different type of credentials are required. -## Preparation +## Preparation -To test if the operating system is compatible execute first `Test-ISHServerCompliance`. +To test if the operating system is compatible execute first `Test-ISHServerCompliance`. If the result is `$false` then do not proceed as the module most probably will not work. The supported operating systems are: -- Windows Server 2012 R2. -- Windows Server 2016. -- Windows 8.1 (not tested). -- Windows 10. +- Windows Server 2012 R2 +- Windows Server 2016 +- Windows Server 2019 +- Windows 8.1 (not tested) +- Windows 10 + +Because of the size of required prerequisites they are not included in the module. +This makes it your responsibility to make them available to the module. +To find out which file names are required, execute `Get-ISHPrerequisites -FileNames`. +You need to execute this on the target server because operating system information is taken into account to generate +the list of file names (OS Server version, already installed prerequisites, ...). -Because of the size of **Knowledge Center Content Manager** prerequisites they are not included in the module. -This makes it your responsibility to make them available to the module. -To find out which file names are required, execute `Get-ISHPrerequisites -FileNames` and the result should be per Knowledge Center version: +The complete list per Tridion Docs/Knowledge Center version: + +**Tridion Docs - Content Manager 14 - ISHServer.14** + +```text +htmlhelp.zip +javahelp-2_0_05.zip +NETFramework2015_4.6_MicrosoftVisualC++Redistributable_(vc_redist.x64).exe +NETFramework2017_4.7.2.xxxxx_(NDP472-KB4054530-x86-x64-AllOS-ENU).exe +ODTwithODAC122010.rsp +ODTwithODAC122010.zip +OpenJDK11-jdk_x64_windows_hotspot_11_28.zip +OpenJDK11-jre_x64_windows_hotspot_11_28.zip +V6-5-R1-Windows_X64_64E.exe +V6-5-R1-Windows_X64_64E.exe.iss +V6-5-R1-Windows_X64_64E.exe.vcredist_x64.exe +V6-5-R1-Windows_X64_64E.exe.vcredist_x86.exe +``` **Knowledge Center 2018 - Content Manager 13 - ISHServer.13** ```text +htmlhelp.zip +javahelp-2_0_05.zip jdk-8u144-windows-x64.exe jre-8u144-windows-x64.exe -javahelp-2_0_05.zip -htmlhelp.zip +NETFramework2015_4.6.1.xxxxx_(NDP461-KB3102436-x86-x64-AllOS-ENU).exe +NETFramework2015_4.6_MicrosoftVisualC++Redistributable_(vc_redist.x64).exe +ODTwithODAC122010.rsp +ODTwithODAC122010.zip V6-5-R1-Windows_X64_64E.exe V6-5-R1-Windows_X64_64E.exe.iss V6-5-R1-Windows_X64_64E.exe.vcredist_x64.exe V6-5-R1-Windows_X64_64E.exe.vcredist_x86.exe -ODTwithODAC122010.zip -ODTwithODAC122010.rsp -NETFramework2015_4.6_MicrosoftVisualC++Redistributable_(vc_redist.x64).exe -NETFramework2015_4.6.1.xxxxx_(NDP461-KB3102436-x86-x64-AllOS-ENU).exe ``` **Knowledge Center 2016 - Content Manager 12 - ISHServer.12** ```text +htmlhelp.zip +javahelp-2_0_05.zip jdk-8u60-windows-x64.exe jre-8u60-windows-x64.exe -javahelp-2_0_05.zip -htmlhelp.zip +MSXML.40SP3.msi +NETFramework2013_4.5_MicrosoftVisualC++Redistributable_(vcredist_x64).exe +ODTwithODAC121012.rsp +ODTwithODAC121012.zip V6-2-M9-Windows_X64_64E.exe V6-2-M9-Windows_X64_64E.exe.iss V6-2-M9-Windows_X64_64E.exe.vcredist_x64.exe V6-2-M9-Windows_X64_64E.exe.vcredist_x86.exe -ODTwithODAC121012.zip -ODTwithODAC121012.rsp -MSXML.40SP3.msi -NETFramework2013_4.5_MicrosoftVisualC++Redistributable_(vcredist_x64).exe ``` -If you want to manually make the files available to the module then copy them to the location provided by `Get-ISHServerFolderPath`. -As an alternative, the `Get-ISHPrerequisites` cmdlet offers the option to download the files will take care of everything. +If you want to manually make the files available to the module then copy them to the location provided by `Get-ISHServerFolderPath`. +As an alternative, the `Get-ISHPrerequisites` cmdlet offers the option to download the files and will take care of everything. ## Installing and configuring Once the files are available on the server, you can start the installation of the prerequisites and their configuration using the rest of the cmdlets. -The module is structured in manner that represents the steps described in the product's [documentation](http://docs.sdl.com/LiveContent/web/pub.xql?action=home&pub=SDL%20Knowledge%20Center%20full%20documentation-v2.1.2&lang=en-US). +The module is structured in manner that represents the steps described in the product's [documentation](http://docs.sdl.com/) (section SDL Tridion Docs). Understanding the prerequisites and how to configure them will be helpful but it is not a requirement. -An example of how to use the sequence the installation and configuration is available in [ISHBootstrap](https://github.com/sdl/ISHBootstrap). +An example of how to use the sequence of the installation and configuration is available in [ISHBootstrap](https://github.com/sdl/ISHBootstrap). ## CD Management @@ -86,10 +112,10 @@ ISHServer offers two cmdlets to download and expand the ISHCD. **Notice that it - `Get-ISHCD` can download a CD or show the ones already downloaded and expanded. - `Expand-ISHCD` will expand the CD. -The target path is always `C:\ISHCD\X.0.Z` where `X` is the major version and `Y` the revision. -- For `13.0.*` it's `C:\ISHCD\13.0.0`. -- For `12.0.*` it's `C:\ISHCD\12.0.3`. -- For the internal upcoming `14.0.*` it's `C:\ISHCD\14.0.0`. +The target path is always `C:\ISHCD\X.0.Z` where `X` is the major version and `Y` the revision, e.g. +- For `13.0.0` it's `C:\ISHCD\13.0.0` +- For `12.0.3` it's `C:\ISHCD\12.0.3` +- For `14.0.0` it's `C:\ISHCD\14.0.0` ## Maintenance @@ -97,24 +123,14 @@ For installation and maintenance reasons, the module offers a couple of general - `Get-ISHServerCOMPlus` returns the status of COM+ applications. This can prove useful for troubleshooting after the product is installed. - `Get-ISHNETInfo` returns the available .NET versions on the operating system. -- `Get-ISHOSInfo` returns details of the operating system. - -# ISHServer.14 - -**ISHServer.14** is the module for the next major release **Knowledge Center Content Manager** and **it's not published** in the PowerShell gallery. -The goal is to reuse as much as possible the scripts developed for **ISHServer.13** but here are a couple of things to keep in mind: - -- When a prerequisite is dropped, then the relative cmdlets will be also dropped. -- When a prerequisite version is changed, then the cmdlet's implementation will be adjusted to match the correct version of the prerequisite. - -No current differences of **ISHServer.14** with **ISHServer.13**. +- `Get-ISHOSInfo` returns details of the operating system. # Acknowledgements -There are not automated tests for this module, but issues are generally focused on the automation of a specific action. +There are not automated tests for this module, but issues are generally focused on the automation of a specific action. # Contribution -The module is developed with the PowerShell scripting language. -Current SDL's open source policies require each file to have a header. +The module is developed with the PowerShell scripting language. +Current SDL's open source policies require each file to have a header. An automation for this is offered by a copy of the module [SDLDevTools](Tools/Modules/SDLDevTools) and can be executed with the [Test-SDLHeaders.Tests.ps1](Automation/Pester/Test-SDLHeaders.Tests.ps1) Pester script. \ No newline at end of file diff --git a/Source/Modules/ISHServer/Get-ISHNETInfo.ps1 b/Source/Modules/ISHServer/Get-ISHNETInfo.ps1 index 1ed5a78..4c02f28 100644 --- a/Source/Modules/ISHServer/Get-ISHNETInfo.ps1 +++ b/Source/Modules/ISHServer/Get-ISHNETInfo.ps1 @@ -26,6 +26,7 @@ function Get-ISHNETInfo process { # http://stackoverflow.com/questions/3487265/powershell-script-to-return-versions-of-net-framework-on-a-machine + # https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | Get-ItemProperty -name Version,Release -EA 0 | Where { $_.PSChildName -match '^(?!S)\p{L}'} | @@ -39,7 +40,8 @@ function Get-ISHNETInfo "393295|393297" { [Version]"4.6" } "394254|394271" { [Version]"4.6.1" } "394802|394806" { [Version]"4.6.2" } - {$_ -gt 394806} { [Version]"Undocumented 4.6.2 or higher, please update script" } + "461808|461814" { [Version]"4.7.2" } + {$_ -gt 461814} { [Version]"Undocumented 4.7.2 release or a higher .NET framework version, please update this script." } # What happens when comparing with this 'Version'? } } } diff --git a/Source/Modules/ISHServer/Get-ISHOSInfo.ps1 b/Source/Modules/ISHServer/Get-ISHOSInfo.ps1 index a98fb56..a943171 100644 --- a/Source/Modules/ISHServer/Get-ISHOSInfo.ps1 +++ b/Source/Modules/ISHServer/Get-ISHOSInfo.ps1 @@ -21,6 +21,7 @@ function Get-ISHOSInfo begin { + . $PSScriptRoot\Get-ISHNETInfo.ps1 } process @@ -34,6 +35,7 @@ function Get-ISHOSInfo Type=$Matches["Type"] Caption=$caption IsCore=-not (Test-Path "C:\Windows\explorer.exe") + FullNetFrameworkVersion = $(Get-ISHNETInfo | Where-Object { $_.PSChildName -eq "Full"} | Select-Object Product).Product } New-Object -TypeName psobject -Property $hash } diff --git a/Source/Modules/ISHServer/Get-ISHPrerequisites.ps1 b/Source/Modules/ISHServer/Get-ISHPrerequisites.ps1 index 16bb0e5..4dcd956 100644 --- a/Source/Modules/ISHServer/Get-ISHPrerequisites.ps1 +++ b/Source/Modules/ISHServer/Get-ISHPrerequisites.ps1 @@ -90,9 +90,7 @@ function Get-ISHPrerequisites process { $filesToDownload=@( - #Common for 12 and 13 - Get-Variable -Name "ISHServer:JDK" -ValueOnly - Get-Variable -Name "ISHServer:JRE" -ValueOnly + #Common for 12, 13 and 14 Get-Variable -Name "ISHServer:JavaHelp" -ValueOnly Get-Variable -Name "ISHServer:HtmlHelp" -ValueOnly "$(Get-Variable -Name "ISHServer:AntennaHouse" -ValueOnly)" @@ -105,19 +103,34 @@ function Get-ISHPrerequisites Get-Variable -Name "ISHServer:MicrosoftVisualCPlusPlusRedistributable" -ValueOnly ) + #Only for 12 and 13 + if($PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.12" -or $PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.13") + { + $filesToDownload+=Get-Variable -Name "ISHServer:JDK" -ValueOnly + $filesToDownload+=Get-Variable -Name "ISHServer:JRE" -ValueOnly + } + + #Only for 12 if($PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.12") { $filesToDownload+=Get-Variable -Name "ISHServer:MSXML" -ValueOnly } + + #Only for 14 + if($PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.14") + { + $filesToDownload+=Get-Variable -Name "ISHServer:AdoptOpenJDK" -ValueOnly + $filesToDownload+=Get-Variable -Name "ISHServer:AdoptOpenJRE" -ValueOnly + } + #Dependend on Operating System Information (OS Server vesion, already installed prerequisites) $osInfo=Get-ISHOSInfo - if($osInfo.Server -eq "2016") - { - } - else + #Only for 13 and 14 + if(($PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.13") -or ($PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.14")) { - if($PSCmdlet.MyInvocation.MyCommand.Module.Name -eq "ISHServer.13") + [Version]$NETFrameworkRequiredVersion=Get-Variable -Name "ISHServer:NETFrameworkRequiredVersion" -ValueOnly + if($osInfo.FullNetFrameworkVersion -lt $NETFrameworkRequiredVersion) { $filesToDownload+=Get-Variable -Name "ISHServer:NETFramework" -ValueOnly } @@ -201,7 +214,7 @@ function Get-ISHPrerequisites 'No Download' { if($FileNames) { - $filesToDownload + $filesToDownload | Sort-Object } break } diff --git a/Source/Modules/ISHServer/ISHServer.13.psm1 b/Source/Modules/ISHServer/ISHServer.13.psm1 index 2740d70..b7feba2 100644 --- a/Source/Modules/ISHServer/ISHServer.13.psm1 +++ b/Source/Modules/ISHServer/ISHServer.13.psm1 @@ -22,6 +22,7 @@ Set-Variable -Name "ISHServer:AntennaHouse" -Value "V6-5-R1-Windows_X64_64E.exe" Set-Variable -Name "ISHServer:AntennaHouseInstallPath" -Value "Antenna House\AHFormatterV65\" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:Oracle" -Value "ODTwithODAC122010" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:MicrosoftVisualCPlusPlusRedistributable" -Value "NETFramework2015_4.6_MicrosoftVisualC++Redistributable_(vc_redist.x64).exe" -Scope "Script" -Option Constant +Set-Variable -Name "ISHServer:NETFrameworkRequiredVersion" -Value "4.6.1" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:NETFramework" -Value "NETFramework2015_4.6.1.xxxxx_(NDP461-KB3102436-x86-x64-AllOS-ENU).exe" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:VisualBasicRuntime" -Value "vbrun60sp6.exe" -Scope "Script" -Option Constant #Set-Variable -Name "ISHServer:MSXML" -Value "MSXML.40SP3.msi" -Scope "Script" -Option Constant diff --git a/Source/Modules/ISHServer/ISHServer.14.psm1 b/Source/Modules/ISHServer/ISHServer.14.psm1 index 2740d70..b1de4e8 100644 --- a/Source/Modules/ISHServer/ISHServer.14.psm1 +++ b/Source/Modules/ISHServer/ISHServer.14.psm1 @@ -16,13 +16,16 @@ Set-Variable -Name "ISHServer:JDK" -Value "jdk-8u144-windows-x64.exe" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:JRE" -Value "jre-8u144-windows-x64.exe" -Scope "Script" -Option Constant +Set-Variable -Name "ISHServer:AdoptOpenJDK" -Value "OpenJDK11-jdk_x64_windows_hotspot_11_28.zip" -Scope "Script" -Option Constant +Set-Variable -Name "ISHServer:AdoptOpenJRE" -Value "OpenJDK11-jre_x64_windows_hotspot_11_28.zip" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:JavaHelp" -Value "javahelp-2_0_05.zip" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:HtmlHelp" -Value "htmlhelp.zip" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:AntennaHouse" -Value "V6-5-R1-Windows_X64_64E.exe" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:AntennaHouseInstallPath" -Value "Antenna House\AHFormatterV65\" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:Oracle" -Value "ODTwithODAC122010" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:MicrosoftVisualCPlusPlusRedistributable" -Value "NETFramework2015_4.6_MicrosoftVisualC++Redistributable_(vc_redist.x64).exe" -Scope "Script" -Option Constant -Set-Variable -Name "ISHServer:NETFramework" -Value "NETFramework2015_4.6.1.xxxxx_(NDP461-KB3102436-x86-x64-AllOS-ENU).exe" -Scope "Script" -Option Constant +Set-Variable -Name "ISHServer:NETFrameworkRequiredVersion" -Value "4.7.2" -Scope "Script" -Option Constant +Set-Variable -Name "ISHServer:NETFramework" -Value "NETFramework2017_4.7.2.xxxxx_(NDP472-KB4054530-x86-x64-AllOS-ENU).exe" -Scope "Script" -Option Constant Set-Variable -Name "ISHServer:VisualBasicRuntime" -Value "vbrun60sp6.exe" -Scope "Script" -Option Constant #Set-Variable -Name "ISHServer:MSXML" -Value "MSXML.40SP3.msi" -Scope "Script" -Option Constant @@ -62,6 +65,8 @@ $exportNames=@( "Install-ISHToolDotNET" "Install-ISHToolVisualCPP" "Install-ISHToolJAVA" + "Install-ISHToolAdoptOpenJDK" + "Install-ISHToolAdoptOpenJRE" "Install-ISHToolJavaHelp" "Install-ISHToolHtmlHelp" "Install-ISHToolAntennaHouse" diff --git a/Source/Modules/ISHServer/Install-ISHToolAdoptOpenJDK.ps1 b/Source/Modules/ISHServer/Install-ISHToolAdoptOpenJDK.ps1 new file mode 100644 index 0000000..1062de4 --- /dev/null +++ b/Source/Modules/ISHServer/Install-ISHToolAdoptOpenJDK.ps1 @@ -0,0 +1,54 @@ +<# +# Copyright (c) 2014 All Rights Reserved by the SDL Group. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#> + +. $PSScriptRoot\Get-ISHServerFolderPath.ps1 + +function Install-ISHToolAdoptOpenJDK +{ + [CmdletBinding()] + Param() + + begin + { + . $PSScriptRoot\Private\Test-RunningAsElevated.ps1 + Test-RunningAsElevated -StopCallerPSCmdlet $PSCmdlet + } + + process + { + # http://docs.sdl.com/LiveContent/content/en-US/SDL%20Knowledge%20Center%20full%20documentation-v2/GUID-48FBD1F6-1492-4156-827C-30CA45FC60E9 + $fileName=Get-Variable -Name "ISHServer:AdoptOpenJDK" -ValueOnly + $filePath=Join-Path (Get-ISHServerFolderPath) $fileName + $targetPath="C:\AdoptOpenJDK\" + if(Test-Path $targetPath) + { + Write-Warning "$targetPath already exists" + } + else + { + Write-Debug "Creating $targetPath" + New-Item $targetPath -ItemType Directory |Out-Null + } + Write-Debug "Unzipping $filePath to $targetPath" + [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')|Out-Null + [System.IO.Compression.ZipFile]::ExtractToDirectory($filePath, $targetPath)|Out-Null + Write-Verbose "Installed $filePath" + } + end + { + + } +} diff --git a/Source/Modules/ISHServer/Install-ISHToolAdoptOpenJRE.ps1 b/Source/Modules/ISHServer/Install-ISHToolAdoptOpenJRE.ps1 new file mode 100644 index 0000000..5606c8d --- /dev/null +++ b/Source/Modules/ISHServer/Install-ISHToolAdoptOpenJRE.ps1 @@ -0,0 +1,54 @@ +<# +# Copyright (c) 2014 All Rights Reserved by the SDL Group. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#> + +. $PSScriptRoot\Get-ISHServerFolderPath.ps1 + +function Install-ISHToolAdoptOpenJRE +{ + [CmdletBinding()] + Param() + + begin + { + . $PSScriptRoot\Private\Test-RunningAsElevated.ps1 + Test-RunningAsElevated -StopCallerPSCmdlet $PSCmdlet + } + + process + { + # http://docs.sdl.com/LiveContent/content/en-US/SDL%20Knowledge%20Center%20full%20documentation-v2/GUID-48FBD1F6-1492-4156-827C-30CA45FC60E9 + $fileName=Get-Variable -Name "ISHServer:AdoptOpenJRE" -ValueOnly + $filePath=Join-Path (Get-ISHServerFolderPath) $fileName + $targetPath="C:\AdoptOpenJDK\" + if(Test-Path $targetPath) + { + Write-Warning "$targetPath already exists" + } + else + { + Write-Debug "Creating $targetPath" + New-Item $targetPath -ItemType Directory |Out-Null + } + Write-Debug "Unzipping $filePath to $targetPath" + [System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')|Out-Null + [System.IO.Compression.ZipFile]::ExtractToDirectory($filePath, $targetPath)|Out-Null + Write-Verbose "Installed $filePath" + } + end + { + + } +} diff --git a/Source/Modules/ISHServer/Install-ISHToolDotNET.ps1 b/Source/Modules/ISHServer/Install-ISHToolDotNET.ps1 index ced0450..3931c5f 100644 --- a/Source/Modules/ISHServer/Install-ISHToolDotNET.ps1 +++ b/Source/Modules/ISHServer/Install-ISHToolDotNET.ps1 @@ -31,9 +31,10 @@ function Install-ISHToolDotNET process { $osInfo=Get-ISHOSInfo - if($osInfo.Version -eq "2016") + [Version]$NETFrameworkRequiredVersion=Get-Variable -Name "ISHServer:NETFrameworkRequiredVersion" -ValueOnly + if($osInfo.FullNetFrameworkVersion -ge $NETFrameworkRequiredVersion) { - Write-Verbose "Assuming .NET 4.6.2 is installed on $($osInfo.Caption)" + Write-Verbose "Required .NET framework version $($NETFrameworkRequiredVersion) is installed ($($osInfo.FullNetFrameworkVersion) - $($osInfo.Caption))." } else { diff --git a/Source/Modules/ISHServer/Install-ISHVisualBasicRuntime.ps1 b/Source/Modules/ISHServer/Install-ISHVisualBasicRuntime.ps1 index ad409f7..6c85522 100644 --- a/Source/Modules/ISHServer/Install-ISHVisualBasicRuntime.ps1 +++ b/Source/Modules/ISHServer/Install-ISHVisualBasicRuntime.ps1 @@ -33,7 +33,7 @@ function Install-ISHVisualBasicRuntime $osInfo=Get-ISHOSInfo if($osInfo.IsCore) { - # Workaround for Windows Server 2016 core + # Workaround for Windows Server 2016/2019 core # https://social.technet.microsoft.com/Forums/windowsserver/en-US/9b0f8911-07f4-420f-9e48-d31915f91528/msvbvm60dll-missing-in-core?forum=winservercore Write-Warning "This is a workaround for making the Visual Basic runtime available on $($osInfo.Caption) Core" diff --git a/Source/Modules/ISHServer/Install-ISHWindowsFeature.ps1 b/Source/Modules/ISHServer/Install-ISHWindowsFeature.ps1 index 883c0ab..4e1892f 100644 --- a/Source/Modules/ISHServer/Install-ISHWindowsFeature.ps1 +++ b/Source/Modules/ISHServer/Install-ISHWindowsFeature.ps1 @@ -65,6 +65,8 @@ function Install-ISHWindowsFeature { '2016' { } + '2019' { + } '2012 R2' { $featureNames+="AS-NET-Framework" #http://docs.sdl.com/LiveContent/content/en-US/SDL%20Knowledge%20Center%20full%20documentation-v2/GUID-B06F62DB-9D30-4C2E-8C89-C116BD8F0829 @@ -76,7 +78,7 @@ function Install-ISHWindowsFeature Default {throw "Not supported operating system $($osInfo.Caption)" } } - # On Windows Server 2016 the following import must happen explicitly + # On Windows Server 2016/2019 the following import must happen explicitly Import-Module ServerManager Install-WindowsFeature -Name $featureNames |Out-Null diff --git a/Source/Modules/ISHServer/Private/Get-ISHS3Object.ps1 b/Source/Modules/ISHServer/Private/Get-ISHS3Object.ps1 index 63a1bc8..2d53233 100644 --- a/Source/Modules/ISHServer/Private/Get-ISHS3Object.ps1 +++ b/Source/Modules/ISHServer/Private/Get-ISHS3Object.ps1 @@ -81,6 +81,7 @@ function Get-ISHS3Object else { Write-Warning "Skipped $_ already exists at $localFile" + Get-Item -Path $localFile } } } diff --git a/Source/Modules/ISHServer/Test-ISHServerCompliance.ps1 b/Source/Modules/ISHServer/Test-ISHServerCompliance.ps1 index a8be6d7..54c2586 100644 --- a/Source/Modules/ISHServer/Test-ISHServerCompliance.ps1 +++ b/Source/Modules/ISHServer/Test-ISHServerCompliance.ps1 @@ -29,7 +29,11 @@ function Test-ISHServerCompliance $osInfo=Get-ISHOSInfo if($osInfo.IsServer) { - $isSupported=$osInfo.Version -in '2016','2012 R2' + $isSupported=$osInfo.Version -in '2019','2016','2012 R2' + if($osInfo.Version -eq '2019') + { + Write-Warning "Experimental. Hyper-V only." + } } else { diff --git a/Source/Modules/ISHServer/metadata.ps1 b/Source/Modules/ISHServer/metadata.ps1 index 2b0a68a..2f0ddba 100644 --- a/Source/Modules/ISHServer/metadata.ps1 +++ b/Source/Modules/ISHServer/metadata.ps1 @@ -15,5 +15,5 @@ #> <#PSScriptInfo -.VERSION 1.6 +.VERSION 1.7 #>