diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/examples/Compute/createOrUpdate/KubernetesCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/examples/Compute/createOrUpdate/KubernetesCompute.json new file mode 100644 index 000000000000..e35127100405 --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/examples/Compute/createOrUpdate/KubernetesCompute.json @@ -0,0 +1,123 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "workspaceName": "workspaces123", + "computeName": "compute123", + "api-version": "2021-07-01", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2", + "computeType": "Kubernetes", + "properties": { + "namespace": "default", + "defaultInstanceType": "defaultInstanceType", + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "name": "compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2", + "computeType": "Kubernetes", + "provisioningState": "Creating", + "properties": { + "relayConnectionString": null, + "serviceBusConnectionString": null, + "extensionPrincipalId": null, + "extensionInstanceReleaseTrain": "stable", + "vcName": null, + "namespace": "default", + "defaultInstanceType": "defaultInstanceType", + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + } + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "name": "compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2", + "computeType": "Kubernetes", + "provisioningState": "Creating", + "properties": { + "relayConnectionString": null, + "serviceBusConnectionString": null, + "extensionPrincipalId": null, + "extensionInstanceReleaseTrain": "stable", + "vcName": null, + "namespace": "default", + "defaultInstanceType": "defaultInstanceType", + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + } + } + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/examples/Compute/get/KubernetesCompute.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/examples/Compute/get/KubernetesCompute.json new file mode 100644 index 000000000000..99945bbe8870 --- /dev/null +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/examples/Compute/get/KubernetesCompute.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "testrg123", + "workspaceName": "workspaces123", + "computeName": "compute123", + "api-version": "2021-07-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "name": "compute123", + "location": "eastus", + "properties": { + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "description": "some compute", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2", + "computeType": "Kubernetes", + "provisioningState": "Succeeded", + "isAttachedCompute": true, + "properties": { + "relayConnectionString": null, + "serviceBusConnectionString": null, + "extensionPrincipalId": null, + "extensionInstanceReleaseTrain": "stable", + "vcName": null, + "namespace": "default", + "defaultInstanceType": "defaultInstanceType", + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + } + } + } + } + } + } +} diff --git a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/machineLearningServices.json b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/machineLearningServices.json index 405f397e1d84..67612025d29f 100644 --- a/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/machineLearningServices.json +++ b/specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2021-07-01/machineLearningServices.json @@ -746,6 +746,9 @@ }, "Get an ComputeInstance": { "$ref": "./examples/Compute/get/ComputeInstance.json" + }, + "Get a Kubernetes Compute": { + "$ref": "./examples/Compute/get/KubernetesCompute.json" } }, "parameters": [ @@ -798,7 +801,7 @@ "Create an ComputeInstance Compute": { "$ref": "./examples/Compute/createOrUpdate/ComputeInstance.json" }, - "Create AKS Compute": { + "Create an AKS Compute": { "$ref": "./examples/Compute/createOrUpdate/BasicAKSCompute.json" }, "Create a DataFactory Compute": { @@ -807,8 +810,11 @@ "Update a AML Compute": { "$ref": "./examples/Compute/createOrUpdate/AmlCompute.json" }, - "Update a AKS Compute": { + "Update an AKS Compute": { "$ref": "./examples/Compute/createOrUpdate/AKSCompute.json" + }, + "Attach a Kubernetes Compute": { + "$ref": "./examples/Compute/createOrUpdate/KubernetesCompute.json" } }, "parameters": [ @@ -3127,6 +3133,67 @@ ], "x-ms-discriminator-value": "AKS" }, + "Kubernetes": { + "description": "A Machine Learning compute based on Kubernetes Compute.", + "allOf": [ + { + "$ref": "#/definitions/Compute" + }, + { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/KubernetesProperties" + } + } + } + ], + "x-ms-discriminator-value": "Kubernetes" + }, + + "KubernetesProperties": { + "type": "object", + "description": "Kubernetes properties", + "properties": { + "relayConnectionString": { + "description": "Relay connection string.", + "type": "string" + }, + "serviceBusConnectionString": { + "description": "ServiceBus connection string.", + "type": "string" + }, + "extensionPrincipalId": { + "description": "Extension principal-id.", + "type": "string" + }, + "extensionInstanceReleaseTrain": { + "description": "Extension instance release train.", + "type": "string" + }, + "vcName": { + "description": "VC name.", + "type": "string" + }, + "namespace": { + "description": "namespace", + "type": "string", + "default": "default" + }, + "defaultInstanceType": { + "description": "Default instance type", + "type": "string" + }, + "instanceTypes": { + "description": "Instance Type Schema", + "type": "object", + "additionalProperties":{ + "$ref": "#/definitions/InstanceTypeSchema" + } + } + } + }, + "AmlComputeProperties": { "type": "object", "description": "AML Compute properties", @@ -3972,6 +4039,7 @@ "description": "The type of compute", "enum": [ "AKS", + "Kubernetes", "AmlCompute", "ComputeInstance", "DataFactory", @@ -4752,7 +4820,7 @@ } } }, - "AKSProperties": { + "SynapseAKSProperties": { "type": "object", "description": "AKS properties", "properties": { @@ -4799,14 +4867,60 @@ } } }, + "InstanceTypeSchema": { + "type": "object", + "description": "Instance type schema.", + "additionalProperties": false, + "properties": { + "nodeSelector": { + "type": "object", + "description": "NodeSelector", + "additionalProperties": { + "type": "string" + } + }, + "resources": { + "type": "object", + "additionalProperties": false, + "description": "Resource requests/limits for this instance type", + "properties": { + "requests": { + "$ref": "#/definitions/InstanceResourceSchema" + }, + "limits": { + "$ref": "#/definitions/InstanceResourceSchema" + } + } + } + } + }, + "InstanceResourceSchema": { + "type": "object", + "description": "Resource requests/limits for this instance type", + "properties":{ + "cpu": { + "type": "string", + "description": "Number of vCPUs requested for this instance type" + }, + "memory": { + "type": "string", + "description": "Memory size requested for this instance type" + }, + "nvidia.com/gpu": { + "type": "string", + "description": "Number of Nvidia GPU cards requested for this instance_type" + } + } + }, "SynapseSparkPoolProperties": { "type": "object", "description": "Properties specific to Synapse Spark pools.", "properties": { "properties": { - "$ref": "#/definitions/AKSProperties" + "$ref": "#/definitions/SynapseAKSProperties" } } } } } +