Skip to content

Commit

Permalink
Multiple fixes
Browse files Browse the repository at this point in the history
* Update Pipeline script to ensure availability of Posh-SSH and dbatools
* Update documentation
* SBS_IISENV now propagates all ENV that match, even if it exists at the machine level. It was previously skipping variables set at the machine level.
* Upgrade newrelic-dotnet 10.31.0 to 10.32.0
* Upgrade dbatools 2.1.22 to 2.1.26
* Upgrade 7zip 24.7.0 to 24.8.0
* Upgrade micro 2.0.11 to 2.0.14
  • Loading branch information
david-garcia-garcia authored Oct 26, 2024
1 parent b804c2c commit b849e5d
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 61 deletions.
5 changes: 5 additions & 0 deletions buildall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ SbsPrintSystemInfo

$global:ErrorActionPreference = 'Stop';

Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted
Install-Module -Name Posh-SSH -Confirm:$false

choco upgrade dbatools -y

Import-Module Pester -PassThru;
$PesterPreference = [PesterConfiguration]::Default
$PesterPreference.Output.Verbosity = 'Detailed'
Expand Down
3 changes: 0 additions & 3 deletions servercore2022/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,4 @@ RUN xcopy /E /Y "c:\\setup\\assets" "C:\\"
RUN echo "setup\\base";c:\setup\setup.ps1
RUN Remove-Item -Path c:\setup -Recurse -Force;

# SHELL ["cmd.exe"]
# CMD ["powershell.exe", "-File", "C:\\entrypoint\\entrypoint.ps1" ]

CMD ["c:\\Program Files\\LogMonitor\\LogMonitor.exe", "/CONFIG", "c:\\logmonitor\\config.json", "powershell.exe", "-File", "C:\\entrypoint\\entrypoint.ps1" ]
111 changes: 60 additions & 51 deletions servercore2022/readme.md

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions servercore2022/setup/external/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ Write-Host " Installing 7zip"
Write-Host "-----------------------------------------`n"

# 7zip for compression/decompression
choco upgrade 7zip.install -y --version=24.7.0 --no-progress;
choco upgrade 7zip.install -y --version=24.8.0 --no-progress;

Write-Host "`n---------------------------------------"
Write-Host " Installing Micro"
Write-Host "-----------------------------------------`n"

# Command line editor
choco upgrade micro -y --version=2.0.11 --no-progress;
$microUrl = "https://github.com/zyedidia/micro/releases/download/v2.0.14/micro-2.0.14-win64.zip"
$zipPath = "$env:TEMP\micro.zip"
$installPath = "C:\Program Files\Micro"

Invoke-WebRequest $microUrl -OutFile $zipPath
Expand-Archive $zipPath -DestinationPath $installPath -Force
[System.Environment]::SetEnvironmentVariable("Path", "$([System.Environment]::GetEnvironmentVariable("Path", "Machine"));$installPath\\micro-2.0.14", "Machine")
Remove-Item $zipPath

Write-Host "`n---------------------------------------"
Write-Host " Open SSH server"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ if ([string]::IsNullOrWhiteSpace($SBS_IISENV)) {
$envVars = @{}

# Enumerate all environment variables and filter based on the variable regex pattern
# This logic previoulsy propagated only ENV variables that did not exist at the SYSTEM
# level, but considering that IIS start with the container, and the SYSTEM level env vars
# are set later on by an entrypoint script, they would not be seen by the pools until a full
# IIS reset was performed. By adding them explicitly to the pool, they will be grabbed
# provided that the pool has been properly configured to stopped on container boot
Get-ChildItem env: | Where-Object {
$_.Name -match $varRegex -and -not $systemEnvVars.ContainsKey($_.Name)
$_.Name -match $varRegex
} | ForEach-Object {
$varName = $_.Name
$varValue = $_.Value
Expand Down
2 changes: 1 addition & 1 deletion servercore2022iisnet48/setup/apm/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Write-Host "`n---------------------------------------";
Write-Host " Installing .Net agent";
Write-Host "-----------------------------------------`n";

choco upgrade newrelic-dotnet -y --version=10.31.0 --no-progress;
choco upgrade newrelic-dotnet -y --version=10.32.0 --no-progress;

# https://docs.newrelic.com/docs/apm/agents/net-agent/troubleshooting/no-data-appears-after-disabling-tls-10/#strongcrypto
# Esto hace falta para que el framework utilice por defecto TLS en lugar de SSL
Expand Down
2 changes: 1 addition & 1 deletion sqlserver2022base/setup/tools/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Write-Host "`n---------------------------------------"
Write-Host " Install DbaTools"
Write-Host "-----------------------------------------`n"

choco install dbatools -y --version=2.1.22 --no-progress;
choco install dbatools -y --version=2.1.26 --no-progress;

# All DBA tools stuff is going to be interacting with local server, so
# these default's whould be good to go.
Expand Down
2 changes: 1 addition & 1 deletion sqlserver2022is/setup/install/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Remove-Item -Path C:\MSSQLUPDATES -Recurse -Force;

# Install DBA tools
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted;
choco install dbatools -y --version=2.1.20 --no-progress;
choco install dbatools -y --version=2.1.26 --no-progress;

# Clean temp data
Get-ChildItem -Path $env:TEMP, 'C:\Windows\Temp' -Recurse | Remove-Item -Force -Recurse;
Expand Down

0 comments on commit b849e5d

Please sign in to comment.