]>
Commit | Line | Data |
---|---|---|
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 | ||
10 | function 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 | ||
16 | function 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 | ||
27 | function 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 | ||
33 | Install-VCRedist | |
34 | Install-Python3 | |
35 | Install-FIO | |
36 | ||
37 | # Pre-append WNBD and Ceph to PATH | |
38 | Add-ToPathEnvVar -Path @( | |
39 | "${env:SystemDrive}\wnbd\binaries", | |
40 | "${env:SystemDrive}\ceph") | |
41 | ||
42 | # This will refresh the PATH for new SSH sessions | |
43 | Restart-Service -Force -Name "sshd" |