Skip to content

Commit

Permalink
Copying the wins.exe to the location expected by monitoring chart.
Browse files Browse the repository at this point in the history
This just copies the wins.exe as part of the instal.ps1 to guarantee that Wins in the location expected in the charts. This was handled by the Rancher-agent prior to RKE2.

* rancher/rancher#35851

Signed-off-by: Jamie Phillips <[email protected]>
  • Loading branch information
phillipsj committed Dec 13, 2021
1 parent d1827da commit ad12241
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,14 @@ systemagent:
}
}

function Copy-WinsForCharts() {
$winsForChartsPath = "c:/windows"
if (-Not (Test-Path $winsForChartsPath)) {
New-Item $winsForChartsPath -ItemType Directory
}
Copy-Item -Path "$env:CATTLE_AGENT_BIN_PREFIX/bin/wins.exe" -Destination "$winsForChartsPath/wins.exe" -Force
}

function Invoke-WinsAgentInstall() {
$serviceName = "rancher-wins"
Get-Args
Expand All @@ -550,6 +558,7 @@ systemagent:
Test-RancherConnection
Stop-Agent -ServiceName $serviceName
Invoke-WinsAgentDownload
Copy-WinsForCharts
Set-WinsConfig

if ($env:CATTLE_TOKEN) {
Expand Down

0 comments on commit ad12241

Please sign in to comment.