Skip to content

Commit

Permalink
Add mlplatform jupyterhub, mlflow, deploy resources
Browse files Browse the repository at this point in the history
  • Loading branch information
schirevko committed Dec 21, 2023
1 parent 5e4823a commit eb5a945
Show file tree
Hide file tree
Showing 44 changed files with 2,550 additions and 14 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ description: |-
---

# VKCS Provider's changelog
#### v0.5.6 (unreleased)
#### v0.6.0 (unreleased)
- Add mlplatform jupyterhub, mlflow, mlflow_deploy resources
- Use chart name as Kubernetes addon's default name

#### v0.5.5
Expand Down
2 changes: 1 addition & 1 deletion automation
103 changes: 103 additions & 0 deletions docs/resources/mlplatform_jupyterhub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
subcategory: "ML Platform"
layout: "vkcs"
page_title: "vkcs: vkcs_mlplatform_jupyterhub"
description: |-
Manages a ML Platform JupyterHub instance resource within VKCS.
---

# vkcs_mlplatform_jupyterhub

Manages a ML Platform JupyterHub resource.

## Example Usage
```terraform
resource "vkcs_mlplatform_jupyterhub" "jupyterhub" {
name = "tf-example"
admin_name = "admin"
admin_password = "Password!"
flavor_id = data.vkcs_compute_flavor.basic.id
availability_zone = "GZ1"
boot_volume = {
volume_type = "ceph-ssd"
}
data_volumes = [
{
size = 60
volume_type = "ceph-ssd"
},
{
size = 70
volume_type = "ceph-ssd"
}
]
networks = [
{
network_id = vkcs_networking_network.app.id
},
]
}
```

## Argument Reference
- `availability_zone` **required** *string* → The availability zone in which to create the resource. Changing this creates a new resource

- `boot_volume` ***required*** → Instance's boot volume configuration
- `volume_type` **required** *string* → Type of the volume

- `size` optional *number* → Size of the volume

- `name` read-only *string* → Name of the volume

- `volume_id` read-only *string* → ID of the volume


- `data_volumes` *list* → Instance's data volumes configuration
- `size` **required** *number* → Size of the volume

- `volume_type` **required** *string* → Type of the volume

- `name` read-only *string* → Name of the volume

- `volume_id` read-only *string* → ID of the volume


- `flavor_id` **required** *string* → Flavor ID

- `name` **required** *string* → Instance name. Changing this creates a new resource

- `networks` *list* → Network configuration
- `network_id` **required** *string* → ID of the network

- `ip_pool` optional *string* → ID of the ip pool


- `admin_name` optional *string* → JupyterHub admin name. Changing this creates a new resource

- `admin_password` optional sensitive *string* → JupyterHub admin password. Changing this creates a new resource

- `domain_name` optional *string* → Domain name. Changing this creates a new resource

- `region` optional *string* → The `region` to fetch availability zones from, defaults to the provider's `region`.

- `s3fs_bucket` optional *string* → Connect specified s3 bucket to instance as volume. Changing this creates a new resource


## Attributes Reference
In addition to all arguments above, the following attributes are exported:
- `created_at` *string* → Creation timestamp

- `dns_name` *string* → DNS name

- `id` *string* → ID of the resource

- `private_ip` *string* → Private IP address



## Import

ML Platform JupyterHub instance can be imported using the `id`, e.g.
```shell
terraform import vkcs_mlplatform_jupyterhub.myjupyterhub 3a679dd9-0942-49b0-b233-95de5a5a9502
```
96 changes: 96 additions & 0 deletions docs/resources/mlplatform_mlflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
subcategory: "ML Platform"
layout: "vkcs"
page_title: "vkcs: vkcs_mlplatform_mlflow"
description: |-
Manages a ML Platform MLFlow instance resource within VKCS.
---

# vkcs_mlplatform_mlflow

Manages a ML Platform MLFlow resource.

## Example Usage
```terraform
resource "vkcs_mlplatform_mlflow" "mlflow" {
name = "tf-example"
flavor_id = data.vkcs_compute_flavor.basic.id
jh_instance_id = vkcs_mlplatform_jupyterhub.jupyterhub.id
is_demo = true
availability_zone = "GZ1"
boot_volume = {
size = 50
volume_type = "ceph-ssd"
}
data_volumes = [
{
size = 60
volume_type = "ceph-ssd"
},
]
networks = [
{
network_id = vkcs_networking_network.app.id
},
]
}
```

## Argument Reference
- `availability_zone` **required** *string* → The availability zone in which to create the resource. Changing this creates a new resource

- `boot_volume` ***required*** → Instance's boot volume configuration
- `volume_type` **required** *string* → Type of the volume

- `size` optional *number* → Size of the volume

- `name` read-only *string* → Name of the volume

- `volume_id` read-only *string* → ID of the volume


- `flavor_id` **required** *string* → Flavor ID

- `jh_instance_id` **required** *string* → JupyterHub instance ID

- `name` **required** *string* → Instance name. Changing this creates a new resource

- `networks` *list* → Network configuration
- `network_id` **required** *string* → ID of the network

- `ip_pool` optional *string* → ID of the ip pool


- `data_volumes` *list* → Instance's data volumes configuration
- `size` **required** *number* → Size of the volume

