From 2281e89a6fec5cfb97af29609e65bb09ac19b52d Mon Sep 17 00:00:00 2001 From: Eugenia Bilynska Date: Fri, 16 Aug 2024 18:24:13 +0300 Subject: [PATCH] Update Sitecore Experience Platform Container Deployment to 10.3.2.010837.1896 --- .../ltsc2019/upgrade/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env | 2 +- .../ltsc2019/upgrade/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.3/ltsc2019/xm1/.env | 4 +- .../sxp/10.3/ltsc2019/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/xm1/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2019/xp0/.env | 4 +- .../sxp/10.3/ltsc2019/xp0/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/xp0/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2019/xp1/.env | 4 +- .../sxp/10.3/ltsc2019/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/xp1/docker-compose.yml | 4 +- .../ltsc2022/upgrade/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env | 2 +- .../ltsc2022/upgrade/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.3/ltsc2022/xm1/.env | 4 +- .../sxp/10.3/ltsc2022/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/xm1/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2022/xp0/.env | 4 +- .../sxp/10.3/ltsc2022/xp0/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/xp0/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2022/xp1/.env | 4 +- .../sxp/10.3/ltsc2022/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/xp1/docker-compose.yml | 4 +- .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2019/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml | 2 +- .../init/SearchStax/kustomization.yaml | 2 +- .../ltsc2019/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml | 2 +- .../init/SearchStax/kustomization.yaml | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/upgrade/xm1/kustomization.yaml | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/upgrade/xp1/kustomization.yaml | 2 +- .../ltsc2022/xm1/external/kustomization.yaml | 2 +- .../10.3/ltsc2022/xm1/init/kustomization.yaml | 6 +- k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml | 23 +++--- .../init/SearchStax/kustomization.yaml | 8 +- .../ltsc2022/xp1/external/kustomization.yaml | 2 +- .../10.3/ltsc2022/xp1/init/kustomization.yaml | 6 +- k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml | 45 ++++++----- .../init/SearchStax/kustomization.yaml | 8 +- 46 files changed, 409 insertions(+), 531 deletions(-) diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env b/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env index 255af0ee..fa009d64 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env b/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env index f2276479..739cf0d4 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xm1/.env b/compose/sxp/10.3/ltsc2019/xm1/.env index 7a876045..a6f9db6c 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/.env +++ b/compose/sxp/10.3/ltsc2019/xm1/.env @@ -20,8 +20,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml index 5778210a..4009e127 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xp0/.env b/compose/sxp/10.3/ltsc2019/xp0/.env index 0a742e48..c9d4fa70 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/.env +++ b/compose/sxp/10.3/ltsc2019/xp0/.env @@ -19,8 +19,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 index afa1487e..d2be2500 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml index 1659045f..07cc084d 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml @@ -27,7 +27,7 @@ services: condition: service_healthy mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -67,7 +67,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xp1/.env b/compose/sxp/10.3/ltsc2019/xp1/.env index 8807e0e6..e6919ea1 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/.env +++ b/compose/sxp/10.3/ltsc2019/xp1/.env @@ -21,8 +21,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml index 3e7c4045..09271173 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env b/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env index 5b9a7165..06b4c075 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env b/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env index eb8065d1..ebdfcc6b 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xm1/.env b/compose/sxp/10.3/ltsc2022/xm1/.env index a6f53f84..20d0717c 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/.env +++ b/compose/sxp/10.3/ltsc2022/xm1/.env @@ -20,8 +20,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml index 5778210a..4009e127 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xp0/.env b/compose/sxp/10.3/ltsc2022/xp0/.env index 08b8b07b..7f08f66d 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/.env +++ b/compose/sxp/10.3/ltsc2022/xp0/.env @@ -19,8 +19,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 index afa1487e..d2be2500 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml index 1659045f..07cc084d 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml @@ -27,7 +27,7 @@ services: condition: service_healthy mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -67,7 +67,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xp1/.env b/compose/sxp/10.3/ltsc2022/xp1/.env index 5154b624..418a716b 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/.env +++ b/compose/sxp/10.3/ltsc2022/xp1/.env @@ -21,8 +21,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml index 3e7c4045..09271173 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} diff --git a/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml index 6480b944..5643f6ca 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml @@ -67,4 +67,4 @@ replacements: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: delimiter: // - index: 1 \ No newline at end of file + index: 1 diff --git a/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml index e4a513b4..094f443a 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml @@ -15,4 +15,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt \ No newline at end of file + - sitecore-searchstax-deployment-uid.txt diff --git a/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml index e1314961..ac4dd472 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml @@ -113,4 +113,4 @@ replacements: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: delimiter: // - index: 1 \ No newline at end of file + index: 1 diff --git a/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml index e1447333..68e61cba 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml @@ -15,4 +15,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt \ No newline at end of file + - sitecore-searchstax-deployment-uid.txt diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml index 4183e71e..b60db321 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml @@ -18,4 +18,4 @@ resources: images: - name: sitecore-xm1-mssql-upgrade newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-upgrade - newTag: 10.3-ltsc2022 + newTag: 10.3-ltsc2022 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml index db91ca15..fac546a1 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml @@ -20,4 +20,4 @@ resources: images: - name: sitecore-xp1-mssql-upgrade newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-upgrade - newTag: 10.3-ltsc2022 + newTag: 10.3-ltsc2022 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml index 3279f8e7..48a547e9 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xm1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-init @@ -7,6 +8,7 @@ images: - name: sitecore-xm1-solr-init newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init newTag: 10.3-ltsc2022 + resources: -- mssql-init.yaml -- solr-init.yaml + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml index b70f112b..4a55a95d 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xm1-cd newName: scr.sitecore.com/sxp/sitecore-xm1-cd @@ -10,11 +11,13 @@ images: - name: sitecore-xm1-id newName: scr.sitecore.com/sxp/sitecore-id7 newTag: 10.3-ltsc2022 + resources: -- configmaps -- cm.yaml -- cd.yaml -- id.yaml + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + replacements: - source: fieldPath: data.cm-hostname @@ -28,7 +31,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -36,7 +39,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: / + delimiter: '/' index: 2 - select: kind: Deployment @@ -44,7 +47,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: // + delimiter: '//' index: 1 - source: fieldPath: data.id-hostname @@ -58,7 +61,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -66,5 +69,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: // - index: 1 + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml index 903ec3f1..90b13c84 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml @@ -1,13 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + resources: - ..\..\..\init + patchesStrategicMerge: -- solr-init.yaml + - solr-init.yaml + images: - name: sitecore-xm1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init-searchstax newTag: 10.3-ltsc2022 + generatorOptions: disableNameSuffixHash: true secretGenerator: @@ -15,4 +19,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml index 07c73e04..e9c22e6a 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xp1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-init @@ -7,6 +8,7 @@ images: - name: sitecore-xp1-solr-init newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init newTag: 10.3-ltsc2022 + resources: -- mssql-init.yaml -- solr-init.yaml + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml index 9790a950..9f7df7e4 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xp1-cd newName: scr.sitecore.com/sxp/sitecore-xp1-cd @@ -45,22 +46,24 @@ images: newTag: 10.3-ltsc2022 - name: pwsh-initContainer newName: mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 + resources: -- configmaps -- cm.yaml -- cd.yaml -- id.yaml -- cortexprocessing.yaml -- cortexprocessingworker.yaml -- cortexreporting.yaml -- prc.yaml -- xdbautomation.yaml -- xdbautomationrpt.yaml -- xdbautomationworker.yaml -- xdbcollection.yaml -- xdbrefdata.yaml -- xdbsearch.yaml -- xdbsearchworker.yaml + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + - cortexprocessing.yaml + - cortexprocessingworker.yaml + - cortexreporting.yaml + - prc.yaml + - xdbautomation.yaml + - xdbautomationrpt.yaml + - xdbautomationworker.yaml + - xdbcollection.yaml + - xdbrefdata.yaml + - xdbsearch.yaml + - xdbsearchworker.yaml + replacements: - source: fieldPath: data.cm-hostname @@ -74,7 +77,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -82,7 +85,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: / + delimiter: '/' index: 2 - select: kind: Deployment @@ -90,7 +93,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: // + delimiter: '//' index: 1 - source: fieldPath: data.id-hostname @@ -104,7 +107,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -112,5 +115,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: // - index: 1 + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml index 0e858908..13e4a27c 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml @@ -1,13 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + resources: - ..\..\..\init + patchesStrategicMerge: -- solr-init.yaml + - solr-init.yaml + images: - name: sitecore-xp1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init-searchstax newTag: 10.3-ltsc2022 + generatorOptions: disableNameSuffixHash: true secretGenerator: @@ -15,4 +19,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file