Merge pull request #8 from denniseik/feature/201-fitandfinish
Add compute, private link dependencies and updated readme's for publication
This commit is contained in:
commit
b5f97979db
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
quickstart/101-machine-learning/.terraform.lock.hcl
|
*.terraform.lock.hcl
|
||||||
quickstart/101-machine-learning/.terraform/providers/registry.terraform.io/hashicorp/azurerm/2.76.0/windows_amd64/terraform-provider-azurerm_v2.76.0_x5.exe
|
*.exe
|
||||||
quickstart/101-machine-learning/terraform.tfstate
|
*.tfstate
|
||||||
quickstart/101-machine-learning/demo.tfplan
|
*.tfplan
|
||||||
|
*.tfplan
|
||||||
|
@ -1,9 +1,17 @@
|
|||||||
# Compute Instance
|
# Generate random string for unique compute instance name
|
||||||
|
resource "random_string" "ci_prefix" {
|
||||||
|
length = 8
|
||||||
|
upper = false
|
||||||
|
special = false
|
||||||
|
number = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute instance
|
||||||
resource "azurerm_machine_learning_compute_instance" "compute_instance" {
|
resource "azurerm_machine_learning_compute_instance" "compute_instance" {
|
||||||
name = "default-instance"
|
name = "${random_string.ci_prefix.result}instance"
|
||||||
location = azurerm_resource_group.default.location
|
location = azurerm_resource_group.default.location
|
||||||
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
|
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
|
||||||
virtual_machine_size = "STANDARD_DS2_V2"
|
virtual_machine_size = "STANDARD_DS2_V2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Compute Cluster
|
# Compute Cluster
|
||||||
|
41
quickstart/201-machine-learning-moderately-secure/compute.tf
Normal file
41
quickstart/201-machine-learning-moderately-secure/compute.tf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Generate random string for unique compute instance name
|
||||||
|
resource "random_string" "ci_prefix" {
|
||||||
|
length = 8
|
||||||
|
upper = false
|
||||||
|
special = false
|
||||||
|
number = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute instance
|
||||||
|
resource "azurerm_machine_learning_compute_instance" "compute_instance" {
|
||||||
|
name = "${random_string.ci_prefix.result}instance"
|
||||||
|
location = azurerm_resource_group.default.location
|
||||||
|
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
|
||||||
|
virtual_machine_size = "STANDARD_DS2_V2"
|
||||||
|
subnet_resource_id = azurerm_subnet.snet-training.id
|
||||||
|
|
||||||
|
depends_on = [
|
||||||
|
azurerm_private_endpoint.mlw_ple
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute cluster
|
||||||
|
resource "azurerm_machine_learning_compute_cluster" "compute" {
|
||||||
|
name = "cpu-cluster"
|
||||||
|
location = azurerm_resource_group.default.location
|
||||||
|
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
|
||||||
|
vm_priority = "Dedicated"
|
||||||
|
vm_size = "STANDARD_DS2_V2"
|
||||||
|
subnet_resource_id = azurerm_subnet.snet-training.id
|
||||||
|
|
||||||
|
identity {
|
||||||
|
type = "SystemAssigned"
|
||||||
|
}
|
||||||
|
|
||||||
|
scale_settings {
|
||||||
|
min_node_count = 0
|
||||||
|
max_node_count = 3
|
||||||
|
scale_down_nodes_after_idle_duration = "PT15M" # 15 minutes
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -43,6 +43,8 @@ This configuration describes the minimal set of resources you require to get sta
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
terraform init
|
||||||
|
|
||||||
terraform plan -var name=azureml567 -out demo.tfplan
|
terraform plan -var name=azureml567 -out demo.tfplan
|
||||||
|
|
||||||
terraform apply "demo.tfplan"
|
terraform apply "demo.tfplan"
|
||||||
|
@ -0,0 +1,37 @@
|
|||||||
|
# Generate random string for unique compute instance name
|
||||||
|
resource "random_string" "ci_prefix" {
|
||||||
|
length = 8
|
||||||
|
upper = false
|
||||||
|
special = false
|
||||||
|
number = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute instance
|
||||||
|
resource "azurerm_machine_learning_compute_instance" "compute_instance" {
|
||||||
|
name = "${random_string.ci_prefix.result}instance"
|
||||||
|
location = azurerm_resource_group.default.location
|
||||||
|
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
|
||||||
|
virtual_machine_size = "STANDARD_DS2_V2"
|
||||||
|
subnet_resource_id = var.training_subnet_resource_id
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compute cluster
|
||||||
|
resource "azurerm_machine_learning_compute_cluster" "compute" {
|
||||||
|
name = "cpu-cluster"
|
||||||
|
location = azurerm_resource_group.default.location
|
||||||
|
machine_learning_workspace_id = azurerm_machine_learning_workspace.default.id
|
||||||
|
vm_priority = "Dedicated"
|
||||||
|
vm_size = "STANDARD_DS2_V2"
|
||||||
|
subnet_resource_id = var.training_subnet_resource_id
|
||||||
|
|
||||||
|
identity {
|
||||||
|
type = "SystemAssigned"
|
||||||
|
}
|
||||||
|
|
||||||
|
scale_settings {
|
||||||
|
min_node_count = 0
|
||||||
|
max_node_count = 3
|
||||||
|
scale_down_nodes_after_idle_duration = "PT15M" # 15 minutes
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -8,6 +8,8 @@ for private network connectivity using [Azure Private Link](https://docs.microso
|
|||||||
|
|
||||||
This configuration describes the minimal set of resources you require to get started with Azure Machine Learning in a network-isolated set-up. This configurations assumes that you have existing network components to reuse. The [201 example](../201-machine-learning-moderately-secure/readme.md), alternatively creates new network components.
|
This configuration describes the minimal set of resources you require to get started with Azure Machine Learning in a network-isolated set-up. This configurations assumes that you have existing network components to reuse. The [201 example](../201-machine-learning-moderately-secure/readme.md), alternatively creates new network components.
|
||||||
|
|
||||||
|
Please note that this template does not create Azure Private DNS zones. The assumption is that you have already configured Azure private DNS zones that are linked to your virtual network resources.
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
|
|
||||||
| Terraform Resource Type | Description |
|
| Terraform Resource Type | Description |
|
||||||
@ -20,8 +22,6 @@ This configuration describes the minimal set of resources you require to get sta
|
|||||||
| `azurerm_machine_learning_workspace` | An Azure Machine Learning workspace instance |
|
| `azurerm_machine_learning_workspace` | An Azure Machine Learning workspace instance |
|
||||||
| `azurerm_virtual_network` | An Azure Machine Learning workspace instance |
|
| `azurerm_virtual_network` | An Azure Machine Learning workspace instance |
|
||||||
| `azurerm_subnet` | An Azure Machine Learning workspace instance |
|
| `azurerm_subnet` | An Azure Machine Learning workspace instance |
|
||||||
| `azurerm_private_dns_zone` | Private DNS Zones for FQDNs required for Azure Machine Learning and associated resources |
|
|
||||||
| `azurerm_private_dns_zone_virtual_network_link` | Virtual network links of the Private DNS Zones to the virtual network resource |
|
|
||||||
| `azurerm_private_endpoint` | Private Endpoints for the Azure Machine Learning workspace and associated resources |
|
| `azurerm_private_endpoint` | Private Endpoints for the Azure Machine Learning workspace and associated resources |
|
||||||
| `azurerm_machine_learning_compute_instance` | An Azure Machine Learning compute instance a single-node managed compute. |
|
| `azurerm_machine_learning_compute_instance` | An Azure Machine Learning compute instance a single-node managed compute. |
|
||||||
| `azurerm_machine_learning_compute_cluster` | An Azure Machine Learning compute cluster as multi-node shared and managed compute. |
|
| `azurerm_machine_learning_compute_cluster` | An Azure Machine Learning compute cluster as multi-node shared and managed compute. |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user