Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions e2e/aks_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,29 +248,14 @@ func getFirewall(ctx context.Context, location, firewallSubnetID, publicIPID str
TargetFqdns: []*string{to.Ptr(mooncakeMAR), to.Ptr(mooncakeMARData)},
}

// Needed for access to download.microsoft.com
// This is currently only needed by the Supernova (MA35D) SKU GPU tests
// Driver install code in setupAmdAma() depends on this
dmcRule := armnetwork.AzureFirewallApplicationRule{
Name: to.Ptr("dmc-fqdn"),
SourceAddresses: []*string{to.Ptr("*")},
Protocols: []*armnetwork.AzureFirewallApplicationRuleProtocol{
{
ProtocolType: to.Ptr(armnetwork.AzureFirewallApplicationRuleProtocolTypeHTTPS),
Port: to.Ptr[int32](443),
},
},
TargetFqdns: []*string{to.Ptr("download.microsoft.com")},
}

appRuleCollection := armnetwork.AzureFirewallApplicationRuleCollection{
Name: to.Ptr("aksfwar"),
Properties: &armnetwork.AzureFirewallApplicationRuleCollectionPropertiesFormat{
Priority: to.Ptr[int32](100),
Action: &armnetwork.AzureFirewallRCAction{
Type: to.Ptr(armnetwork.AzureFirewallRCActionTypeAllow),
},
Rules: []*armnetwork.AzureFirewallApplicationRule{&aksAppRule, &blobStorageAppRule, &mooncakeMARRule, &dmcRule},
Rules: []*armnetwork.AzureFirewallApplicationRule{&aksAppRule, &blobStorageAppRule, &mooncakeMARRule},
},
}

Expand Down
40 changes: 29 additions & 11 deletions parts/linux/cloud-init/artifacts/cse_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1104,42 +1104,58 @@ ensureGPUDrivers() {
fi
}

# Install AMD AMA core SW package for MA35D (Supernova GPU SKU)
# Note that this depends on access to download.microsoft.com, so network-isolated clusters are not supported
dnf_install_amd_ama_core() {
retries=$1; wait_sleep=$2; timeout=$3; shift && shift && shift
# Install AMD AMA SW package for MA35D (Supernova GPU SKU)
dnf_install_amd_ama_package() {
name=$1; ver=$2; bld=$3; retries=$4; wait_sleep=$5; timeout=$6; shift && shift && shift && shift && shift && shift
AMD_AMA_PACKAGE="https://packages.xilinx.com/artifactory/rpm-packages/x86_64/amd-ama-${name}_${ver}-${bld}.x86_64.rpm"
for i in $(seq 1 $retries); do
# RPM_FRONTEND env variable needed to disable license agreement prompt
RPM_FRONTEND=noninteractive dnf install -y https://download.microsoft.com/download/16b04fa7-883e-4a94-88c2-801881a47b28/amd-ama-core_1.3.0-2503242033-amd64.rpm && break || \
RPM_FRONTEND=noninteractive dnf install -y $AMD_AMA_PACKAGE && break || \
Comment on lines +1109 to +1113
if [ $i -eq $retries ]; then
return 1
else
sleep $wait_sleep
dnf_makecache
fi
done
echo Executed dnf install AMD AMA core package $i times;
echo Executed dnf install AMD AMA $name package $i times;
}

# Install AMD AMA drivers/SW for MA35D (Supernova GPU SKU)
# Note that this depends on access to download.microsoft.com, so network-isolated clusters are not supported
setupAmdAma() {
if [ "$(isARM64)" -eq 1 ]; then
return
fi

if isMarinerOrAzureLinux "$OS"; then
# Install driver - currently version 1.3.0 is supported
if isAzureLinux "$OS"; then
# Install MA35D packages - currently version 1.5 and above are supported
# This install script will extract the driver version/build number to find
# the corresponding core/FW packages

Comment on lines +1130 to +1134
# Get driver package name from internal AMD repo
if ! dnf_install 30 1 600 azurelinux-repos-amd; then
echo "Unable to install Azure Linux AMD package repo, exiting..."
exit $ERR_AMDAMA_INSTALL_FAIL
fi
KERNEL_VERSION=$(uname -r | sed 's/-/./g')
AMD_AMA_DRIVER_PACKAGE=$(dnf repoquery -y --available "amd-ama-driver-1.3.0*" | grep -E "amd-ama-driver-[0-9]+.*_$KERNEL_VERSION" | sort -V | tail -n 1)
AMD_AMA_DRIVER_PACKAGE=$(dnf repoquery -y --available "amd-ama-driver-*" | grep -E "amd-ama-driver-[0-9]+.*_$KERNEL_VERSION" | sort -V | tail -n 1)
if [ -z "$AMD_AMA_DRIVER_PACKAGE" ]; then
echo "Unable to find AMD AMA driver package for current kernel version, exiting..."
exit $ERR_AMDAMA_DRIVER_NOT_FOUND
fi

# Install FW package
AMD_AMA_FIRMWARE_PACKAGE="${AMD_AMA_DRIVER_PACKAGE/driver/firmware}"
if [ -z "$AMD_AMA_DRIVER_PACKAGE" ]; then
echo "Unable to find AMD AMA firmware package for current kernel version, exiting..."
exit $ERR_AMDAMA_DRIVER_NOT_FOUND
fi
Comment on lines +1148 to +1152
if ! dnf_install 30 1 600 $AMD_AMA_FIRMWARE_PACKAGE; then
echo "Unable to install AMD AMA FW package, exiting..."
exit $ERR_AMDAMA_INSTALL_FAIL
fi

# Install driver package
if ! dnf_install 30 1 600 $AMD_AMA_DRIVER_PACKAGE; then
echo "Unable to install AMD AMA driver package, exiting..."
exit $ERR_AMDAMA_INSTALL_FAIL
Expand All @@ -1150,7 +1166,9 @@ setupAmdAma() {
echo "Unable to install Azure Linux packages required for AMD AMA core package, exiting..."
exit $ERR_AMDAMA_INSTALL_FAIL
fi
if ! dnf_install_amd_ama_core 30 1 600; then
TMP="${AMD_AMA_DRIVER_PACKAGE#amd-ama-driver-*:}"; AMD_AMA_DRIVER_VERSION="${TMP%%_*}"
TMP2="${TMP#*_}"; AMD_AMA_DRIVER_BUILD_NUMBER="${TMP2%%-*}"
Comment on lines +1169 to +1170
if ! dnf_install_amd_ama_package core $AMD_AMA_DRIVER_VERSION $AMD_AMA_DRIVER_BUILD_NUMBER 30 1 600; then
echo "Unable to install AMD AMA core package, exiting..."
exit $ERR_AMDAMA_INSTALL_FAIL
fi
Expand Down
Loading