Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to <the location where you extracted the gcp.tar.gz file>/gcp/terraform and copy theterraform.tfvars.example to terraform.tfvars.

  2. Edit the terraform.tfvars file.

  3. Specify the desired cluster name, GCP OCI region and kubernetes_version prefix (please refer to the Compatibility Matrix (4.1) to find out which Kubernetes versions that are compatible with this release of Usage Engine Private Edition). Also specify your GCP project id OCI tenancy_ocid, user_ocid, fingerprint, compartment_ocid and private_key_path (which can be found on the GCP dashboardOCI dashboard’s Profile page), as well as the desired number of nodes per region cluster (gkeoke_num_nodes).

  4. If you will be running with a database other than Derby also specify db_password, db_version and db_allocated_storageusername.

terraform.tfvars

Where to get the value from?

project_id

In the GCP management console, this is the Project ID that is listed on Cloud overview | Dashboard | Project info. Or use command gcloud projects list to retrieve project info.

project_number

In the GCP management console, this is the Project Number that is listed on Cloud overview | Dashboard | Project info. Or use command gcloud projects list to retrieve project info.

region

The region in which you will install your cluster, refer to https://cloud.google.com/compute/docs/regions-zones for possible values. Or use command gcloud compute regions list to get the values.

cluster_name

A name for your cluster. Cluster names must start with a lowercase letter followed by up to 39 lowercase letters, numbers or hyphens. They can't end with a hyphen. The cluster name must be unique in the project.

domain

Your existing domain name. In the GCP management console, this is the DNS name that is listed on page Cloud DNS | Zones. Or use command gcloud dns managed-zones list to get the dns name.

kubernetes_version_prefix

Prefix version for kubernetes (default “1.27.").

gke_num_nodes

Number of cluster nodes per zone.

db_password

Choose a secure password for the system database administrator.

Minimum 10 characters.

db_version

Database version, check https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_database_instance#database_version for possible values. Default is POSTGRES_15 (PostgreSQL version 15).

db_allocated_storage

Allocated amount of storage for the database. Default is “10” (10GB).

filestore_location

To find out available zones of your region, use command gcloud compute zones list --filter="region:<region>".

Replace <region> with the region value configured above, i.e., the region in which you will install your cluster

...

  • You need to set auto_create_ns_record = false to disable subdomain NS record auto creation in the parent domain.

  • Perform terraform apply.

  • After terraform apply is finished, copy the name servers value from terraform output and manually add them to parent domain as NS record. If you are not using Cloud OCI DNS as the parent domain, please refer to your Domain Registrar documentation on how to add NS record.

  1. Authenticate your computer with GCP

...

  1. Run the following commands

Code Block
terraform init
terraform plan
terraform apply

...

Info

Make sure to save the output from terraform above. Reason being that it is used as input throughout the remainder of this installation guide.

Info

The persistent volume and persistent volume claim yaml file being generated at the end of the terraform apply. This yaml file is located at manifests/filestore_persistence.yaml. This yaml file shall be executed at the later section.

Please note that persistent volume setup is an optional step. Ignore this yaml file if you are not intended to have persistent file storage.

A fully functional Kubernetes cluster has now been set up successfully.

...

You can check the status of the cluster, db and the other resources in the GCP OCI dashboard.

Setup Additional Infrastructure Resources on AWS

...