# WEKA project description

The WEKA project ultimately uses the internal GCP resources. A basic WEKA project includes a cluster with a few virtual networks (vnet), 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://1916840177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUYL9RLgSDAkF2U90csR%2Fuploads%2FkB37NyYy6BUp0HpMWYrU%2FGCP_puplic_network.png?alt=media&#x26;token=a7e6fd12-83eb-4b68-b890-7ad6f74a342f" alt=""><figcaption><p>Weka project on the GCP</p></figcaption></figure>

### Resize cloud function operation

A resize cloud function in vnet-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.1/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://1916840177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUYL9RLgSDAkF2U90csR%2Fuploads%2FqRxKaqkm1heZYZ1iG3BM%2FGCP_weka_with_bastion_project.png?alt=media&#x26;token=108e683f-1d01-4526-bde8-188feff66621" alt=""><figcaption><p>Private subnet shared with a Bastion project </p></figcaption></figure>

<figure><img src="https://1916840177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUYL9RLgSDAkF2U90csR%2Fuploads%2FDTvZ2MafWHWejvxOObEL%2FGCP_weka_with_yum_project.png?alt=media&#x26;token=1a823d31-1969-48bd-b629-019145b1c631" alt=""><figcaption><p>Private subnet shared with a yum project </p></figcaption></figure>
