mirror of
https://github.com/ceph/ceph
synced 2025-01-24 03:53:54 +00:00
8054199787
Due to lack of Windows support in the Teuthology, the test case adopts the following workaround: * Deploy baremetal machine with `ubuntu_latest.yaml` and configure it with libvirt KVM. * Create a libvirt VM and provision it with Windows Server 2019, using the official ISO from Microsoft. * Configure SSH in the Windows VM, and run the tests remotely via SSH. The implementation of the test case consists of workunit scripts. `qa/workunits/windows/test_rbd_wnbd.py` is the main Python script to test Ceph on Windows basic functionality. This is executed in the libvirt VM configured with Windows Server 2019. Co-authored-by: Lucian Petrut <lpetrut@cloudbasesolutions.com> Co-authored-by: Daniel Vincze <dvincze@cloudbasesolutions.com> Signed-off-by: Ionut Balutoiu <ibalutoiu@cloudbasesolutions.com>
44 lines
1.5 KiB
PowerShell
44 lines
1.5 KiB
PowerShell
$ErrorActionPreference = "Stop"
|
|
$ProgressPreference = "SilentlyContinue"
|
|
|
|
$PYTHON3_URL = "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe"
|
|
$FIO_URL = "https://bsdio.com/fio/releases/fio-3.27-x64.msi"
|
|
$VC_REDIST_URL = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
|
|
|
. "${PSScriptRoot}\utils.ps1"
|
|
|
|
function Install-VCRedist {
|
|
Write-Output "Installing Visual Studio Redistributable x64"
|
|
Install-Tool -URL $VC_REDIST_URL -Params @("/quiet", "/norestart")
|
|
Write-Output "Successfully installed Visual Studio Redistributable x64"
|
|
}
|
|
|
|
function Install-Python3 {
|
|
Write-Output "Installing Python3"
|
|
Install-Tool -URL $PYTHON3_URL -Params @("/quiet", "InstallAllUsers=1", "PrependPath=1")
|
|
Add-ToPathEnvVar -Path @("${env:ProgramFiles}\Python310\", "${env:ProgramFiles}\Python310\Scripts\")
|
|
Write-Output "Installing pip dependencies"
|
|
Start-ExecuteWithRetry {
|
|
Invoke-CommandLine "pip3.exe" "install prettytable"
|
|
}
|
|
Write-Output "Successfully installed Python3"
|
|
}
|
|
|
|
function Install-FIO {
|
|
Write-Output "Installing FIO"
|
|
Install-Tool -URL $FIO_URL -Params @("/qn", "/l*v", "$env:TEMP\fio-install.log", "/norestart")
|
|
Write-Output "Successfully installed FIO"
|
|
}
|
|
|
|
Install-VCRedist
|
|
Install-Python3
|
|
Install-FIO
|
|
|
|
# Pre-append WNBD and Ceph to PATH
|
|
Add-ToPathEnvVar -Path @(
|
|
"${env:SystemDrive}\wnbd\binaries",
|
|
"${env:SystemDrive}\ceph")
|
|
|
|
# This will refresh the PATH for new SSH sessions
|
|
Restart-Service -Force -Name "sshd"
|