- Installed gcloud CLI
- Authorized gcloud SDK
gcloud init
gcloud auth application-default login
- [Optionally] Installed kubectl for interacting with EKS
- Configure variables in terraform.tfvars
-
project_name- AWS organization project name; -
region- AWS deployment region, default iseu-central-1; -
docker_image- docker image of the collator; -
container_args- collator arguments are specific to collator you spinning up; no spaces allowed in arguments - separate them with", "instead of spaces; -
container_command- command bypassed to collator container.
- Configure container ports with
container_argsin terraform.tfvars if your collator don't use defaults ports30333,9933,9944
- Configure variables in backend.tf
bucket- bucket name where tfvars are stored;
- Configure deployment parameters for GKE cluster in gke-cluster.tf
min_master_version- minimal kubernetes version for master, GCP will update it automatically, and we can't prevent itdisk_size_gb- disk size of each GKE nodecluster_cidr- cidr for GKE cluster, make sure to edit cidr in network.tf if editingcluster_cidrservices_cidr- cidr for GKE services, make sure to edit cidr in network.tf if editingservices_cidrmaster_cidr- cidr for GKE master nodes, make sure to edit cidr in network.tf if editingmaster_cidrmachine_type- node vm typenodes_number- initial nodes numbertotal_min_nodes- min nodes number for autoscalertotal_max_nodes- max nodes number for autoscaler, quota 8 for basic accounts
WARN
After any changes, GKE cluster is re-createdOnce you have configured everything follows steps below to deploy collator
- Install all dependecies with
terraform init - Check deployment with
terraform plan - If everything is planned correctly apply deployment with
terraform apply optionalcopy file backend.tf to GCP if you need to store tfstate in the google storage bucket- Verify that your node is syncing via telemetry
| Name | Version |
|---|---|
| terraform | >= 0.14 |
| 4.51.0 |
| Name | Version |
|---|---|
| 4.51.0 | |
| kubernetes | 2.18.1 |
No modules.
| Name | Type |
|---|---|
| google_compute_firewall.allow-all | resource |
| google_compute_network.vpc | resource |
| google_compute_route.egress_internet | resource |
| google_compute_router.router | resource |
| google_compute_router_nat.nat | resource |
| google_compute_subnetwork.subnet | resource |
| google_container_cluster.primary | resource |
| google_container_node_pool.primary_nodes | resource |
| google_storage_bucket.backend | resource |
| google_storage_bucket_object.default | resource |
| kubernetes_deployment.collator | resource |
| google_client_config.provider | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| container_args | n/a | list(string) |
n/a | yes |
| docker_image | n/a | string |
n/a | yes |
| project_name | n/a | string |
n/a | yes |
| container_command | n/a | list(string) |
[ |
no |
| region | GCP region | string |
"us-central1" |
no |
No outputs.