- `volume_type` **required** *string* → Type of the volume

- `name` read-only *string* → Name of the volume

- `volume_id` read-only *string* → ID of the volume


- `demo_mode` optional *boolean* → Controls whether demo mode is enabled. If true, data will be stored on mlflow virtual machine. If false, s3 bucket will be used alongside dbaas postgres database.

- `region` optional *string* → The `region` to fetch availability zones from, defaults to the provider's `region`.


## Attributes Reference
In addition to all arguments above, the following attributes are exported:
- `created_at` *string* → Creation timestamp

- `dns_name` *string* → DNS name

- `id` *string* → ID of the resource

- `private_ip` *string* → Private IP address



## Import

ML Platform MLFlow instance can be imported using the `id`, e.g.
```shell
terraform import vkcs_mlplatform_mlflow.mymlflow b22e0fd6-f7e5-41b7-9cc5-15c1f352bc0d
```
94 changes: 94 additions & 0 deletions docs/resources/mlplatform_mlflow_deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
subcategory: "ML Platform"
layout: "vkcs"
page_title: "vkcs: vkcs_mlplatform_mlflow_deploy"
description: |-
Manages a ML Platform MLFlow Deploy instance resource within VKCS.
---

# vkcs_mlplatform_mlflow_deploy

Manages a ML Platform Deploy resource.

## Example Usage
```terraform
resource "vkcs_mlplatform_mlflow_deploy" "deploy" {
name = "tf-example"
flavor_id = data.vkcs_compute_flavor.basic.id
mlflow_instance_id = vkcs_mlplatform_mlflow.mlflow.id
availability_zone = "GZ1"
boot_volume = {
size = 50
volume_type = "ceph-ssd"
}
data_volumes = [
{
size = 60
volume_type = "ceph-ssd"
},
]
networks = [
{
network_id = vkcs_networking_network.app.id
},
]
}
```

## Argument Reference
- `availability_zone` **required** *string* → The availability zone in which to create the resource. Changing this creates a new resource

- `boot_volume` ***required*** → Instance's boot volume configuration
- `volume_type` **required** *string* → Type of the volume

- `size` optional *number* → Size of the volume

- `name` read-only *string* → Name of the volume

- `volume_id` read-only *string* → ID of the volume


- `flavor_id` **required** *string* → Flavor ID

- `mlflow_instance_id` **required** *string* → MLFlow instance ID

- `name` **required** *string* → Instance name. Changing this creates a new resource

- `networks` *list* → Network configuration
- `network_id` **required** *string* → ID of the network

- `ip_pool` optional *string* → ID of the ip pool


- `data_volumes` *list* → Instance's data volumes configuration
- `size` **required** *number* → Size of the volume

- `volume_type` **required** *string* → Type of the volume

- `name` read-only *string* → Name of the volume

- `volume_id` read-only *string* → ID of the volume


- `region` optional *string* → The `region` to fetch availability zones from, defaults to the provider's `region`.


## Attributes Reference
In addition to all arguments above, the following attributes are exported:
- `created_at` *string* → Creation timestamp

- `dns_name` *string* → DNS name

- `id` *string* → ID of the resource

- `private_ip` *string* → Private IP address



## Import

ML Platform JupyterHub instance can be imported using the `id`, e.g.
```shell
terraform import vkcs_mlplatform_mlflow_deploy.mymlflowdeploy 0cade671-81b5-43c5-83e1-2a659378d53a
```
1 change: 1 addition & 0 deletions examples/mlplatform/jupyterhub/base-flavor.tf
1 change: 1 addition & 0 deletions examples/mlplatform/jupyterhub/base-networking.tf
25 changes: 25 additions & 0 deletions examples/mlplatform/jupyterhub/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
resource "vkcs_mlplatform_jupyterhub" "jupyterhub" {
name = "tf-example"
admin_name = "admin"
admin_password = "Password!"
flavor_id = data.vkcs_compute_flavor.basic.id
availability_zone = "GZ1"
boot_volume = {
volume_type = "ceph-ssd"
}
data_volumes = [
{
size = 60
volume_type = "ceph-ssd"
},
{
size = 70
volume_type = "ceph-ssd"
}
]
networks = [
{
network_id = vkcs_networking_network.app.id
},
]
}
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow/base-flavor.tf
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow/base-jupyterhub.tf
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow/base-networking.tf
22 changes: 22 additions & 0 deletions examples/mlplatform/mlflow/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
resource "vkcs_mlplatform_mlflow" "mlflow" {
name = "tf-example"
flavor_id = data.vkcs_compute_flavor.basic.id
jh_instance_id = vkcs_mlplatform_jupyterhub.jupyterhub.id
is_demo = true
availability_zone = "GZ1"
boot_volume = {
size = 50
volume_type = "ceph-ssd"
}
data_volumes = [
{
size = 60
volume_type = "ceph-ssd"
},
]
networks = [
{
network_id = vkcs_networking_network.app.id
},
]
}
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow_deploy/base-flavor.tf
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow_deploy/base-jupyterhub.tf
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow_deploy/base-mlflow.tf
1 change: 1 addition & 0 deletions examples/mlplatform/mlflow_deploy/base-networking.tf
Loading

0 comments on commit eb5a945

Please sign in to comment.