]> git.proxmox.com Git - ceph.git/blame - ceph/qa/workunits/windows/libvirt_vm/setup.ps1
update ceph source to reef 18.1.2
[ceph.git] / ceph / qa / workunits / windows / libvirt_vm / setup.ps1
CommitLineData
1e59de90
TL
1$ErrorActionPreference = "Stop"
2$ProgressPreference = "SilentlyContinue"
3
4$PYTHON3_URL = "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe"
5$FIO_URL = "https://bsdio.com/fio/releases/fio-3.27-x64.msi"
6$VC_REDIST_URL = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
7
8. "${PSScriptRoot}\utils.ps1"
9
10function Install-VCRedist {
11 Write-Output "Installing Visual Studio Redistributable x64"
12 Install-Tool -URL $VC_REDIST_URL -Params @("/quiet", "/norestart")
13 Write-Output "Successfully installed Visual Studio Redistributable x64"
14}
15
16function Install-Python3 {
17 Write-Output "Installing Python3"
18 Install-Tool -URL $PYTHON3_URL -Params @("/quiet", "InstallAllUsers=1", "PrependPath=1")
19 Add-ToPathEnvVar -Path @("${env:ProgramFiles}\Python310\", "${env:ProgramFiles}\Python310\Scripts\")
20 Write-Output "Installing pip dependencies"
21 Start-ExecuteWithRetry {
22 Invoke-CommandLine "pip3.exe" "install prettytable"
23 }
24 Write-Output "Successfully installed Python3"
25}
26
27function Install-FIO {
28 Write-Output "Installing FIO"
29 Install-Tool -URL $FIO_URL -Params @("/qn", "/l*v", "$env:TEMP\fio-install.log", "/norestart")
30 Write-Output "Successfully installed FIO"
31}
32
33Install-VCRedist
34Install-Python3
35Install-FIO
36
37# Pre-append WNBD and Ceph to PATH
38Add-ToPathEnvVar -Path @(
39 "${env:SystemDrive}\wnbd\binaries",
40 "${env:SystemDrive}\ceph")
41
42# This will refresh the PATH for new SSH sessions
43Restart-Service -Force -Name "sshd"