GCP resources provisioning for deploying “Raven”
This document guides you through provisioning GCP resources using Terraform for deploying the “Raven” SaaS product. The example repository is for guidance purposes to help you understand the requirements and needed GCP resources to run the Raven platform (self-hosted). It is not intended for production use.
Before starting, ensure you have the following:
Configure a proper Terraform backend to store the state files securely. Create or modify the backend.tf
file:
In providers.tf
, configure the GCP provider with the required project and credentials:
Open the variables.tf
file and set appropriate values for the variables. Modify defaults as needed:
Generate an execution plan to preview the changes:
Apply the changes to your GCP environment:
Confirm the apply step by typing yes
when prompted.
Compute Engine Instances: The configuration includes setting up Compute Engine instances with appropriate IAM roles and security settings.
compute.tf
, the script provisions Compute Engine instances, attaches IAM roles, and configures firewall rules to allow necessary traffic.clickhouse.tf
file.Memorystore for Redis: Managed Redis instances using Memorystore.
memorystore.tf
, it sets up Redis with specified node types and cluster settings, ensuring proper subnet and security group configurations.redis_host
and redis_port
which will then be passed to the Cloud Run service as environment variables.Cloud SQL (PostgreSQL): Provisions a managed database instance.
cloudsql.tf
file includes configurations for instance type, storage, and security groups, tailored to meet the requirements of the SaaS product.Cloud Run: Sets up Cloud Run services triggered by Cloud Storage events.
cloudrun.tf
, the configuration includes creating Cloud Run services, assigning IAM roles, and setting up Cloud Storage event triggers.cloudrun_service_url
which will be used to configure Cloud Storage bucket to send events to the Cloud Run service.cloudrun_service_account
which will be used to allow the Cloud Run service to access the Memorystore/Redis database.Verify the resources in the Google Cloud Console to ensure they are created as expected. Use Cloud Monitoring and other monitoring tools to manage and observe the performance and health of the provisioned resources.
To destroy the resources created by Terraform when they are no longer needed:
Confirm the destroy step by typing yes
when prompted.
For more detailed information, refer to the GitLab repository.
GCP resources provisioning for deploying “Raven”
This document guides you through provisioning GCP resources using Terraform for deploying the “Raven” SaaS product. The example repository is for guidance purposes to help you understand the requirements and needed GCP resources to run the Raven platform (self-hosted). It is not intended for production use.
Before starting, ensure you have the following:
Configure a proper Terraform backend to store the state files securely. Create or modify the backend.tf
file:
In providers.tf
, configure the GCP provider with the required project and credentials:
Open the variables.tf
file and set appropriate values for the variables. Modify defaults as needed:
Generate an execution plan to preview the changes:
Apply the changes to your GCP environment:
Confirm the apply step by typing yes
when prompted.
Compute Engine Instances: The configuration includes setting up Compute Engine instances with appropriate IAM roles and security settings.
compute.tf
, the script provisions Compute Engine instances, attaches IAM roles, and configures firewall rules to allow necessary traffic.clickhouse.tf
file.Memorystore for Redis: Managed Redis instances using Memorystore.
memorystore.tf
, it sets up Redis with specified node types and cluster settings, ensuring proper subnet and security group configurations.redis_host
and redis_port
which will then be passed to the Cloud Run service as environment variables.Cloud SQL (PostgreSQL): Provisions a managed database instance.
cloudsql.tf
file includes configurations for instance type, storage, and security groups, tailored to meet the requirements of the SaaS product.Cloud Run: Sets up Cloud Run services triggered by Cloud Storage events.
cloudrun.tf
, the configuration includes creating Cloud Run services, assigning IAM roles, and setting up Cloud Storage event triggers.cloudrun_service_url
which will be used to configure Cloud Storage bucket to send events to the Cloud Run service.cloudrun_service_account
which will be used to allow the Cloud Run service to access the Memorystore/Redis database.Verify the resources in the Google Cloud Console to ensure they are created as expected. Use Cloud Monitoring and other monitoring tools to manage and observe the performance and health of the provisioned resources.
To destroy the resources created by Terraform when they are no longer needed:
Confirm the destroy step by typing yes
when prompted.
For more detailed information, refer to the GitLab repository.