Azure rendering solution deployment framework

This commit is contained in:
Rick Shahid 2022-11-26 06:18:02 -08:00
Родитель 901bd7507e
Коммит af09323fb0
6 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -3,9 +3,9 @@
ADMIN_PASSWORD=${adminPassword} /usr/bin/hs-init-admin-pw
if [[ ${machineSize} == Standard_HB* ]]; then
sed -i '/OS.EnableRDMA=/c\OS.EnableRDMA=y' /etc/waagent.conf
# sed -i "s/OS.EnableRDMA=n/OS.EnableRDMA=y" /etc/waagent.conf
# echo "systemctl restart waagent" | at now +1 minutes
shutdown -r 1
# shutdown -r 1
fi
# hscli interface-update --node-name hs1Dsx1.hs1.azure --interface-name ib0 --ip 172.16.0.21/16

Просмотреть файл

@ -70,7 +70,6 @@ if ($gpuPlatform -contains "CUDA" -or $gpuPlatform -contains "CUDA.OptiX") {
$downloadUrl = "$storageContainerUrl/NVIDIA/CUDA/$versionInfo/$installFile$storageContainerSas"
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, (Join-Path -Path $pwd.Path -ChildPath $installFile))
Start-Process -FilePath .\$installFile -ArgumentList "-s -n" -Wait -RedirectStandardOutput "nvidia-cuda.output.txt" -RedirectStandardError "nvidia-cuda.error.txt"
[System.Environment]::SetEnvironmentVariable("CUDA_TOOLKIT_ROOT_DIR", "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8")
Write-Host "Customize (End): NVIDIA GPU (CUDA)"
}
@ -84,7 +83,7 @@ if ($gpuPlatform -contains "CUDA.OptiX") {
$sdkDirectory = "C:\ProgramData\NVIDIA Corporation\OptiX SDK $versionInfo\SDK"
$buildDirectory = "$sdkDirectory\build"
New-Item -ItemType Directory $buildDirectory
Start-Process -FilePath "$binPathCMake\cmake.exe" -ArgumentList "-B ""$buildDirectory"" -S ""$sdkDirectory""" -Wait -RedirectStandardOutput "nvidia-optix-cmake.output.txt" -RedirectStandardError "nvidia-optix-cmake.error.txt"
Start-Process -FilePath "$binPathCMake\cmake.exe" -ArgumentList "-B ""$buildDirectory"" -S ""$sdkDirectory"" -D CUDA_TOOLKIT_ROOT_DIR=""C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8""" -Wait -RedirectStandardOutput "nvidia-optix-cmake.output.txt" -RedirectStandardError "nvidia-optix-cmake.error.txt"
Start-Process -FilePath "$binPathMSBuild\MSBuild.exe" -ArgumentList """$buildDirectory\OptiX-Samples.sln"" -p:Configuration=Release" -Wait -RedirectStandardOutput "nvidia-optix-msbuild.output.txt" -RedirectStandardError "nvidia-optix-msbuild.error.txt"
$binPaths += ";$buildDirectory\bin\Release"
Write-Host "Customize (End): NVIDIA GPU (OptiX)"
@ -95,7 +94,7 @@ if ($machineType -eq "Scheduler") {
$installFile = "az-cli.msi"
$downloadUrl = "https://aka.ms/installazurecliwindows"
(New-Object System.Net.WebClient).DownloadFile($downloadUrl, (Join-Path -Path $pwd.Path -ChildPath $installFile))
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $installFile /quiet /norestart" -Wait
Start-Process -FilePath "msiexec.exe" -ArgumentList "/i $installFile /quiet /norestart" -Wait -RedirectStandardOutput "az-cli.output.txt" -RedirectStandardError "az-cli.error.txt"
Write-Host "Customize (End): Azure CLI"
if ($renderManager -eq "Deadline") {

Просмотреть файл

@ -91,7 +91,7 @@ if [ $machineType == "Scheduler" ]; then
echo "enabled=1" >> $azRepoPath
echo "gpgcheck=1" >> $azRepoPath
echo "gpgkey=https://packages.microsoft.com/keys/microsoft.asc" >> $azRepoPath
yum -y install azure-cli
yum -y install azure-cli 1> "az-cli.output.txt" 2> "az-cli.error.txt"
echo "Customize (End): Azure CLI"
if [ $renderManager == "Deadline" ]; then

Просмотреть файл

@ -1,6 +1,7 @@
$ErrorActionPreference = "Stop"
if ($ccEnabled) {
$cycleCloudEnable = $false
if ($cycleCloudEnable) {
deadlineworker -shutdown
deadlinecommand -DeleteSlave $(hostname)
} else {

Просмотреть файл

@ -1,6 +1,7 @@
#!/bin/bash -ex
if [ $ccEnabled ]; then
cycleCloudEnable=false
if [ $cycleCloudEnable == true ]; then
deadlineworker -shutdown
deadlinecommand -DeleteSlave $(hostname)
else

Просмотреть файл

@ -200,4 +200,6 @@ if [ ${cycleCloud.enable} == true ]; then
cyclecloud initialize --url=https://localhost:8443 --username="${adminUsername}" --password="${adminPassword}" --batch --verify-ssl=false
cyclecloud account create -f $cycleAccountFile
cyclecloud import_template -f $clusterTemplateFile
sed -i "s/cycleCloudEnable=false/cycleCloudEnable=true/" /opt/cycle/jetpack/scripts/onPreempt.sh
sed -i "s/cycleCloudEnable=false/cycleCloudEnable=true/" /opt/cycle/jetpack/scripts/onTerminate.sh
fi