forked from Azure/AgentBaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscenario_azurelinuxv2-gpu.go
34 lines (32 loc) · 1.32 KB
/
scenario_azurelinuxv2-gpu.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package scenario
import (
"github.com/Azure/agentbaker/pkg/agent/datamodel"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute"
)
// Returns config for the 'gpu' E2E scenario
func azurelinuxv2gpu() *Scenario {
return &Scenario{
Name: "azurelinuxv2-gpu",
Description: "Tests that a GPU-enabled node using a AzureLinuxV2 (CgroupV2) VHD can be properly bootstrapped",
Config: Config{
ClusterSelector: NetworkPluginKubenetSelector,
ClusterMutator: NetworkPluginKubenetMutator,
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_NC6s_v3"
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-azurelinux-v2-gen2"
nbc.AgentPoolProfile.VMSize = "Standard_NC6s_v3"
nbc.AgentPoolProfile.Distro = "aks-azurelinux-v2-gen2"
nbc.ConfigGPUDriverIfNeeded = true
nbc.EnableGPUDevicePluginIfNeeded = false
nbc.EnableNvidia = true
},
VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) {
vmss.Properties.VirtualMachineProfile.StorageProfile.ImageReference = &armcompute.ImageReference{
ID: to.Ptr(DefaultImageVersionIDs["azurelinuxv2"]),
}
vmss.SKU.Name = to.Ptr("Standard_NC6s_v3")
},
},
}
}