forked from Azure/AgentBaker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscenario_ubuntu1804-gpu-azurecni.go
34 lines (32 loc) · 1.5 KB
/
scenario_ubuntu1804-gpu-azurecni.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"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/containerservice/armcontainerservice"
)
func (t *Template) ubuntu1804gpu_azurecni() *Scenario {
return &Scenario{
Name: "ubuntu1804-gpu-azurecni",
Description: "Ubuntu1804 gpu scenario on cluster configured with Azure CNI",
Config: Config{
ClusterSelector: NetworkPluginAzureSelector,
ClusterMutator: NetworkPluginAzureMutator,
VHDSelector: t.Ubuntu1804Gen2Containerd,
BootstrapConfigMutator: func(nbc *datamodel.NodeBootstrappingConfiguration) {
nbc.ContainerService.Properties.OrchestratorProfile.KubernetesConfig.NetworkPlugin = string(armcontainerservice.NetworkPluginAzure)
nbc.AgentPoolProfile.KubernetesConfig.NetworkPlugin = string(armcontainerservice.NetworkPluginAzure)
nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_NC6s_v3"
nbc.ContainerService.Properties.AgentPoolProfiles[0].Distro = "aks-ubuntu-containerd-18.04-gen2"
nbc.AgentPoolProfile.VMSize = "Standard_NC6s_v3"
nbc.AgentPoolProfile.Distro = "aks-ubuntu-containerd-18.04-gen2"
nbc.ConfigGPUDriverIfNeeded = true
nbc.EnableGPUDevicePluginIfNeeded = false
nbc.EnableNvidia = true
},
VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) {
vmss.SKU.Name = to.Ptr("Standard_NC6s_v3")
},
},
}
}