diff --git a/Automation/Publish-Module.ps1 b/Automation/Publish-Module.ps1 index 5a6c035..d4d0bb8 100644 --- a/Automation/Publish-Module.ps1 +++ b/Automation/Publish-Module.ps1 @@ -15,59 +15,69 @@ #> param( - [Parameter(Mandatory=$false,ParameterSetName="KC2016")] - [Parameter(Mandatory=$false,ParameterSetName="KC2016+Dev")] + [Parameter(Mandatory=$false,ParameterSetName="Public")] + [Parameter(Mandatory=$false,ParameterSetName="Public+Internal")] [string]$NuGetApiKey=$null, - [Parameter(Mandatory=$true,ParameterSetName="KC2016+Dev")] + [Parameter(Mandatory=$true,ParameterSetName="Public+Internal")] [ValidateScript({$_ -ne "PSGallery"})] - [string]$DevRepository #, - <# - [Parameter(Mandatory=$true,ParameterSetName="KC2016")] - [Parameter(Mandatory=$false,ParameterSetName="KC2016+Dev")] - [switch]$ISH12=$false, - [Parameter(Mandatory=$false,ParameterSetName="KC2016+Dev")] - [switch]$ISH13=$false - #> + [string]$DevRepository ) Set-StrictMode -Version latest $moduleNamesToPublish=@() switch ($PSCmdlet.ParameterSetName) { - 'KC2016' { + 'Public' { $publishDebug=$false $repository="PSGallery" $moduleNamesToPublish+="ISHServer.12" + $moduleNamesToPublish+="ISHServer.13" break; } - 'KC2016+Dev' { + 'Public+Internal' { $publishDebug=$true $repository=$DevRepository $moduleNamesToPublish+="ISHServer.12" $moduleNamesToPublish+="ISHServer.13" + $moduleNamesToPublish+="ISHServer.14" break } } $changeLogPath="$PSScriptRoot\..\CHANGELOG.md" $changeLog=Get-Content -Path $changeLogPath -if($publishDebug) -{ - $revision=0 - $date=(Get-Date).ToUniversalTime() - $build=[string](1200 * ($date.Year -2015)+$date.Month*100+$date.Day) - $build+=$date.ToString("HHmm") -} - - foreach($moduleName in $moduleNamesToPublish) { try { + if($publishDebug) + { + switch ($moduleName) + { + 'ISHServer.12' { + $startYear="2014" + break + } + 'ISHServer.13' { + $startYear="2015" + break + } + 'ISHServer.14' { + $startYear="2017" + break + } + } + + $revision=0 + $date=(Get-Date).ToUniversalTime() + $build=[string](1200 * ($date.Year -$startYear)+$date.Month*100+$date.Day) + $build+=$date.ToString("HHmm") + } + $progressActivity="Publish $moduleName" Write-Progress -Activity $progressActivity - if(($Repository -eq "PSGallery") -and ($moduleName -eq "ISHServer.13")) + if(($Repository -eq "PSGallery") -and ($moduleName -eq "ISHServer.14")) { throw "Not allowed to publish $moduleName to $repository" } @@ -84,15 +94,8 @@ foreach($moduleName in $moduleNamesToPublish) Write-Verbose "Temporary working folder $modulePath is ready" Copy-Item -Path "$PSScriptRoot\..\Source\Modules\ISHServer\*" -Destination $modulePath -Recurse - switch ($moduleName) - { - 'ISHServer.12' { - Remove-Item -Path "$modulePath\ISHServer.13.psm1" -Force - } - 'ISHServer.13' { - Remove-Item -Path "$modulePath\ISHServer.12.psm1" -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" $metadataContent=Get-Content -Path $metadataPath -Raw @@ -160,7 +163,6 @@ foreach($moduleName in $moduleNamesToPublish) $exportedNames=Get-Command -Module $moduleName | Select-Object -ExcludeProperty Name $psm1Name=$moduleName+".psm1" $psd1Path=Join-Path $modulePath "$moduleName.psd1" - $guid="c1e7cbac-9e47-4906-8281-5f16471d7ccd" $possition = "None" $releaseNotes=foreach ($line in $changeLog) { @@ -191,11 +193,11 @@ foreach($moduleName in $moduleNamesToPublish) "CompanyName" = "SDL plc" "Copyright"="SDL plc. All rights reserved." "RootModule"=$psm1Name - "Description"="Prerequisite automation module for SDL Knowledge Center Content Manager 12.0.* (LiveContent Architect, Trisoft InfoShare)" + "Description"="" "ModuleVersion"=$sourceVersion "Path"=$psd1Path - "LicenseUri"='https://github.com/Sarafian/ISHServer/blob/master/LICENSE' - "ProjectUri"= 'https://github.com/Sarafian/ISHServer/' + "LicenseUri"='https://github.com/sdl/ISHServer/blob/master/LICENSE' + "ProjectUri"= 'https://github.com/sdl/ISHServer/' "ReleaseNotes"= $releaseNotes -join [System.Environment]::NewLine "CmdletsToExport" = $exportedNames "FunctionsToExport" = $exportedNames @@ -212,6 +214,11 @@ foreach($moduleName in $moduleNamesToPublish) $hash.Guid="c73125ea-0914-4a1c-958b-05eccd6c2c29" break } + 'ISHServer.14' { + $hash.Description="Prerequisite automation module for SDL Knowledge Center Content Manager 14.0.* (LiveContent Architect, Trisoft InfoShare)" + $hash.Guid="05077a18-b95e-458c-9adc-5ad7d95aed5d" + break + } } New-ModuleManifest @hash diff --git a/CHANGELOG.md b/CHANGELOG.md index f42eea5..2574cd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,14 @@ Issues: - GH-32: Set-ISHUserLocal throws error "net.exe : The user name could not be found." when the password has character " - GH-31: Set-ISHUserLocal cannot work with passwords longer than 14 characters - GH-34: Rename Get-ISHCOMPlus to Get-ISHServerCOMPlus +- GH-42: Make ContentManager2018 the primary artifact In detail: - Renamed `Get-ISHCOMPlus` to `Get-ISHServerCOMPlus` +Remarks: +- Moved links from https://github.com/Sarafian to https://github.com/sdl . + **1.5** Issues: diff --git a/README.md b/README.md index 7a8e06b..b626fab 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,15 @@ # ISHServer A PowerShell module to help automate installation of prerequisites for **Knowledge Center Content Manager**. -# ISHServer.12 +# Available ISHServer modules -[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 + +[ISHServer.13**](https://www.powershellgallery.com/packages/ISHServer.13/) is the specific module matching the prerequisite requirements of the **Knowledge Center 2018** release. -The module requires elevated privileges for most of its cmdlets. +## 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 @@ -32,23 +36,6 @@ Because of the size of **Knowledge Center Content Manager** prerequisites they a 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: -**Knowledge Center 2016 - Content Manager 12 - ISHServer.12** - -```text -jdk-8u60-windows-x64.exe -jre-8u60-windows-x64.exe -javahelp-2_0_05.zip -htmlhelp.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 -``` - **Knowledge Center 2018 - Content Manager 13 - ISHServer.13** ```text @@ -66,6 +53,22 @@ 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 +jdk-8u60-windows-x64.exe +jre-8u60-windows-x64.exe +javahelp-2_0_05.zip +htmlhelp.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. @@ -75,7 +78,7 @@ As an alternative, the `Get-ISHPrerequisites` cmdlet offers the option to downlo 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). 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/Sarafian/ISHBootstrap). +An example of how to use the sequence the installation and configuration is available in [ISHBootstrap](https://github.com/sdl/ISHBootstrap). ## CD Management @@ -84,9 +87,9 @@ ISHServer offers two cmdlets to download and expand the ISHCD. **Notice that it - `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 `12.0.1` it's `C:\ISHCD\12.0.1` -- For `12.0.3` it's `C:\ISHCD\12.0.3` -- For `13.0.0` it's `C:\ISHCD\13.0.0` +- 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`. ## Maintenance @@ -96,23 +99,15 @@ For installation and maintenance reasons, the module offers a couple of general - `Get-ISHNETInfo` returns the available .NET versions on the operating system. - `Get-ISHOSInfo` returns details of the operating system. -# ISHServer.13 +# ISHServer.14 -**ISHServer.13** 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.12** but here are a couple of things to keep in mind: +**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. -Current differences of **ISHServer.13** with **ISHServer.12**: - -- **Java** runtime and development kit for (64-bit) 1.8.0_144. -- **MSDTC** is removed form the prerequisites list, therefore the `Initialize-ISHMSDTCSettings` and `Initialize-ISHMSDTCTransactionTimeout` cmdlets are removed. -- **MSXML** is removed form the prerequisites list, therefore the `Install-ISHToolMSXML4` cmdlet is removed. -- **Microsoft .NET Framework 4.6.1** is required instead of **Microsoft .NET Framework 4.5**. -- **Visual C++ Redistributable for Visual Studio 2015** is required instead of **Visual C++ Redistributable for Visual Studio 2013**. -- **Oracle Client - ODAC 12c2 Release 1 (12.2.0.1.0)** is required instead of **Oracle Client - ODAC 12c Release 4**. -- **Antenna House V6.5**. +No current differences of **ISHServer.14** with **ISHServer.13**. # Acknowledgements diff --git a/Source/Modules/ISHServer/ISHServer.14.psm1 b/Source/Modules/ISHServer/ISHServer.14.psm1 new file mode 100644 index 0000000..2740d70 --- /dev/null +++ b/Source/Modules/ISHServer/ISHServer.14.psm1 @@ -0,0 +1,101 @@ +<# +# 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. +#> + +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: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:VisualBasicRuntime" -Value "vbrun60sp6.exe" -Scope "Script" -Option Constant +#Set-Variable -Name "ISHServer:MSXML" -Value "MSXML.40SP3.msi" -Scope "Script" -Option Constant + +$exportNames=@( + #region Helpers + "Get-ISHOSInfo" + "Get-ISHNETInfo" + "Test-ISHServerCompliance" + "Get-ISHServerFolderPath" + "Grant-ISHUserLogOnAsService" + "Get-ISHServerCOMPlus" + "Get-ISHNormalizedCredential" + #endregion + + #region Ports + "Set-ISHFirewallHTTPS" + "Set-ISHFirewallNETBIOS" + "Set-ISHFirewallOracle" + "Set-ISHFirewallHTTPS" + "Set-ISHFirewallSMTP" + "Set-ISHFirewallSQLServer" + #endregion + + + #region Global + "Get-ISHServerFolderPath" + "Get-ISHPrerequisites" + "Initialize-ISHLocale" + "Initialize-ISHIIS" + "Initialize-ISHUserLocalProfile" + "Set-ISHUserLocal" + "Set-ISHUserAdministrator" + "Initialize-ISHRegistry" + #endregion + + #region Install + "Install-ISHToolDotNET" + "Install-ISHToolVisualCPP" + "Install-ISHToolJAVA" + "Install-ISHToolJavaHelp" + "Install-ISHToolHtmlHelp" + "Install-ISHToolAntennaHouse" + "Install-ISHToolOracleODAC" + "Install-ISHWindowsFeature" + "Install-ISHWindowsFeatureIISWinAuth" + "Install-ISHVisualBasicRuntime" + #endregion + + #region Regional settings + "Initialize-ISHRegional" + "Initialize-ISHRegionalDefault" + #endregion + + #region License + "Set-ISHToolAntennaHouseLicense" + #endregion + + #region CD + "Expand-ISHCD" + "Get-ISHCD" + #endregion +) + +$privateNames=@( + "Get-ISHFTPItem" + "Get-ISHS3Object" + "Get-ISHAzureFileObject" + "Get-ISHAzureBlobObject" + "Test-RunningAsElevated" +) + +$privateNames | ForEach-Object {. $PSScriptRoot\Private\$_.ps1 } +$exportNames | ForEach-Object {. $PSScriptRoot\$_.ps1 } + +$exportedMemberNames=$exportNames -replace "\.ISH[0-9]+","" +Export-ModuleMember $exportedMemberNames