Skip to content

Commit

Permalink
GH-115: Merge changes to master (#118)
Browse files Browse the repository at this point in the history
* Update valid versions

* Update valid versions

* Update CHANGELOG.md

* GH-84 Add installation of AdoptOpenJDK pre-requisite

* GH-84 Add installation of AdoptOpenJDK pre-requisite

* GH-84: Add installation of AdoptOpenJDK and JRE pre-requisite

* GH-84: Add installation of AdoptOpenJDK and JRE pre-requisite

* GH-85: Make sure that the minLevel of the File logger is set to 'Debug' for InstallTool

* GH-85: Make sure that the minLevel of the File logger is set to 'Debug' for InstallTool

* GH-86: Make it possible to initialize an image with only the third party software prerequisites and/or the Application prerequisites and installation

* GH-87: Restore support for local SQL Server Express database for Vagrant boxes (Hyper-V) (#88)

* Restore local SQLExpress mockdatabase support

* Restore local SQLExpress mockdatabase support

* Restore local SQLExpress mockdatabase support - Networking/login config

* Restore local SQLExpress mockdatabase support - Rename

* Restore local SQLExpress mockdatabase support - Correct download url

* Restore local SQLExpress mockdatabase support - Use a specific instancename: ISHSQLEXPRESS

* Restore local SQLExpress mockdatabase support - CHANGELOG

* Restore local SQLExpress mockdatabase support - Configure ISHSQLEXPRESS tcp/login when installing (#90)

* GH-89: Add support for Windows Server 2019 (#91)

* GH-89: Add support for Windows Server 2019

* GH-92: Initialize-MockDatabase.ps1 - Support creation of a SQL user when initializing the mock database (#93)

GH-92: Initialize-MockDatabase.ps1 - Support creation of a SQL user when initializing the mock database

* GH-94: Add support for local SQL Server (Express) 2016 database for AWS (EC2) instances (#96)

* GH-97: DevelopFriendly - PowerShell scripts to help in troubleshooting instances (#98)

* GH-101 DevelopFriendly - Improve PowerShell scripts to help in troubleshooting instances (#103)

* GH102 Database - Add the option to restore the Demo or and Empty database from the ISHCD (#104)

* Gh 100   make changes required to support the future new 'versionless' ish deploy module (#105)

* GH-100 Make changes required to support the future new 'versionless' ISHDeploy module

* GH-99 - Update CHANGELOG (#106)

* Gh 107   changes required for new ishcs web application (#108)

* GH-107 - Changes required for new ISHCS web application

* Gh 109   make sure that the min level of the file logger (n log) for install tool is set to the required value (#110)

* GH-109 Make sure that the minLevel of the File logger (NLog) for InstallTool is set to the required value

* GH-109 Make sure that the minLevel of the File logger (NLog) for InstallTool is set to the required value

* GH-111 : Packer - Provide the correct ps_java_... inputparameters (#113)

* GH-114: Review/update readme, changelog, releasnotes, versions, ... (#117)

* GH-114: Review/Update README, CHANGELOG, RELEASNOTES, versions, ...
  • Loading branch information
beutepa authored Jul 2, 2019
1 parent 2507d83 commit 1f3dcfe
Show file tree
Hide file tree
Showing 45 changed files with 1,933 additions and 224 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Change log

## release v1.3

- GH-107: Changes required for new 'ISHCS' web application (InstallTool inputparameters)
- GH-102: Database - Add the option to restore the Demo or and Empty database from the ISHCD as local/'mock' database
- GH-101: DevelopFriendly - Improve PowerShell scripts to help in troubleshooting instances
- GH-100: Update the example scripts to use the 'versionless' ISHDeploy module
- GH-97: DevelopFriendly - PowerShell scripts to help in troubleshooting instances (enhancement)
- GH-94: Add support for local SQL Server (Express) 2016 database for AWS (EC2) instances (enhancement)
- GH-92: Initialize-MockDatabase.ps1 - Support creation of a SQL user when initializing the mock database (enhancement)
- GH-89: Add support for Windows Server 2019
- GH-87: Restore support for local SQL Server Express database for Vagrant boxes (Hyper-V)
- GH-86: Make it possible to initialize an image with only the third party software prerequisites and/or the Application prerequisites and installation
- GH-85: Make sure that the minLevel of the File logger is set to 'Debug' for InstallTool
- GH-84: Add installation of AdoptOpenJDK and JRE pre-requisite
- Update valid/supported versions (released: 13.0.1, 13.0.2, not released 14.0.0).

## release v1.2

- GH-53: Add support for docker container images
Expand Down
4 changes: 2 additions & 2 deletions Examples/Clean-ISH.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ $cleanBlock= {
$infoSharePath="C:\InfoShare"
Write-Debug "infoSharePath=$infoSharePath"

$ishDeployProgramDataPath=Join-Path "C:\ProgramData" "ISHDeploy.$ishVersion"
$ishDeployProgramDataPath=Join-Path "C:\ProgramData" "ISHDeploy"
Write-Debug "ishDeployProgramDataPath=$ishDeployProgramDataPath"

$ishServerProgramDataPath=Join-Path "C:\ProgramData" "ISHServer.$ishServerVersion"
Write-Debug "ishServerProgramDataPath=$ishServerProgramDataPath"

$ishDeployModuleName="ISHDeploy.$ishVersion"
$ishDeployModuleName="ISHDeploy"
Write-Debug "ishDeployModuleName=$ishDeployModuleName"
$ishServerModuleName="ISHServer.$ishServerVersion"
Write-Debug "ishServerModuleName=$ishServerModuleName"
Expand Down
2 changes: 1 addition & 1 deletion Examples/ISHDeploy/Get-Status.ImplicitRemoting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}
$remoteADFS=Add-ModuleFromRemote -ComputerName $adfsComputerName -Name ADFS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}
$remoteADFS=Add-ModuleFromRemote -ComputerName $adfsComputerName -Name ADFS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/ISHDeploy/Set-ISHSTSWindows.ImplicitRemoting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ try
{
$ishServerVersion=($ISHVersion -split "\.")[0]
$ishServerModuleName="ISHServer.$ishServerVersion"
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name @($ishServerModuleName,$ishDelpoyModuleName)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/ISHDeploy/Undo-ISHDeployment.ImplicitRemoting.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ try

if($Computer)
{
$ishDelpoyModuleName="ISHDeploy.$ISHVersion"
$ishDelpoyModuleName="ISHDeploy"
$remote=Add-ModuleFromRemote -ComputerName $Computer -Credential $Credential -Name $ishDelpoyModuleName
}

Expand Down
2 changes: 1 addition & 1 deletion Examples/Install-Module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ try
$ishServerModuleName="ISHServer.$ishServerVersion"

$ishDeployRepository=Get-ISHBootstrapperContextValue -ValuePath "ISHDeployRepository" -DefaultValue PSGallery
$ishDeployModuleName="ISHDeploy.$ishVersion"
$ishDeployModuleName="ISHDeploy"

$scope=Get-ISHBootstrapperContextValue -ValuePath "InstallModuleScope" -DefaultValue "AllUsers"

Expand Down
2 changes: 1 addition & 1 deletion Examples/UnInstall-ISH.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $ishVersion=Get-ISHBootstrapperContextValue -ValuePath "ISHVersion"


$getDeploymentsBlock= {
$ishDeployModuleName="ISHDeploy.$ishVersion"
$ishDeployModuleName="ISHDeploy"
if(Get-Module $ishDeployModuleName -ListAvailable)
{
Get-ISHDeployment |Select-Object -ExpandProperty Name
Expand Down
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
# ISHBootstrap
Bootstrapper for [SDL Knowledge Center](https://sdl.com/xml) Content Manager deployments
Bootstrapper for deployments of [SDL Tridion Docs](https://sdl.com/xml) Content Manager (Knowledge Center Content Manager, LiveContent Architect, Trisoft InfoShare)

# Description

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**.
For those who don't like repetitive tasks, this repository is all about automating the deployment of [SDL Tridion Docs](https://sdl.com/xml) Content Manager.
[SDL Tridion Docs](https://sdl.com/xml) Content Manager is also known under its historical product names Knowledge Center Content Manager, LiveContent Architect, Trisoft InfoShare.

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.
ISHBootstrap gives you the ability to bootstrap a clean Windows Server (bare metal, virtualized, cloud) and turn it into a fully operational Content Manager (ISH) deployment.
The bootstrapping can be executed locally or against a remote server using Windows remoting.
The supported operating systems are Windows Server 2012R2, 2016, 2019.

[How to use the repository (Examples)](Tutorials/How%20to%20use%20the%20repository%20(Examples).md) showcases how the complete process could look like, driven by a json file.
But keep in mind that this is just an example.

[How to use the repository (Builders)](Tutorials/How%20to%20use%20the%20repository%20(Builders).md) explains how to use the 'builders' to build artifacts such as Amazon Web Services (AWS) EC2 AMI or Hyper-V Vagrant boxes.

# Goal
With the ISHBootstrapper the following flow gets automated for a clean/default Windows Server 2016 installation

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%20Knowledge%20Center%20full%20documentation-v3&lang=en-US)
1. Install Content Manager prerequisites as described in the [documentation](https://docs.sdl.com/LiveContent/), under the section 'SDL Tridion Docs'.
1. Copy the deliverable of the Content Manager CD
1. Install Content Manager. One or more deployments.
1. Execute [ISHDeploy](powershellgallery.com/packages/ISHDeploy.13/) based code as configuration scripts
1. Execute [ISHDeploy](https://powershellgallery.com/packages/ISHDeploy/) 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
Expand All @@ -30,7 +36,7 @@ For this reason, some remote instructions fill face the double hop limitation de

# Using the repository

Tutorials are also provided in [Tutorials](Tutorials) folder.
As mentioned before some tutorials are provided in the [Tutorials](Tutorials) folder.

# Future

Expand All @@ -39,8 +45,4 @@ Potential targets of a trigger can be:

- Deliver a collection of servers.
- Spin up a server on demand and then take it down.
- Spin up a environment for full client/api/data testing and then take it down.

# Acknowledgements

This a **personal** effort and by **no means** reflects an official deliverable for [SDL](sdl.com).
- Spin up a environment for full client/api/data testing and then take it down.
12 changes: 10 additions & 2 deletions Source/Bake-ISHFromAWSS3.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
param(
[Parameter(Mandatory=$true,ParameterSetName="Default Authorization")]
[Parameter(Mandatory=$true,ParameterSetName="Custom Authorization")]
[ValidateSet("12.0.3","12.0.4","13.0.0")]
[ValidateSet("12.0.3","12.0.4","13.0.0","13.0.1","13.0.2","14.0.0")]
[string]$ISHVersion,
[Parameter(Mandatory=$false,ParameterSetName="Default Authorization")]
[Parameter(Mandatory=$false,ParameterSetName="Custom Authorization")]
Expand All @@ -23,7 +23,13 @@ param(
[Parameter(Mandatory=$true,ParameterSetName="Custom Authorization")]
[string]$AccessKey,
[Parameter(Mandatory=$true,ParameterSetName="Custom Authorization")]
[string]$SecretKey
[string]$SecretKey,
[Parameter(Mandatory=$false,ParameterSetName="Default Authorization")]
[Parameter(Mandatory=$false,ParameterSetName="Custom Authorization")]
[bool]$InstallISHPrerequisites=$true,
[Parameter(Mandatory=$false,ParameterSetName="Default Authorization")]
[Parameter(Mandatory=$false,ParameterSetName="Custom Authorization")]
[bool]$InstallISHApplicationServer=$true
)

if ($PSBoundParameters['Debug']) {
Expand All @@ -42,6 +48,8 @@ $hash=@{
ISHServerFolder=$ISHServerFolder
ISHCDFolder=$ISHCDFolder
ISHCDFileName=$ISHCDFileName
InstallISHPrerequisites=$InstallISHPrerequisites
InstallISHApplicationServer=$InstallISHApplicationServer
}

if($PSCmdlet.ParameterSetName -eq "Custom Authorization")
Expand Down
111 changes: 87 additions & 24 deletions Source/Builders/Database/Initialize-MockDatabase.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
param(
[Parameter(Mandatory=$true)]
[string]$OSUserSqlUser
[CmdletBinding(DefaultParameterSetName="OSUser")]
param(
[Parameter(Mandatory=$true,ParameterSetName="OSUserAndSqlUser")]
[Parameter(Mandatory=$true,ParameterSetName="OSUser")]
[string]$OSUserSqlUser,
[Parameter(Mandatory=$true,ParameterSetName="OSUserAndSqlUser")]
[Parameter(Mandatory=$true,ParameterSetName="SqlSUser")]
[string]$SqlUserName,
[Parameter(Mandatory=$true,ParameterSetName="OSUserAndSqlUser")]
[Parameter(Mandatory=$true,ParameterSetName="SqlSUser")]
[string]$SqlPassword
)

$cmdletsPaths="$PSScriptRoot\..\..\Cmdlets"

. "$cmdletsPaths\Helpers\Write-Separator.ps1"
Write-Separator -Invocation $MyInvocation -Header


$sqlServerItem=Get-ChildItem -Path "${env:ProgramFiles(x86)}\Microsoft SQL Server" -Filter "*0" |Sort-Object -Descending @{expression={[int]$_.Name}}| Select-Object -First 1
$sqlServerPath=$sqlServerItem |Select-Object -ExpandProperty FullName
$sqlServerMajorVersion=$sqlServerItem.Name.Substring(0,$sqlServerItem.Name.Length-1)
Expand Down Expand Up @@ -37,28 +44,84 @@ else
{
throw "Could not parse connection string"
}
Write-Host "[DEMO][SQL Server Express]:Configuring $OSUserSqlUser account"
if(($PSCmdlet.ParameterSetName -eq "OSUser") -or ($PSCmdlet.ParameterSetName -eq "OSUserAndSqlUser"))
{
Write-Host "[DEMO][SQL Server Express]:Configuring $OSUserSqlUser account"

$sqlCmd = @"
USE [master]
GO
CREATE LOGIN [$OSUserSqlUser] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
USE [$dbName]
GO
CREATE USER [$osUserSqlUser] FOR LOGIN [$osUserSqlUser]
GO
USE [$dbName]
GO
ALTER USER [$osUserSqlUser] WITH DEFAULT_SCHEMA=[dbo]
GO
USE [$dbName]
GO
ALTER ROLE [db_owner] ADD MEMBER [$OSUserSqlUser]
GO
"@

Invoke-Sqlcmd -Query $sqlCmd
}

if(($PSCmdlet.ParameterSetName -eq "SqlUser") -or ($PSCmdlet.ParameterSetName -eq "OSUserAndSqlUser"))
{
Write-Host "[DEMO][SQL Server Express]:Configuring $SqlUserName account"

$sqlCmd = @"
USE [master]
GO
CREATE LOGIN [$OSUserSqlUser] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
USE [$dbName]
GO
CREATE USER [$osUserSqlUser] FOR LOGIN [$osUserSqlUser]
GO
USE [$dbName]
GO
ALTER USER [$osUserSqlUser] WITH DEFAULT_SCHEMA=[dbo]
GO
USE [$dbName]
GO
ALTER ROLE [db_owner] ADD MEMBER [$OSUserSqlUser]
GO
$sqlCmd = @"
USE [master]
GO
IF NOT EXISTS
(SELECT name
FROM sys.server_principals
WHERE name = N'$SqlUserName')
BEGIN
SELECT N'Creating login for: $SqlUserName'
CREATE LOGIN [$SqlUserName] WITH PASSWORD = N'$SqlPassword', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF, DEFAULT_DATABASE=[$dbName]
END
ELSE
BEGIN
SELECT N'Altering login for: $SqlUserName'
ALTER LOGIN [$SqlUserName] WITH PASSWORD = N'$SqlPassword', CHECK_POLICY = OFF, CHECK_EXPIRATION = OFF, DEFAULT_DATABASE=[$dbName]
END
GO
ALTER LOGIN [$SqlUserName] ENABLE;
GO
EXEC master..sp_addsrvrolemember @loginame = N'$SqlUserName', @rolename = N'sysadmin'
GO
USE [$dbName]
GO
IF NOT EXISTS (SELECT name
FROM sys.database_principals
WHERE type = 'S' AND name = N'$SqlUserName')
BEGIN
SELECT N'Creating user for: $SqlUserName'
CREATE USER [$SqlUserName] FOR LOGIN [$SqlUserName] WITH DEFAULT_SCHEMA=[dbo]
END
ELSE
BEGIN
SELECT N'User already exists: $SqlUserName'
END
GO
USE [$dbName]
GO
ALTER USER [$SqlUserName] WITH DEFAULT_SCHEMA=[dbo]
GO
USE [$dbName]
GO
ALTER ROLE [db_owner] ADD MEMBER [$SqlUserName]
GO
"@

Invoke-Sqlcmd -Query $sqlCmd
Invoke-Sqlcmd -Query $sqlCmd
}

Pop-Location -StackName SQL

Write-Separator -Invocation $MyInvocation -Footer
Write-Separator -Invocation $MyInvocation -Footer
28 changes: 0 additions & 28 deletions Source/Builders/Database/Install-MockDatabase.ps1

This file was deleted.

Loading

0 comments on commit 1f3dcfe

Please sign in to comment.