From a3aab9a82edb311f18e98cd6974f7007a6d82fc5 Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Thu, 27 Jul 2017 14:45:21 +0200 Subject: [PATCH 1/7] Workaround fix for ISH.13 installtool nlog limitations (#74) * GH-73 Temporary workaround. Modify the nlog.config file to include the process path * Gh-73 small fix * Made the workaround for Nlog.config more protected. Should not execute on a ISH.12 CD GH-73 --- Source/Server/Install/Install-ISHDeployment.ps1 | 15 +++++++++++++++ Source/Server/Install/Uninstall-ISHDeployment.ps1 | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Source/Server/Install/Install-ISHDeployment.ps1 b/Source/Server/Install/Install-ISHDeployment.ps1 index e2d6801..f1d7a96 100644 --- a/Source/Server/Install/Install-ISHDeployment.ps1 +++ b/Source/Server/Install/Install-ISHDeployment.ps1 @@ -345,6 +345,21 @@ $installScriptBlock={ "-installplan",$installPlanPath "-inputparameters",$inputParametersPathPath ) + + #region Workaround GH-73 + $nlogConfigPath=Join-Path $CDPath "__InstallTool\nlog.config" + if(Test-Path -Path $nlogConfigPath) + { + if(-not(Test-Path -Path ($nlogConfigPath+".bak"))) + { + $null=Copy-Item -Path $nlogConfigPath -Destination ($nlogConfigPath+".bak") + $nlog=Get-Content -Path $nlogConfigPath -Raw + $nlog=$nlog.Replace('fileName="${serviceName}.${processId}.${creationDateTime}.log"','fileName="${processname:fullName=True}.${processId}.${creationDateTime}.log"') + [System.IO.File]::WriteAllText($nlogConfigPath,$nlog) + } + } + #endregion + & $installToolPath $installToolArgs } diff --git a/Source/Server/Install/Uninstall-ISHDeployment.ps1 b/Source/Server/Install/Uninstall-ISHDeployment.ps1 index db34395..eaec352 100644 --- a/Source/Server/Install/Uninstall-ISHDeployment.ps1 +++ b/Source/Server/Install/Uninstall-ISHDeployment.ps1 @@ -59,6 +59,21 @@ $scriptBlock={ $installToolArgs=@("-Uninstall", "-project",$Name ) + + #region Workaround GH-73 + $nlogConfigPath=Join-Path $CDPath "__InstallTool\nlog.config" + if(Test-Path -Path $nlogConfigPath) + { + if(-not(Test-Path -Path ($nlogConfigPath+".bak"))) + { + $null=Copy-Item -Path $nlogConfigPath -Destination ($nlogConfigPath+".bak") + $nlog=Get-Content -Path $nlogConfigPath -Raw + $nlog=$nlog.Replace('fileName="${serviceName}.${processId}.${creationDateTime}.log"','fileName="${processname:fullName=True}.${processId}.${creationDateTime}.log"') + [System.IO.File]::WriteAllText($nlogConfigPath,$nlog) + } + } + #endregion + & $installToolPath $installToolArgs } From 2be2eef86d96b2c22a7916d237ede7e5cc0cbaab Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Tue, 8 Aug 2017 11:51:16 +0200 Subject: [PATCH 2/7] Installtoollocation (#75) * GH-73 Temporary workaround. Modify the nlog.config file to include the process path * Gh-73 small fix * Made the workaround for Nlog.config more protected. Should not execute on a ISH.12 CD GH-73 * GH-73 rolled back changes --- Source/Server/Helpers/Test-Administrator.ps1 | 2 +- Source/Server/Install/Install-ISHDeployment.ps1 | 15 --------------- Source/Server/Install/Uninstall-ISHDeployment.ps1 | 14 -------------- 3 files changed, 1 insertion(+), 30 deletions(-) diff --git a/Source/Server/Helpers/Test-Administrator.ps1 b/Source/Server/Helpers/Test-Administrator.ps1 index 933e50a..aa0333b 100644 --- a/Source/Server/Helpers/Test-Administrator.ps1 +++ b/Source/Server/Helpers/Test-Administrator.ps1 @@ -31,7 +31,7 @@ $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator # Check to see if we are currently running "as Administrator" if (-not $myWindowsPrincipal.IsInRole($adminRole)) { - Write-Error "The current Windows PowerShell session is not running as Administrator. Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -RecommendedAction "Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -ErrorAction Stop + throw "The current Windows PowerShell session is not running as Administrator. Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -RecommendedAction "Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -ErrorAction Stop } Write-Progress @scriptProgress -Completed diff --git a/Source/Server/Install/Install-ISHDeployment.ps1 b/Source/Server/Install/Install-ISHDeployment.ps1 index f1d7a96..e2d6801 100644 --- a/Source/Server/Install/Install-ISHDeployment.ps1 +++ b/Source/Server/Install/Install-ISHDeployment.ps1 @@ -345,21 +345,6 @@ $installScriptBlock={ "-installplan",$installPlanPath "-inputparameters",$inputParametersPathPath ) - - #region Workaround GH-73 - $nlogConfigPath=Join-Path $CDPath "__InstallTool\nlog.config" - if(Test-Path -Path $nlogConfigPath) - { - if(-not(Test-Path -Path ($nlogConfigPath+".bak"))) - { - $null=Copy-Item -Path $nlogConfigPath -Destination ($nlogConfigPath+".bak") - $nlog=Get-Content -Path $nlogConfigPath -Raw - $nlog=$nlog.Replace('fileName="${serviceName}.${processId}.${creationDateTime}.log"','fileName="${processname:fullName=True}.${processId}.${creationDateTime}.log"') - [System.IO.File]::WriteAllText($nlogConfigPath,$nlog) - } - } - #endregion - & $installToolPath $installToolArgs } diff --git a/Source/Server/Install/Uninstall-ISHDeployment.ps1 b/Source/Server/Install/Uninstall-ISHDeployment.ps1 index eaec352..1ffe891 100644 --- a/Source/Server/Install/Uninstall-ISHDeployment.ps1 +++ b/Source/Server/Install/Uninstall-ISHDeployment.ps1 @@ -60,20 +60,6 @@ $scriptBlock={ "-project",$Name ) - #region Workaround GH-73 - $nlogConfigPath=Join-Path $CDPath "__InstallTool\nlog.config" - if(Test-Path -Path $nlogConfigPath) - { - if(-not(Test-Path -Path ($nlogConfigPath+".bak"))) - { - $null=Copy-Item -Path $nlogConfigPath -Destination ($nlogConfigPath+".bak") - $nlog=Get-Content -Path $nlogConfigPath -Raw - $nlog=$nlog.Replace('fileName="${serviceName}.${processId}.${creationDateTime}.log"','fileName="${processname:fullName=True}.${processId}.${creationDateTime}.log"') - [System.IO.File]::WriteAllText($nlogConfigPath,$nlog) - } - } - #endregion - & $installToolPath $installToolArgs } From 1f2f4bb2d4129a2bebdbab6c7dc0eb9affeb4f13 Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Mon, 4 Sep 2017 11:57:54 +0200 Subject: [PATCH 3/7] Undo break in Test-Administrator.ps1 --- Source/Server/Helpers/Test-Administrator.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Server/Helpers/Test-Administrator.ps1 b/Source/Server/Helpers/Test-Administrator.ps1 index aa0333b..933e50a 100644 --- a/Source/Server/Helpers/Test-Administrator.ps1 +++ b/Source/Server/Helpers/Test-Administrator.ps1 @@ -31,7 +31,7 @@ $adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator # Check to see if we are currently running "as Administrator" if (-not $myWindowsPrincipal.IsInRole($adminRole)) { - throw "The current Windows PowerShell session is not running as Administrator. Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -RecommendedAction "Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -ErrorAction Stop + Write-Error "The current Windows PowerShell session is not running as Administrator. Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -RecommendedAction "Start Windows PowerShell by using the Run as Administrator option, and then try running the script again." -ErrorAction Stop } Write-Progress @scriptProgress -Completed From a31fca7b98a6811eff54909e09eb0252b74c4c1e Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Thu, 30 Nov 2017 13:22:47 +0100 Subject: [PATCH 4/7] Improve local (#76) * Issue self signed certificate and trust * Issue and use selfsigned certificates when issuer not specified --- Examples/Initialize-ISHServer.ps1 | 6 +- .../New-SelfSignedTrustedCertificate.ps1 | 64 +++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 Source/Server/Certificates/New-SelfSignedTrustedCertificate.ps1 diff --git a/Examples/Initialize-ISHServer.ps1 b/Examples/Initialize-ISHServer.ps1 index c8aa4d2..fa08a84 100644 --- a/Examples/Initialize-ISHServer.ps1 +++ b/Examples/Initialize-ISHServer.ps1 @@ -150,12 +150,14 @@ if($webCertificate) } } - & $serverScriptsPaths\IIS\Set-IISSslBinding.ps1 -Computer $computerName -Credential $credential -Thumbprint $certificate.Thumbprint } else { - & $serverScriptsPaths\IIS\Set-IISSslBinding.ps1 -Computer $computerName -Credential $credential + $certificate=& $serverScriptsPaths\Certificates\New-SelfSignedTrustedCertificate.ps1 -Computer $computerName -Credential $credential } +& $serverScriptsPaths\IIS\Set-IISSslBinding.ps1 -Computer $computerName -Credential $credential -Thumbprint $certificate.Thumbprint + + if($unc) { diff --git a/Source/Server/Certificates/New-SelfSignedTrustedCertificate.ps1 b/Source/Server/Certificates/New-SelfSignedTrustedCertificate.ps1 new file mode 100644 index 0000000..142a1d5 --- /dev/null +++ b/Source/Server/Certificates/New-SelfSignedTrustedCertificate.ps1 @@ -0,0 +1,64 @@ +<# +# 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. +#> + +param ( + [Parameter(Mandatory=$false)] + [string]$Computer=$null, + [Parameter(Mandatory=$false)] + [pscredential]$Credential=$null +) +$cmdletsPaths="$PSScriptRoot\..\..\Cmdlets" + +. "$cmdletsPaths\Helpers\Write-Separator.ps1" +. "$cmdletsPaths\Helpers\Get-ProgressHash.ps1" +Write-Separator -Invocation $MyInvocation -Header +$scriptProgress=Get-ProgressHash -Invocation $MyInvocation + +. "$cmdletsPaths\Helpers\Invoke-CommandWrap.ps1" + +try +{ + $block={ + # Using this provider with the self-signed certificate is very important because otherwise the .net code in ishsts cannot use to encrypt. + # INFO http://stackoverflow.com/questions/36295461/why-does-my-private-key-not-work-to-decrypt-a-key-encrypted-by-the-public-key + $providerName="Microsoft Strong Cryptographic Provider" + if($PSVersionTable.PSVersion.Major -ge 5) + { + $certificate=New-SelfSignedCertificate -DnsName $env:COMPUTERNAME -CertStoreLocation "cert:\LocalMachine\My" -Provider $providerName + } + else + { + # -Parameter not supported on PowerShell v4 New-SelfSignedCertificate + $certificate=New-SelfSignedCertificate -DnsName $env:COMPUTERNAME -CertStoreLocation "cert:\LocalMachine\My" + } + $rootStore = New-Object System.Security.Cryptography.X509Certificates.X509Store -ArgumentList Root, LocalMachine + $rootStore.Open("MaxAllowed") + $rootStore.Add($certificate) + $rootStore.Close() + + $certificate + } + $blockName="Create new selfsigned certificate" + Write-Progress @scriptProgress -Status $blockName + Invoke-CommandWrap -ComputerName $Computer -Credential $Credential -BlockName $blockName -ScriptBlock $block +} + +finally +{ +} + +Write-Progress @scriptProgress -Completed +Write-Separator -Invocation $MyInvocation -Footer \ No newline at end of file From 74ab8c19f0599fe9bd6587107f0b5f39e6d73dec Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Thu, 30 Nov 2017 13:23:57 +0100 Subject: [PATCH 5/7] GH-53 : Fixed issues (#69) * GH-53 : Fixed issues * GH-53 * Added the *.bat to the list of files --- CHANGELOG.md | 4 + Source/Builders/Initialize-ISH.Instance.ps1 | 27 +++- Source/Docker/ISH.Cmd.ps1 | 133 ++++++++++-------- Source/Docker/ISH.HealthCheck.ps1 | 9 +- Source/ISH.MSSQL.dockerfile | 4 + Source/ISH.dockerfile | 4 + Source/Invoke-DockerBuild.ps1 | 6 +- .../How to use the repository (Builders).md | 129 ++++++++++++++--- 8 files changed, 231 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d00121e..d4155b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## release v1.2 + +- GH-53: Add support for docker container images + ## release v1.1 - GH-66: Allow parallel building of AMI and Vagrant boxes. diff --git a/Source/Builders/Initialize-ISH.Instance.ps1 b/Source/Builders/Initialize-ISH.Instance.ps1 index ac52c05..33800be 100644 --- a/Source/Builders/Initialize-ISH.Instance.ps1 +++ b/Source/Builders/Initialize-ISH.Instance.ps1 @@ -17,7 +17,10 @@ param( [securestring]$PFXCertificatePassword, [Parameter(Mandatory=$false,ParameterSetName="External Database")] [Parameter(Mandatory=$false,ParameterSetName="Demo Database")] - [string]$HostName=$null + [string]$HostName=$null, + [Parameter(Mandatory=$false,ParameterSetName="External Database")] + [Parameter(Mandatory=$false,ParameterSetName="Demo Database")] + [switch]$InContainer=$false ) $cmdletsPaths="$PSScriptRoot\..\Cmdlets" @@ -102,6 +105,27 @@ Set-ISHUserLocal -OSUserCredentials $OSUserCredentials Set-ISHUserAdministrator -OSUser $osUserName Initialize-ISHUserLocalProfile -OSUserCredentials $OSUserCredentials +#region Grant read access to certificate private key + +if($InContainer) +{ + $permission = $OSUserCredentials.UserName,"Read","Allow" + $accessRule = New-Object -TypeName System.Security.AccessControl.FileSystemAccessRule -ArgumentList $permission + + $keyPath = $env:ProgramData + "\Microsoft\Crypto\RSA\MachineKeys\" + $keyName = $certificate.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName + $keyFullPath = Join-Path $keyPath $keyName + + # Get the current acl of the private key + $acl = Get-Acl -Path $keyFullPath + + # Add the new ace to the acl of the private key + $acl.AddAccessRule($accessRule) + + # Write back the new acl + Set-Acl -Path $keyFullPath -AclObject $acl +} +#endregion #endregion @@ -206,6 +230,7 @@ $extensions=@( "*.xsl" "*.ps1" "*.psm1" + "*.bat" ) $foldersToScan=@( diff --git a/Source/Docker/ISH.Cmd.ps1 b/Source/Docker/ISH.Cmd.ps1 index 59e85d9..ce78292 100644 --- a/Source/Docker/ISH.Cmd.ps1 +++ b/Source/Docker/ISH.Cmd.ps1 @@ -1,30 +1,30 @@ param( - [Parameter(Mandatory=$true,ParameterSet="External Database")] - [Parameter(Mandatory=$true,ParameterSet="Internal Database")] + [Parameter(Mandatory=$true,ParameterSetName="External Database")] + [Parameter(Mandatory=$true,ParameterSetName="Internal Database")] [string]$OsUserName, - [Parameter(Mandatory=$true,ParameterSet="External Database")] - [Parameter(Mandatory=$true,ParameterSet="Internal Database")] + [Parameter(Mandatory=$true,ParameterSetName="External Database")] + [Parameter(Mandatory=$true,ParameterSetName="Internal Database")] [string]$OsUserPassword, - [Parameter(Mandatory=$true,ParameterSet="External Database")] - [Parameter(Mandatory=$true,ParameterSet="Internal Database")] + [Parameter(Mandatory=$true,ParameterSetName="External Database")] + [Parameter(Mandatory=$true,ParameterSetName="Internal Database")] [string]$PFXCertificatePath, - [Parameter(Mandatory=$true,ParameterSet="External Database")] - [Parameter(Mandatory=$true,ParameterSet="Internal Database")] - [securestring]$PFXCertificatePassword, - [Parameter(Mandatory=$false,ParameterSet="External Database")] - [Parameter(Mandatory=$false,ParameterSet="Internal Database")] + [Parameter(Mandatory=$true,ParameterSetName="External Database")] + [Parameter(Mandatory=$true,ParameterSetName="Internal Database")] + [string]$PFXCertificatePassword, + [Parameter(Mandatory=$false,ParameterSetName="External Database")] + [Parameter(Mandatory=$false,ParameterSetName="Internal Database")] [string]$HostName=$null, - [Parameter(Mandatory=$true,ParameterSet="External Database")] + [Parameter(Mandatory=$true,ParameterSetName="External Database")] [string]$ConnectionString, - [Parameter(Mandatory=$true,ParameterSet="External Database")] + [Parameter(Mandatory=$true,ParameterSetName="External Database")] [ValidateSet("sqlserver2014","oracle")] [string]$DBType, - [Parameter(Mandatory=$false,ParameterSet="Internal Database")] + [Parameter(Mandatory=$false,ParameterSetName="Internal Database")] [string]$sa_password, - [Parameter(Mandatory=$false,ParameterSet="Internal Database")] + [Parameter(Mandatory=$false,ParameterSetName="Internal Database")] [string]$ACCEPT_EULA, - [Parameter(Mandatory=$false,ParameterSet="External Database")] - [Parameter(Mandatory=$false,ParameterSet="Internal Database")] + [Parameter(Mandatory=$false,ParameterSetName="External Database")] + [Parameter(Mandatory=$false,ParameterSetName="Internal Database")] [switch]$Loop=$false ) @@ -32,72 +32,91 @@ if ($PSBoundParameters['Debug']) { $DebugPreference = 'Continue' } -$buildersPath=Join-Path $PSScriptRoot "..\Builders" +$firstRunPath=Join-Path $env:ProgramData "ISHDocker" -$osUserCredentials=New-Object System.Management.Automation.PSCredential($OsUserName, (ConvertTo-SecureString -String $OsUserPassword -AsPlainText -Force)) -$pfxCertificateSecurePassword=ConvertTo-SecureString -String $PFXCertificatePassword -AsPlainText -Force +if(-not (Test-Path -Path $firstRunPath)) +{ + Write-Host "[DockerHost]Initializing container" -$hash=@{ - OsUserCredentials=$osUserCredentials - PFXCertificatePath=$PFXCertificatePath - PFXCertificatePassword=$pfxCertificateSecurePassword -} + $buildersPath=Join-Path $PSScriptRoot "..\Builders" -if($HostName) -{ - $hash.HostName=$HostName -} + $osUserCredentials=New-Object System.Management.Automation.PSCredential($OsUserName, (ConvertTo-SecureString -String $OsUserPassword -AsPlainText -Force)) + $osUserCredentials=Get-ISHNormalizedCredential -Credentials $osUserCredentials + $pfxCertificateSecurePassword=ConvertTo-SecureString -String $PFXCertificatePassword -AsPlainText -Force -switch ($PSCmdlet.ParameterSetName) -{ - 'External Database' { - $hash.ConnectionString=$ConnectionString - $hash.DbType=$DBType + $hash=@{ + OsUserCredentials=$osUserCredentials + PFXCertificatePath=$PFXCertificatePath + PFXCertificatePassword=$pfxCertificateSecurePassword } - 'Internal Database' { - $hash=@{ - } - & .\start -sa_password $sa_password -ACCEPT_EULA $ACCEPT_EULA -attach_dbs $attach_dbs + + if($HostName) + { + $hash.HostName=$HostName } -} -if($PSCmdlet.ParameterSetName -eq "Internal Database") -{ - # Doing part of the https://github.com/Sarafian/Docker/blob/master/Source/mssql2014-server-windows-express/start.ps1 + switch ($PSCmdlet.ParameterSetName) + { + 'External Database' { + $hash.ConnectionString=$ConnectionString + $hash.DbType=$DBType + } + 'Internal Database' { + Write-Host "[DockerHost]Starting internal database" + # Doing part of the https://github.com/Sarafian/Docker/blob/master/Source/mssql2014-server-windows-express/start.ps1 - if($ACCEPT_EULA -ne "Y" -And $ACCEPT_EULA -ne "y"){ - Write-Verbose "ERROR: You must accept the End User License Agreement before this container can start." - Write-Verbose "Set the environment variable ACCEPT_EULA to 'Y' if you accept the agreement." + if($ACCEPT_EULA -ne "Y" -And $ACCEPT_EULA -ne "y"){ + Write-Verbose "ERROR: You must accept the End User License Agreement before this container can start." + Write-Verbose "Set the environment variable ACCEPT_EULA to 'Y' if you accept the agreement." - exit 1 - } + exit 1 + } + + Write-Verbose "Starting SQL Server" + start-service MSSQL`$SQLEXPRESS - Write-Verbose "Starting SQL Server" - start-service MSSQL`$SQLEXPRESS + if($sa_password -ne "_"){ + Write-Verbose "Changing SA login credentials" + $sqlcmd = "ALTER LOGIN sa with password=" +"'" + $sa_password + "'" + ";ALTER LOGIN sa ENABLE;" + Invoke-Sqlcmd -Query $sqlcmd -ServerInstance ".\SQLEXPRESS" + } - if($sa_password -ne "_"){ - Write-Verbose "Changing SA login credentials" - $sqlcmd = "ALTER LOGIN sa with password=" +"'" + $sa_password + "'" + ";ALTER LOGIN sa ENABLE;" - Invoke-Sqlcmd -Query $sqlcmd -ServerInstance ".\SQLEXPRESS" + Write-Verbose "Started SQL Server." + } } - Write-Verbose "Started SQL Server." + Write-Host "[DockerHost]Initializing deployment" + & $buildersPath\Initialize-ISH.Instance.ps1 @hash -InContainer + + "Initialized" | Out-File -FilePath $firstRunPath -Force + Write-Host "[DockerHost]Container ready" +} +else +{ + Write-Host "[DockerHost]Container already initialized" } -& $buildersPath\Initialize-ISH.Instance.ps1 @hash if($Loop) { - $lastCheck = (Get-Date).AddSeconds(-2) + $intervalSeconds=30 + $lastCheck = (Get-Date).AddSeconds(-($intervalSeconds)) while ($true) { if($PSCmdlet.ParameterSetName -eq "Internal Database") { + Write-Host "Probing event log for MSSQL" Get-EventLog -LogName Application -Source "MSSQL*" -After $lastCheck | Select-Object TimeGenerated, EntryType, Message } # TODO: Figure out ISH event log source + Write-Host "Probing event log for Trisoft" Get-EventLog -LogName Application -Source "Trisoft*" -After $lastCheck | Select-Object TimeGenerated, EntryType, Message $lastCheck = Get-Date - Start-Sleep -Seconds 2 + Write-Host "Sleeping for $intervalSeconds seconds" + Start-Sleep -Seconds $intervalSeconds } +} +else +{ + Write-Host "hostname=$HostName" } \ No newline at end of file diff --git a/Source/Docker/ISH.HealthCheck.ps1 b/Source/Docker/ISH.HealthCheck.ps1 index f1cbaaa..f9d9dce 100644 --- a/Source/Docker/ISH.HealthCheck.ps1 +++ b/Source/Docker/ISH.HealthCheck.ps1 @@ -17,12 +17,15 @@ if($IncludeMSSQL) } $serviceNames|ForEach-Object { + Write-Host "Probing service $_" $service=Get-Service -Name $_ + Write-Host "Service $_ status is $($service.Status)" if($service.Status -ne [System.ServiceProcess.ServiceControllerStatus]::Running) { - Write-Host "$_ is not running" - exit -1 + Write-Host "[DockerHost]$_ is not running" + Write-Host "[DockerHost]Not healthy" + exit 1 } } - +Write-Host "[DockerHost]Healthy" exit 0 \ No newline at end of file diff --git a/Source/ISH.MSSQL.dockerfile b/Source/ISH.MSSQL.dockerfile index 6daadc2..bdb53c8 100644 --- a/Source/ISH.MSSQL.dockerfile +++ b/Source/ISH.MSSQL.dockerfile @@ -16,6 +16,10 @@ ENV ACCEPT_EULA _ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +# Workaround for powershell in interactive container can paste only 50 chars from clipboard +# https://github.com/moby/moby/issues/29646#issuecomment-300474598 +RUN Remove-Item -Path $env:ProgramFiles/WindowsPowerShell/Modules/PSReadLine" -Recurse -Force + ADD . C:/Provision/ISHBootstrap/Source ADD https://github.com/Microsoft/iis-docker/blob/master/windowsservercore/ServiceMonitor.exe?raw=true /Provision/ServiceMonitor.exe diff --git a/Source/ISH.dockerfile b/Source/ISH.dockerfile index fe8a5f5..8d500f2 100644 --- a/Source/ISH.dockerfile +++ b/Source/ISH.dockerfile @@ -17,6 +17,10 @@ ENV HostName _ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] +# Workaround for powershell in interactive container can paste only 50 chars from clipboard +# https://github.com/moby/moby/issues/29646#issuecomment-300474598 +RUN Remove-Item -Path $env:ProgramFiles/WindowsPowerShell/Modules/PSReadLine" -Recurse -Force + ADD . C:/Provision/ISHBootstrap/Source ADD https://github.com/Microsoft/iis-docker/blob/master/windowsservercore/ServiceMonitor.exe?raw=true /Provision/ServiceMonitor.exe diff --git a/Source/Invoke-DockerBuild.ps1 b/Source/Invoke-DockerBuild.ps1 index 2186cca..3d07b1e 100644 --- a/Source/Invoke-DockerBuild.ps1 +++ b/Source/Invoke-DockerBuild.ps1 @@ -1,5 +1,3 @@ -#requires -runasadministrator - param( [Parameter(Mandatory=$true,ParameterSetName="WindowsServerCore")] [Parameter(Mandatory=$true,ParameterSetName="MSSQLExpress")] @@ -72,11 +70,11 @@ else if($isWindowsClient) { - $memory="2GB" + $memory="4GB" Write-Warning "Client operating system detected. Container will run with Hyper-V isolation. Increasing the memory size to $memory" $dockerArgs+=@( "-m" - "2GB" + $memory ) } diff --git a/Tutorials/How to use the repository (Builders).md b/Tutorials/How to use the repository (Builders).md index ab3d59f..77cd504 100644 --- a/Tutorials/How to use the repository (Builders).md +++ b/Tutorials/How to use the repository (Builders).md @@ -62,38 +62,127 @@ Remove-Item -Path $PFXCertificatePath -Force Remove-Item -Path $PFXCertificatePasswordPath -Force ``` -# Using with AWS EC2 +# Using with Amazon Web Services -**To be improved** but in the meanwhile: +## Building -**Create AMI** +Use the `Invoke-PackerBuild.ps1` to start building an AMI. -1. Launch an EC2 from **Windows Server 2016 Base** AMI. -1. Execute the baking example script. -1. Capture the AMI +```powershell +$hash=@{ + ISHVersion="12.0.3" + IAMInstanceProfile="IAMInstanceProfile" + Region="eu-west-1" + AccessKey="AccessKey" + SecretKey="SecretKey" + # Optional + MockConnectionString="MockConnectionString" +} + +& .\Invoke-PackerBuild.ps1 @hash +``` + +When the `MockConnectionString` is not specified, then the root AMI image is a Windows Server 2012 R2 with SQL Server 2014 SP2 Express. The AMI then contains an internal database than can be used when creating new Content Manager EC2 instances -**Use AMI** +## Instantiating -1. Launch an EC2 from the created AMI. -1. Execute the instantiation example script. +As part of the `userdata` or **CodeDeploy** packages, to configure the EC2 execute the `Initialize-ISH.Instance.ps1` as discussed previously. # Using with Docker containers -**To be improved** but in the meanwhile: +**Notice** that SDL Knowledge Center doesn't support the official container technology. This section is created mostly as a fun hobby and to explore what is necessary to for the product to become container friendly. Therefore not containers are published nor available online. + +## Building containers + +When building the container, you need to specify the `ISHVersion` and amazon authorization for the S3 bucket that holds the ISHBootstrap dependencies. When building the image, there are two options depending on whether a mock connection string for a SQL Server 2014 SP2 ISH database is provided. When not provided, the container will derive from `asarafian/mssql-server-windows-express:2014SP2` and include a database. + +The following example builds a **SDL Knowledge Center 2016 SP3 Content Manager** (`$ishVersion="12.0.3"`) with embedded SQL Server 2014 SP2. The image name is `asarafian/ishmssql` with tag `12.0.3`. + +```powershell + +# Build container with internal SQL Server 2014 SP2 +$hash=@{ + ISHVersion="12.0.3" + AccessKey="accesskey" + SecretKey="secretkey" +} + +& .\Invoke-DockerBuild.ps1 @hash + +``` -In the docker file +The following example builds a **SDL Knowledge Center 2016 SP3 Content Manager** (`$ishVersion="12.0.3"`) using an external database with connection string `connectionstring`. The image name is `asarafian/ish` with tag `12.0.3`. -- Build the image with the baking example script. -- Run the image with the instantiation example script. +```powershell + +# Build container with internal SQL Server 2014 SP2 +$hash=@{ + ISHVersion="12.0.3" + AccessKey="accesskey" + SecretKey="secretkey" + MockConnectionString="connectionstring" +} + +& .\Invoke-DockerBuild.ps1 @hash + +``` + +## Running containers + +When running a container we need to provide the following information + +| Data | Image | Required | Remarks | +| ---- | ----- | -------- | ------- | +| Certificate | asarafian/ishmssql:12.0.3 | Yes | | +| Certificate | asarafian/ish:12.0.3 | Yes | | +| Hostname | asarafian/ishmssql:12.0.3 | No | Will use the certificate's subject name when available. Required when using wild-card certificates | +| Hostname | asarafian/ish:12.0.3 | No | Will use the certificate's subject name when available. Required when using wild-card certificates | +| Credentials | asarafian/ishmssql:12.0.3 | No | Default in the docker file | +| Credentials | asarafian/ish:12.0.3 | No | Default in the docker file | +| Credentials | asarafian/ish:12.0.3 | No | Default in the docker file | +| ACCEPT_EULA | asarafian/ishmssql:12.0.3 | Yes | | +| ACCEPT_EULA | asarafian/ish:12.0.3 | No | | +| Database | asarafian/ish:12.0.3 | Yes | | + +The following runs a **SDL Knowledge Center 2016 SP3 Content Manager** (`asarafian/ishmssql:12.0.3`) container with the embedded database + +```text +docker run -d -e PFXCertificatePath="PFXCertificatePath" -e PFXCertificatePassword="PFXCertificatePassword" -e HostName="ish.example.com" -e ACCEPT_EULA=Y asarafian/ishmssql:12.0.3 +``` +The following runs a **SDL Knowledge Center 2016 SP3 Content Manager** (`asarafian/ish:12.0.3`) container + +```text +docker run -d -e PFXCertificatePath="PFXCertificatePath" -e PFXCertificatePassword="PFXCertificatePassword" -e HostName="ish.example.com" -e ConnectionString="connectionstring" -e ACCEPT_EULA=Y asarafian/ish:12.0.3 +``` + +The `PFXCertificatePath` has to be a `.pfx` file available on the container's file system, so it's necessary to mount a volume before that. + +The containers are very basic but the provide a very good starting point. Further specialization is required to create containers for specific roles and for specific values. This will accelerate the duration of the `docker run` command. + +When the container starts, specific message prefixed with `[DockerHost]` are emitted. To track when the container is ready and the endpoints are available look for `[DockerHost]Container ready` using `docker logs` command. # Using with Hyper-V -**To be improved** but in the meanwhile: +## Building + +Use the `Invoke-PackerBuild.ps1` to start building a Vagrant box. + +```powershell +$hash=@{ + ISHVersion="12.0.3" + IAMInstanceProfile="IAMInstanceProfile" + Region="eu-west-1" + AccessKey="AccessKey" + SecretKey="SecretKey" + MockConnectionString="MockConnectionString" + ISOUrl="ISOUrl" +} + +& .\Invoke-PackerBuild.ps1 @hash +``` + +Add the output vagrant box to your environment -1. Prepare a clean Hyper-V instance. -1. Execute the baking example script. -1. Export the VM. -1. Create a new VM from the exported one. -1. Execute the instantiation example script. +## Instantiating -The process can be significantly improved by using [Packer](https://www.packer.io) and [Vagrant](vagrantbox.com). `Invoke-DockerBuild.ps1` and `Invoke-PackerBuild.ps1` wrap around the complexity of initializing parameters for packer and docker and create a container, an AMI or a vagrant box depending on the parameter set used. \ No newline at end of file +Within the provisioning section of the Vagrant file, make sure the `Initialize-ISH.Instance.ps1` is executed as discussed previously. \ No newline at end of file From 1486ad7e84f36173b6702b993f8d403f95df935c Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Thu, 30 Nov 2017 13:27:08 +0100 Subject: [PATCH 6/7] Container (#79) * GH-53 : Fixed issues * GH-53 * Added the *.bat to the list of files From 43746bf6bfb9a361e2461aca65f4d72a004aa965 Mon Sep 17 00:00:00 2001 From: Alex Sarafian Date: Fri, 1 Dec 2017 11:29:09 +0100 Subject: [PATCH 7/7] GH-78 (#81) --- CHANGELOG.md | 4 +++ README.md | 14 ++++---- .../Database/Restore-MockDatabase.ps1 | 4 +-- .../How to use the repository (Builders).md | 32 +++++++++---------- .../How to use the repository (Examples).md | 32 +++++++++---------- 5 files changed, 44 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4155b5..ce14943 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ## release v1.2 - GH-53: Add support for docker container images +- GH-78: Make ContentManager2018 the primary target + +Remarks: +- Moved links from https://github.com/Sarafian to https://github.com/sdl . ## release v1.1 diff --git a/README.md b/README.md index 4ea4751..2cd5029 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,17 @@ Bootstrapper for [SDL Knowledge Center](https://sdl.com/xml) Content Manager dep For those who don't like repetitive tasks, this repository is all about automating the deployment of [SDL Knowledge Center](sdl.com/xml) Content Manager. [SDL Knowledge Center](sdl.com/xml) Content Manager is also known as with historical names ~~Trisoft~~, ~~InfoShare~~ or as we recently established **ISH**. -I initially started this codebase as my own internal automation for a lab that I use to experiment with [ISHDeploy](https://sarafian.github.io/tags/ishdeploy/). +I initially started this codebase as my own internal automation for a lab that I use to experiment with [ISHDeploy](https://sarafian.github.io/tags/#ISHDeploy). This repository is a port of that code base combined with some effort to improve it. # Goal -With the ISHBootstrapper the following flow gets automated for a clean/default Windows Server 2012 R2 installation +With the ISHBootstrapper the following flow gets automated for a clean/default Windows Server 2016 installation -1. Install the `PowerShellGet` powershell module to easily install modules. Windows Server 2012 R2 offers out of the box Powershell v4.0. Content Manager 12.0.* supports version v4.0. 1. Enable and configure the **WinRM** (Windows Remoting) for secure connections and `CredSSP` -1. Install Content Manager prerequisites as described in the [documentation](https://docs.sdl.com/LiveContent/web/pub.xql?action=home&pub=SDL Knowledge Center full documentation-v2&lang=en-US) +1. Install Content Manager prerequisites as described in the [documentation](https://docs.sdl.com/LiveContent/web/pub.xql?action=home&pub=SDL%20Knowledge%20Center%20full%20documentation-v3&lang=en-US) 1. Copy the deliverable of the Content Manager CD 1. Install Content Manager. One or more deployments. -1. Execute [ISHDeploy](powershellgallery.com/packages/ISHDeploy.12.0.0/) based code as configuration scripts +1. Execute [ISHDeploy](powershellgallery.com/packages/ISHDeploy.13/) based code as configuration scripts Do all of the above with minimum manual actions and all should work locally and remotely. At the end the dream goal is to execute a seamless update of a Content Manager deployments @@ -25,9 +24,8 @@ At the end the dream goal is to execute a seamless update of a Content Manager d **Remarks**: - Typically a Content Manager deployment is deployed on a server already part of Active Directory. -For this reason, some remote instructions fill face the double hop limitation described in [Powershell Remoting Caveats](https://sarafian.github.io/post/powershell/powershell-remoting-caveats/) and to work around the problem sessions with `CredSSP` will be required. +For this reason, some remote instructions fill face the double hop limitation described in [Powershell Remoting Caveats](https://sarafian.github.io/2016/07/05/remoting-caveats.html) and to work around the problem sessions with `CredSSP` will be required. - Not all modules available here will be published to PowerShell gallery. Setting up an internal nuget repository is easy. The process is described [here](https://docs.nuget.org/create/hosting-your-own-nuget-feeds). -- The code base will work against current **Knowledge Center 2016 Content Manager 12.0.0** but the code base will support future minor releases like **Knowledge Center 2016 Content Manager 12.0.1** and future major releases that is only internally available. - To avoid revealing internal asset names some variables will not be defined in code but we'll be acquired with cmdlets such as `Get-Variable` # Using the repository @@ -45,4 +43,4 @@ Potential targets of a trigger can be: # Acknowledgements -This a **personal** effort and by **no means** reflects an official deliverable for [SDL](sdl.com). +This a **personal** effort and by **no means** reflects an official deliverable for [SDL](sdl.com). \ No newline at end of file diff --git a/Source/Builders/Database/Restore-MockDatabase.ps1 b/Source/Builders/Database/Restore-MockDatabase.ps1 index eaca529..2d5d775 100644 --- a/Source/Builders/Database/Restore-MockDatabase.ps1 +++ b/Source/Builders/Database/Restore-MockDatabase.ps1 @@ -55,8 +55,8 @@ $segments=@( $ishCDPath "Database" "Dump" - "SQLServer2012" - "20151116.InfoShareEmpty-12.0.0-sqlserver2012.isource.InfoShare-OasisDita.1.2.bak" + "SQLServer2014" + "20171018.ISHEmpty-13.0.0-sqlserver2014.isource.InfoShare-OasisDita.1.2.bak" ) $infoShareBakPath=$segments -join '\' diff --git a/Tutorials/How to use the repository (Builders).md b/Tutorials/How to use the repository (Builders).md index 77cd504..f356687 100644 --- a/Tutorials/How to use the repository (Builders).md +++ b/Tutorials/How to use the repository (Builders).md @@ -10,28 +10,28 @@ The **builders** is a collection of scripts that wrap up the rest of the reposit ## Baking -The following example bakes a **SDL Knowledge Center 2016 SP3 Content Manager** (`$ishVersion="12.0.3"`) +The following example bakes a **SDL Knowledge Center 2018 Content Manager** (`$ishVersion="13.0.0"`) ```powershell Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null Save-Script -Name Get-Github -Path $env:TEMP -Force $getGitHubPath=Join-Path $env:TEMP Get-GitHub.ps1 -$ishBootstrapPath=(& $getGitHubPath -User Sarafian -Repository ISHBootstrap -Expand).FullName +$ishBootstrapPath=(& $getGitHubPath -User sdl -Repository ISHBootstrap -Expand).FullName $buildersPath="$ishBootstrapPath\Source\Builders" -$ishVersion="12.0.3" -$awsISH1203=@{ +$ishVersion="13.0.0" +$awsISH1300=@{ BucketName="sct-released" - ISHServerFolder="InfoShare/12.0/PreRequisites" - ISHCDFolder="InfoShare/12.0/" - ISHCDFileName="20170125.CD.InfoShare.12.0.3725.3.Trisoft-DITA-OT.exe" + ISHServerFolder="InfoShare/13.0/PreRequisites" + ISHCDFolder="InfoShare/13.0/" + ISHCDFileName="20171110.CD.InfoShare.13.0.3510.0.Trisoft-DITA-OT.exe" AccessKey="accesskey" SecretKey="secretkey" } & $buildersPath\Default\Install-ISHBootstrapPrerequisites.ps1 -ISHVersion $ishVersion -& $buildersPath\Initialize-ISHImage.ps1 @awsISH1203 -ISHVersion $ishVersion -InformationAction Continue -ErrorAction Stop +& $buildersPath\Initialize-ISHImage.ps1 @awsISH1300 -ISHVersion $ishVersion -InformationAction Continue -ErrorAction Stop ``` ## Instantiating @@ -45,7 +45,7 @@ Set-StrictMode -Version latest Save-Script -Name Get-Github -Path $env:TEMP -Force $getGitHubPath=Join-Path $env:TEMP Get-GitHub.ps1 -$ishBootstrapPath=(& $getGitHubPath -User Sarafian -Repository ISHBootstrap -Branch import-builders -Expand).FullName +$ishBootstrapPath=(& $getGitHubPath -User sdl -Repository ISHBootstrap -Branch import-builders -Expand).FullName $buildersPath="$ishBootstrapPath\Source\Builders" $osUserCredentials=New-Object System.Management.Automation.PSCredential("InfoShareServiceUser",(ConvertTo-SecureString "Password123" -AsPlainText -Force)) @@ -70,7 +70,7 @@ Use the `Invoke-PackerBuild.ps1` to start building an AMI. ```powershell $hash=@{ - ISHVersion="12.0.3" + ISHVersion="13.0.0" IAMInstanceProfile="IAMInstanceProfile" Region="eu-west-1" AccessKey="AccessKey" @@ -96,13 +96,13 @@ As part of the `userdata` or **CodeDeploy** packages, to configure the EC2 execu When building the container, you need to specify the `ISHVersion` and amazon authorization for the S3 bucket that holds the ISHBootstrap dependencies. When building the image, there are two options depending on whether a mock connection string for a SQL Server 2014 SP2 ISH database is provided. When not provided, the container will derive from `asarafian/mssql-server-windows-express:2014SP2` and include a database. -The following example builds a **SDL Knowledge Center 2016 SP3 Content Manager** (`$ishVersion="12.0.3"`) with embedded SQL Server 2014 SP2. The image name is `asarafian/ishmssql` with tag `12.0.3`. +The following example builds a **SDL Knowledge Center 2018 Content Manager** (`$ishVersion="13.0.0"`) with embedded SQL Server 2014 SP2. The image name is `asarafian/ishmssql` with tag `13.0.0`. ```powershell -# Build container with internal SQL Server 2014 SP2 +# Build container with internal SQL Server 2016 $hash=@{ - ISHVersion="12.0.3" + ISHVersion="13.0.0" AccessKey="accesskey" SecretKey="secretkey" } @@ -111,13 +111,13 @@ $hash=@{ ``` -The following example builds a **SDL Knowledge Center 2016 SP3 Content Manager** (`$ishVersion="12.0.3"`) using an external database with connection string `connectionstring`. The image name is `asarafian/ish` with tag `12.0.3`. +The following example builds a **SDL Knowledge Center 2018 Content Manager** (`$ishVersion="13.0.0"`) using an external database with connection string `connectionstring`. The image name is `asarafian/ish` with tag `13.0.0`. ```powershell # Build container with internal SQL Server 2014 SP2 $hash=@{ - ISHVersion="12.0.3" + ISHVersion="13.0.0" AccessKey="accesskey" SecretKey="secretkey" MockConnectionString="connectionstring" @@ -169,7 +169,7 @@ Use the `Invoke-PackerBuild.ps1` to start building a Vagrant box. ```powershell $hash=@{ - ISHVersion="12.0.3" + ISHVersion="13.0.0" IAMInstanceProfile="IAMInstanceProfile" Region="eu-west-1" AccessKey="AccessKey" diff --git a/Tutorials/How to use the repository (Examples).md b/Tutorials/How to use the repository (Examples).md index 4892e93..00283c1 100644 --- a/Tutorials/How to use the repository (Examples).md +++ b/Tutorials/How to use the repository (Examples).md @@ -1,6 +1,6 @@ # How to use the repository (Examples) -Starting from a clean server operating system this how you end up with a [SDL Knowledge Center 2016](sdl.com/xml) Content Manager 12.0.1 Deployment. +Starting from a clean server operating system this how you end up with a [SDL Knowledge Center 2018](sdl.com/xml) Content Manager Deployment. # Acknowledgements @@ -11,8 +11,8 @@ Starting from a clean server operating system this how you end up with a [SDL Kn - Dependency to PowerShell modules on gallery - [CertificatePS](http://www.powershellgallery.com/packages/CertificatePS/). This is used to help with certificate templates. Read more about this [here](https://github.com/Sarafian/CertificatePS) - [PSFTP](http://www.powershellgallery.com/packages/PSFTP/). This is used to download files from an ftp server. - - [ISHServer.12](http://www.powershellgallery.com/packages/ISHServer.12/). This is used to automate the prerequisites instalation. - - [ISHDeploy.12.0.0](http://www.powershellgallery.com/packages/ISHDeploy.12.0.0/). This is used to download files from an ftp server. + - [ISHServer.13](http://www.powershellgallery.com/packages/ISHServer.13/). This is used to automate the prerequisites instalation. + - [ISHDeploy.13](http://www.powershellgallery.com/packages/ISHDeploy.13/). This is used to download files from an ftp server. To quickly host an internal NuGet server follow the instructions in this [article](https://docs.nuget.org/create/hosting-your-own-nuget-feeds). Once the server is up you need to register the repository on your system while specifying the both the `-SourceLocation` and `PublishLocation` parameters. @@ -29,10 +29,10 @@ The process depends on scripts in the examples directory. To help run these scri 1. Register a repository for `mymachine`. 1. Install all modules 1. Enable the CredSSP authentication for PSSession. -1. Install the server prerequisites using module [ISHServer.12](http://www.powershellgallery.com/packages/ISHServer.12/). +1. Install the server prerequisites using module [ISHServer.13](http://www.powershellgallery.com/packages/ISHServer.13/). 1. Seed the server with a Content Manager CD. 1. Install a deployment. -1. Apply code as configuration scripts using PowerShell module [ISHDeploy.12.0.1](www.powershellgallery.com/packages/ISHDeploy.12.0.1/). Other module variants are also possible +1. Apply code as configuration scripts using PowerShell module [ISHDeploy.13](www.powershellgallery.com/packages/ISHDeploy.13/). Other module variants are also possible 1. Run Pester tests ## Load the data container json file @@ -43,7 +43,7 @@ The process depends on scripts in the examples directory. To help run these scri An obfuscated file for local execution looks like this ```json { - "ISHVersion": "12.0.1", + "ISHVersion": "13.0.0", "ISHDeployRepository": "PSGallery", "PSRepository": [ ], @@ -55,9 +55,9 @@ An obfuscated file for local execution looks like this "FTP": { "Host": "host", "CredentialExpression": "New-Credential -Message \"FTP\"", - "ISHServerFolder": "Download/InfoShare120/ISHServer/", - "ISHCDFolder": "Download/InfoShare120/SP1/", - "ISHCDFileName": "20160815.CD.InfoShare.12.0.3215.1.Trisoft-DITA-OT.exe", + "ISHServerFolder": "Download/InfoShare130/ISHServer/", + "ISHCDFolder": "Download/InfoShare130/SP0/", + "ISHCDFileName": "20171110.CD.InfoShare.13.0.3510.0.Trisoft-DITA-OT.exe", "AntennaHouseLicensePath": "License/AntennaHouse/AHFormatter.lic" }, "AWSS3": { @@ -65,9 +65,9 @@ An obfuscated file for local execution looks like this "ProfileName": "profilename", "AccessKey": "accesskey", "SecretKey": "secretkey", - "ISHServerFolderKey": "InfoShare/12.0/PreRequisites", - "ISHCDFolderKey": "InfoShare/12.0/", - "ISHCDFileName": "20160815.CD.InfoShare.12.0.3215.1.Trisoft-DITA-OT.exe", + "ISHServerFolderKey": "InfoShare/13.0/PreRequisites", + "ISHCDFolderKey": "InfoShare/13.0/", + "ISHCDFileName": "20171110.CD.InfoShare.13.0.3510.0.Trisoft-DITA-OT.exe", "AntennaHouseLicenseKey": "Licenses/AntennaHouse/AHFormatter.lic" }, "OSUserCredentialExpression": "New-Credential -Message \"OSUser\"", @@ -130,7 +130,7 @@ Installs all required modules. & .\Examples\Initialize-WinRM.ps1 ``` -The required certificate for the Secure WinRM is issued by the domain certificate authority, effectively making it a double hop. More about the issue [PowerShell Remoting Caveats](https://sarafian.github.io/post/powershell/powershell-remoting-caveats/). +The required certificate for the Secure WinRM is issued by the domain certificate authority, effectively making it a double hop. More about the issue [PowerShell Remoting Caveats](https://sarafian.github.io/2016/07/05/remoting-caveats.html). For this script to work we need an extra fragment in the JSON ```json @@ -263,9 +263,9 @@ You can trigger the sequence with ``` The above scripts are based on executing script blocks on the remote servers. -This pattern is not very friendly to the concept of code as configuration as described on [code as configuration](https://sarafian.github.io/post/code%20as%20configuration/). +This pattern is not very friendly to the concept of code as configuration as described on [code as configuration](https://sarafian.github.io/2016/05/17/code-configuration.html). Although much of the noise is hidden away using the `Invoke-CommandWrap` which is available on [gist](https://gist.github.com/Sarafian/a277cd64468a570dff74682eb929ff3c) for some people it is not good enough. -For this reason all scripts have a sibling counterpart that uses implicit remoting as described on [import and use module from a remote server](https://sarafian.github.io/post/powershell/Import-Use-Module-Remote-Server/). +For this reason all scripts have a sibling counterpart that uses implicit remoting as described on [import and use module from a remote server]https://sarafian.github.io/tips/2016/07/01/Import-Module-Remote.html). - `Set-ISHCMComponents.ImplicitRemoting.ps1` - `Set-ISHCMMenuAndButton.ImplicitRemoting.ps1` @@ -276,7 +276,7 @@ For this reason all scripts have a sibling counterpart that uses implicit remoti All *ImplicitRemoting.ps1* variants do exactly the same thing but the code is conceptually different. You must also watch out because the code executes also differently. There are some important aspects of PowerShell remoting that one needs to be aware of. -Read more about it on [PowerShell remoting caveats](https://sarafian.github.io/post/powershell/powershell-remoting-caveats/) and google. +Read more about it on [PowerShell remoting caveats](https://sarafian.github.io/2016/07/05/remoting-caveats.html) and google. > What you see is not exactly what you get!