---
description: >-
  This section aims at a system engineer who is familiar with the GCP concepts
  and experienced with using Terraform to deploy a system on GCP.
---

# WEKA installation on GCP

## WEKA on GCP overview

Leveraging the GCP advantages, WEKA provides a ready-to-deploy GCP-Terraform package that you can customize for installing the WEKA cluster on GCP.&#x20;

Within GCP, WEKA runs on instances. Each instance can use up to eight partitions of drives on the connected physical server (WEKA does not use the drives directly). The drives can be shared with other clients' partitions in the same physical server.

WEKA requires a minimum of four VPC networks, and each is associated with each of the instances. The reason for using four VPC networks is that a basic WEKA configuration consists of four processes: Compute, Drive, Frontend, and Management. Each of these processes requires a dedicated network interface as follows:

* eth0: Management VPC
* eth1: Compute VPC
* eth2: Frontend VPC
* eth3: Drive VPC

VPC peering is used for communication between the WEKA processes. A project in GCP is limited to a maximum of 32 VPC peers.

<figure><img src="https://1916840177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUYL9RLgSDAkF2U90csR%2Fuploads%2FUDwLvtvwkQGLx729jpTS%2FGCP_overview.png?alt=media&#x26;token=4bc98542-d941-4c7f-b6df-acf437e93758" alt=""><figcaption><p>Server infrastructure in GCP</p></figcaption></figure>

<details>

<summary>Terraform overview</summary>

Terraform is an open-source project from Hashicorp. It creates and manages resources on cloud platforms and on-premises clouds. Unlike AWS CloudFormation, it works with many APIs from multiple platforms and services.

The GCP Console is already installed with Terraform by default. It is the primary tool for deploying WEKA on GCP. Terraform can be used outside of GCP or independent of GCP Console.

<img src="https://1916840177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUYL9RLgSDAkF2U90csR%2Fuploads%2FteFUfDp19V3p7Ky8RCdZ%2FTerraform_overview.png?alt=media&#x26;token=c4e9a71f-63b8-4edc-a45e-b53355fcf79f" alt="" data-size="original">

### How does Terraform work?

A deployment with Terraform involves three phases:

* **Write:** Define the infrastructure in configuration files and customize the project variables provided in the Terraform package.
* **Plan**: Review the changes Terraform will make to your infrastructure.
* **Apply:** Terraform provisions the infrastructure, including the VMs and instances, installs the WEKA software, and creates the cluster. Once completed, the WEKA cluster runs on GCP.

<img src="https://1916840177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTUYL9RLgSDAkF2U90csR%2Fuploads%2FPlGIMOTCirs5kxekydaF%2FTerraform_how.png?alt=media&#x26;token=d2facdd7-546d-4f80-8f6b-39dc95875e97" alt="Terraform phases" data-size="original">

**Related information**

[Terraform Tutorials](https://learn.hashicorp.com/terraform?track=gcp)

[Terraform Installation](https://learn.hashicorp.com/tutorials/terraform/install-cli)

</details>
