Skip to content

Commit

Permalink
dev: chg: fix some configs to be compatible with rehoming to eu-west-1 (
Browse files Browse the repository at this point in the history
  • Loading branch information
marcello33 authored Jul 13, 2023
1 parent 30b01d8 commit d0e8356
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
TF_VAR_AWS_PROFILE=default # do not change this
TF_VAR_VM_NAME=YOUR_IDENTIFIER # default "polygon-user". It can be any string, used to discriminate between instances
TF_VAR_DOCKERIZED=no # default "no", otherwise only one VM is created and the Polygon devnet will run in docker containers
TF_VAR_BOR_DISK_SIZE_GB=20 # size of the disk in GB for Bor client (default is 100GB)
TF_VAR_ERIGON_DISK_SIZE_GB=20 # size of the disk in GB for Erigon client (default is 100GB)
TF_VAR_BOR_DISK_SIZE_GB=20 # size of the disk in GB for Bor client (default is 20GB)
TF_VAR_ERIGON_DISK_SIZE_GB=20 # size of the disk in GB for Erigon client (default is 20GB)
TF_VAR_BOR_ARCHIVE_DISK_SIZE_GB=100 # size of the disk in GB in Bor archive node (default is 100GB)
TF_VAR_ERIGON_ARCHIVE_DISK_SIZE_GB=100 # size of the disk in GB in Erigon archive node (default is 100GB)
TF_VAR_BOR_IOPS=3000 # Amount of provisioned IOPS for Bor client
TF_VAR_ERIGON_IOPS=3000 # Amount of provisioned IOPS for Erigon client
TF_VAR_BOR_ARCHIVE_IOPS=15000 # Amount of provisioned IOPS in Bor archive node
TF_VAR_ERIGON_ARCHIVE_IOPS=15000 # Amount of provisioned IOPS in Erigon archive node
TF_VAR_BOR_ARCHIVE_IOPS=3000 # Amount of provisioned IOPS in Bor archive node
TF_VAR_ERIGON_ARCHIVE_IOPS=3000 # Amount of provisioned IOPS in Erigon archive node
TF_VAR_BOR_VALIDATOR_COUNT=2 # number of Bor validator nodes (default is 2). Note that while spinning up a public network (mainnet/mumbai) node, this will serve as a non-validator
TF_VAR_BOR_SENTRY_COUNT=1 # number of non-validator Bor sentry nodes (default is 1)
TF_VAR_BOR_ARCHIVE_COUNT=0 # number of Bor archive nodes (default is 0)
Expand All @@ -24,7 +24,7 @@ TF_VAR_BOR_VOLUME_TYPE=gp3 # default gp3
TF_VAR_ERIGON_VOLUME_TYPE=gp3 # default gp3
TF_VAR_BOR_ARCHIVE_VOLUME_TYPE=io1 # type of EBS volume for Bor archive nodes (default is io1)
TF_VAR_ERIGON_ARCHIVE_VOLUME_TYPE=io1 # type of EBS volume for Erigon archive nodes (default is io1)
TF_VAR_INSTANCE_AMI=ami-017fecd1353bcc96e # ami instance type (default is ami-017fecd1353bcc96e, running ubuntu 22.04)
TF_VAR_INSTANCE_AMI=ami-01dd271720c1ba44f # ami instance type (default is ami-01dd271720c1ba44f, running ubuntu 22.04)
TF_VAR_PEM_FILE=aws-key # name of the certificate (.pem file) previously generated (default is aws-key)
TF_VAR_REGION=eu-west-1 # AWS region to deploy to (default is eu-west-1)
PEM_FILE_PATH=/absolute/path/to/your/aws-key.pem # absolute path pointing to the certificate previously downloaded
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use the `express-cli` you have to execute the following steps.
- use [nvm](https://github.com/nvm-sh/nvm#installing-and-updating) to switch to the proper `node` version, `v16.17.1`,
by running `nvm use` from the root folder
- install `express-cli` and `matic-cli` locally with command `npm i`
- generate a keypair on AWS EC2 and download its certificate locally (`.pem` file)
- generate a keypair on AWS EC2 (in the same region being used, currently `eu-west-1` by default and download its certificate locally (`.pem` file)
- copy `secret.tfvars.example` to `secret.tfvar` with command `cp secret.tfvars.example secret.tfvars` and check the commented file for details
- **If you are a Polygon employee**, connect to the company VPN
- modify `secret.tfvar` with addresses of the allowed IPs (as specified in `secret.tfvars.example` file)
Expand Down
6 changes: 3 additions & 3 deletions src/express/common/config-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function validateEnvVars() {
TF_VAR_AWS_PROFILE: validStr({ choices: ['default'] }),
TF_VAR_VM_NAME: validStr({ default: 'polygon-user' }),
TF_VAR_DOCKERIZED: validStr({ choices: ['yes', 'no'] }),
TF_VAR_BOR_DISK_SIZE_GB: num({ default: 500 }),
TF_VAR_ERIGON_DISK_SIZE_GB: num({ default: 500 }),
TF_VAR_BOR_DISK_SIZE_GB: num({ default: 20 }),
TF_VAR_ERIGON_DISK_SIZE_GB: num({ default: 20 }),
TF_VAR_BOR_IOPS: num({ default: 3000 }),
TF_VAR_ERIGON_IOPS: num({ default: 3000 }),
TF_VAR_BOR_VALIDATOR_COUNT: num({ default: 2 }),
Expand All @@ -63,7 +63,7 @@ function validateEnvVars() {
TF_VAR_ERIGON_INSTANCE_TYPE: validStr({ default: 't2.xlarge' }),
TF_VAR_BOR_ARCHIVE_INSTANCE_TYPE: validStr({ default: 't2.xlarge' }),
TF_VAR_ERIGON_ARCHIVE_INSTANCE_TYPE: validStr({ default: 't2.xlarge' }),
TF_VAR_INSTANCE_AMI: validAmiStr({ default: 'ami-017fecd1353bcc96e' }),
TF_VAR_INSTANCE_AMI: validAmiStr({ default: 'ami-01dd271720c1ba44f' }),
TF_VAR_PEM_FILE: validStr({ default: 'aws-key' }),
TF_VAR_REGION: validStr({
default: 'eu-west-1',
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ variable "ERIGON_ARCHIVE_INSTANCE_TYPE" {
}

variable "INSTANCE_AMI" {
default = "ami-017fecd1353bcc96e"
default = "ami-01dd271720c1ba44f"
}

variable "PEM_FILE" {
Expand Down

0 comments on commit d0e8356

Please sign in to comment.