# WEKA project description

The WEKA project ultimately uses the internal GCP resources. A basic WEKA project includes a cluster with several virtual private clouds (VPCs), VMs (instances), a load balancer, DNS, cloud storage, a secret manager, and a few more elements that manage the resize of the cluster. The peering between all the virtual networks enables running the functions across all the networks.

<figure><img src="https://1970823310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqDzxyFrTFrLD641p0iH%2Fuploads%2FID51aGxSUHLPrIfFHHBr%2FGCP_puplic_network.png?alt=media&#x26;token=592dc645-ba02-4b65-ae9f-13eab618bcf5" alt="" width="563"><figcaption><p>WEKA project on the GCP</p></figcaption></figure>

### Resize cloud function operation

A resize cloud function in vpc-0 and a workload listener are deployed for auto-scale instances in GCP. Once a user sends a [request for resizing](https://docs.weka.io/4.2/install/weka-installation-on-gcp/auto-scale-instances-in-gcp) the number of instances in the cluster, the workload listener checks the *cluster state* file in the cloud storage and triggers the resize cloud function if a resize is required. The cluster state file is an essential part of the resizing decision. It indicates states such as:

* Readiness of the cluster.
* The number of existing instances.
* The number of requested instances.

The secret manager retains the user name (usually *admin*) and the Terraform-generated password. The resize cloud function uses the user name and password to operate on the cluster instances.

## GCP subnet types

Depending on the required security level, you can deploy the WEKA project on one of the following subnet types:

* **Public subnet:** Use a public subnet within your VPC with an internet gateway, and allow public IP addresses for your instances.
* **Private subnet shared with a Bastion project:** Create a private subnet with a shared project with a Bastion project, a risk-based security solution used for authenticating communication with a public network, such as downloading the WEKA software from get.weka.io. The Bastion project includes a Bastion VM (host) acting as a network gateway. The relevant ports are open (by the Terraform files).&#x20;
* **Private subnet shared with a yum project:** If a connection to get.weka.io for downloading the WEKA software is impossible, create a private subnet with a yum repository containing the WEKA software. The relevant ports are open (by the Terraform files).

<figure><img src="https://1970823310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqDzxyFrTFrLD641p0iH%2Fuploads%2FuMey8cgMV5rXIXu5nvcN%2FGCP_weka_with_bastion_project.png?alt=media&#x26;token=d2a8b1ce-1175-4bc5-87e1-5cd2034499d7" alt="" width="563"><figcaption><p>Private subnet shared with a Bastion project </p></figcaption></figure>

<figure><img src="https://1970823310-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNqDzxyFrTFrLD641p0iH%2Fuploads%2FyAQRRr3FMIYOKTjOl3Ap%2FGCP_weka_with_yum_project.png?alt=media&#x26;token=d3c818b1-48fd-481a-9bbc-f86a3c6d4a14" alt="" width="563"><figcaption><p>Private subnet shared with a yum project </p></figcaption></figure>
