This example implements the infrastructure required to deploy an end-to-end MLOps process using Vertex AI platform.
architecture:
- Vertex Workbench (for the experimentation environment).
- GCP Project (optional) to host all the resources.
- Isolated VPC network and a subnet to be used by Vertex and Dataflow. Alternatively, an external Shared VPC can be configured using the `network_config`variable.
- Firewall rule to allow the internal subnet communication required by Dataflow.
- Cloud NAT required to reach the internet from the different computing resources (Vertex and Dataflow).
- GCS buckets to host Vertex AI and Cloud Build Artifacts. By default the buckets will be regional and should match the Vertex AI region for the different resources (i.e. Vertex Managed Dataset) and processes (i.e. Vertex trainining).
- BigQuery Dataset where the training data will be stored. This is optional, since the training data could be already hosted in an existing BigQuery dataset.
- Artifact Registry Docker repository to host the custom images.
- Service account (`PREFIX-sa-mlops`) with the minimum permissions required by Vertex AI and Dataflow (if this service is used inside of the Vertex AI Pipeline).
- Service account (`PREFIX-sa-github@`) to be used by Workload Identity Federation, to federate Github identity (Optional).
- Secret Manager to store the Github SSH key to get access the CICD code repo.
description:Provide 'billing_account_id' value if project creation is needed, uses existing 'project_id' if null. Parent is in 'folders/nnn' or 'organizations/nnn' format.
type:|-
object({
billing_account_id = optional(string)
parent = optional(string)
project_id = string
})
required:true
- name:bucket_name
description:GCS bucket name to store the Vertex AI artifacts.
type:string
default:null
required:false
- name:dataset_name
description:BigQuery Dataset to store the training data.
type:string
default:null
required:false
- name:groups
description:Name of the groups (group_name@domain.org) to apply opinionated IAM permissions.
type:|-
object({
gcp-ml-ds = optional(string),
gcp-ml-eng = optional(string),
gcp-ml-viewer = optional(string)
})
default:{}
required:false
- name:identity_pool_claims
description:"Claims to be used by Workload Identity Federation (i.e.: attribute.repository/ORGANIZATION/REPO). If a not null value is provided, then google_iam_workload_identity_pool resource will be created."
type:string
default:null
required:false
- name:labels
description:Labels to be assigned at project level.
type:map(string)
required:false
default:{}
- name:location
description:Location used for multi-regional resources.
type:string
default:eu
required:false
- name:network_config
description:Shared VPC network configurations to use. If null networks will be created in projects with preconfigured values.
type:|-
object({
host_project = string
network_self_link = string
subnet_self_link = string
})
default:null
required:false
- name:prefix
description:Prefix used for the project id.
type:string
default:null
required:false
- name:region
description:Region used for regional resources.
type:string
default:europe-west4
required:false
- name:repo_name
description:Cloud Source Repository name. null to avoid to create it.