Skip to content

Commit

Permalink
adjust tf init, terraform output with chdir flag and more information…
Browse files Browse the repository at this point in the history
… about products
  • Loading branch information
caetano-colin committed Jul 4, 2024
1 parent 1619330 commit 508c96c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
16 changes: 11 additions & 5 deletions examples/genai-rag-multimodal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ The main modifications to the original example include:

- Adaptations to comply with Cloud Foundation Toolkit security measures.
- Installation of additional libraries in the Conda environment.
- Use of Vertex AI Workbench to run the notebook with a custom Service Account.
- Use of Vertex AI Workbench to run the notebook with a custom Service Account in a secure environment.
- Implementation of Vector Search on Vertex AI with [Private Service Connect](https://cloud.google.com/vpc/docs/private-service-connect).

For more information about the technologies used in this example, please refer to the following resources:

- [Vertex AI Workbench Introduction](https://cloud.google.com/vertex-ai/docs/workbench/introduction)
- [Vertex AI Vector Search Overview](https://cloud.google.com/vertex-ai/docs/vector-search/overview)
- [Ragas Documentation](https://docs.ragas.io/en/stable/)

## Requirements

- Terraform v1.7.5
Expand All @@ -33,10 +39,10 @@ The main modifications to the original example include:
```

- Assuming you are deploying the example on top of the development environment, the following instructions will provide you more insight on how to retrieve these values:
- **NETWORK-PROJECT-ID**: Run `terraform output -raw restricted_host_project_id` on `gcp-networks` repository, inside the development environment directory and branch.
- **NETWORK-NAME**: Run `terraform output -raw restricted_network_name` on `gcp-networks` repository, inside the development environment directory and branch.
- **MACHINE-LEARNING-PROJECT-ID**: Run `terraform output -raw machine_learning_project_id` on `gcp-projects` repository, inside the Machine Learning business unit directory and on the development branch.
- **KMS-PROJECT-ID**, **ML-ENV-KEYRING**, **ML-ENV-KEY**: Run `terraform output machine_learning_kms_keys` on `gcp-projects` repository, inside the Machine Learning business unit directory and on the development branch.
- **NETWORK-PROJECT-ID**: Run `terraform -chdir="envs/development" output -raw restricted_host_project_id` on `gcp-networks` repository at the development branch. Please note that if you have not initialized the environment you will need to run `./tf-wrapper init development` on the directory.
- **NETWORK-NAME**: Run `terraform -chdir="envs/development" output -raw restricted_network_name` on `gcp-networks` repository at the development branch. Please note that if you have not initialized the environment you will need to run `./tf-wrapper init development` on the directory.
- **MACHINE-LEARNING-PROJECT-ID**: Run `terraform -chdir="ml_business_unit/development" output -raw machine_learning_project_id` on `gcp-projects` repository, at the development branch. Please note that if you have not initialized the environment you will need to run `./tf-wrapper init development` on the directory.
- **KMS-PROJECT-ID**, **ML-ENV-KEYRING**, **ML-ENV-KEY**: Run `terraform -chdir="ml_business_unit/development" output machine_learning_kms_keys` on `gcp-projects` repository, at the development branch. Please note that if you have not initialized the environment you will need to run `./tf-wrapper init development` on the directory.
- **REGION**: The chosen region.

## Deploying infrastructure using Machine Learning Infra Pipeline
Expand Down
5 changes: 3 additions & 2 deletions examples/genai-rag-multimodal/multimodal_rag_langchain.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"* Retrieve the value of the service attachment and execute the command below on your local machine:"
"* Retrieve the value of the service attachment and execute the `gcloud` command below on your local machine:\n",
"* NOTE: If you don't have permission to run the command below, you may need to open a PR to `gcp-networks` repository adding the forwarding rule or ask a network engineer to create this forwarding rule."
]
},
{
Expand All @@ -720,7 +721,7 @@
"NETWORK=\"<INSERT_HOST_VPC_NETWORK>\"\n",
"NETWORK_PROJECT_ID=\"<INSERT_HOST_VPC_PROJECT_ID>\"\n",
"\n",
"!gcloud compute forwarding-rules create vector-search-endpoint \\\n",
"!echo gcloud compute forwarding-rules create vector-search-endpoint \\\n",
" --network={NETWORK} \\\n",
" --address=vector-search-endpoint \\\n",
" --target-service-attachment={SERVICE_ATTACHMENT} \\\n",
Expand Down

0 comments on commit 508c96c

Please sign in to comment.