Skip to content

Commit

Permalink
GH-55 Merge changes to master (#63)
Browse files Browse the repository at this point in the history
* Beutepa patch issue 45 (#47)
    Get-ISHS3Object.ps1 does not return the file information when the object is already available locally
* GH-48: Add installaton of AdoptOpenJDK and JRE pre-requisite
* GH-50: Upgrade .NET Framework pre-requisite to 4.7.2 for the upcoming release of Tridion Docs 14.0.0
* GH-52: Add support for Windows Server 2019
* GH-55:  Review/Update readme, changelog, releasnotes,
  • Loading branch information
beutepa authored Jun 28, 2019
1 parent e68487c commit c973187
Show file tree
Hide file tree
Showing 16 changed files with 248 additions and 84 deletions.
29 changes: 15 additions & 14 deletions Automation/Publish-Module.ps1
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -32,6 +32,7 @@ switch ($PSCmdlet.ParameterSetName)
$repository="PSGallery"
$moduleNamesToPublish+="ISHServer.12"
$moduleNamesToPublish+="ISHServer.13"
$moduleNamesToPublish+="ISHServer.14"
break;
}
'Public+Internal' {
Expand All @@ -40,7 +41,7 @@ switch ($PSCmdlet.ParameterSetName)
$moduleNamesToPublish+="ISHServer.12"
$moduleNamesToPublish+="ISHServer.13"
$moduleNamesToPublish+="ISHServer.14"
break
break
}
}

Expand Down Expand Up @@ -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)
Expand All @@ -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"
}
Expand All @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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("**")){
Expand All @@ -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=@{
Expand Down Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
122 changes: 69 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,120 +1,136 @@
# 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

ISHServer offers two cmdlets to download and expand the ISHCD. **Notice that it will not install a CD!**
- `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

For installation and maintenance reasons, the module offers a couple of general purpose cmdlets:

- `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.
4 changes: 3 additions & 1 deletion Source/Modules/ISHServer/Get-ISHNETInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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}'} |
Expand All @@ -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'?
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions Source/Modules/ISHServer/Get-ISHOSInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ function Get-ISHOSInfo

begin
{
. $PSScriptRoot\Get-ISHNETInfo.ps1
}

process
Expand All @@ -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
}
Expand Down
Loading

0 comments on commit c973187

Please sign in to comment.