Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: chg: POS-1627: change default AWS region for deployments #190

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TF_VAR_BOR_ARCHIVE_VOLUME_TYPE=io1 # type of EBS volume for Bor archive nodes (d
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_PEM_FILE=aws-key # name of the certificate (.pem file) previously generated (default is aws-key)
TF_VAR_REGION=us-west-2 # AWS region to deploy to (default is us-west-2)
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

# Polygon network based variables (see configs/README.md) for more detailed info
Expand Down Expand Up @@ -83,4 +83,4 @@ RPC_URL= #External node URL to run the tests against (leave empty to run tests a
RPC_NETWORK= #The network for which tests will be run ('mumbai' or 'mainnet')
PRIVATE_KEY= #Private key of the account from which funds will be used for eth transaction calls
EXECUTION_COUNT_GETTERS= #The number of times the getter rpc calls are to be executed
EXECUTION_COUNT_SENDERS= #The number of times the sender rpc calls are to be executed
EXECUTION_COUNT_SENDERS= #The number of times the sender rpc calls are to be executed
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@master
with:
aws-region: us-west-2
aws-region: eu-west-1
role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/MaticCLIGitHubActionsRole
role-session-name: GithubActionsSession

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ In case there are multiple accounts available to you, please select

Then, the command will ask for other configs, please use

- CLI default client Region: us-west-2
- CLI default client Region: eu-west-1
- CLI default output format: json
- CLI profile name: default

Expand Down
2 changes: 1 addition & 1 deletion configs/devnet/docker-setup-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ borDockerBuildContext: https://github.com/maticnetwork/bor.git#develop
heimdallDockerBuildContext: https://github.com/maticnetwork/heimdall.git#develop
devnetBorUsers: ubuntu,ubuntu
devnetBorHosts:
- ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com # use localhost for local deployments
- ec2-xx-xxx-xx-xxx.eu-west-1.compute.amazonaws.com # use localhost for local deployments
10 changes: 5 additions & 5 deletions configs/devnet/remote-setup-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ numOfBorArchiveNodes: 0
numOfErigonValidators: 1
numOfErigonSentries: 1
numOfErigonArchiveNodes: 0
ethURL: http://ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com:9545
ethURL: http://ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com:9545
ethHostUser: ubuntu
devnetType: remote
devnetBorHosts:
- ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com
- ec2-yy-yyy-yyy-yy.us-west-2.compute.amazonaws.com
- ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com
- ec2-yy-yyy-yyy-yy.eu-west-1.compute.amazonaws.com
devnetHeimdallHosts:
- ec2-xx-xxx-xxx-xx.us-west-2.compute.amazonaws.com
- ec2-yy-yyy-yyy-yy.us-west-2.compute.amazonaws.com
- ec2-xx-xxx-xxx-xx.eu-west-1.compute.amazonaws.com
- ec2-yy-yyy-yyy-yy.eu-west-1.compute.amazonaws.com
devnetBorUsers:
- ubuntu
- ubuntu
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ variable "devnet_public_subnet" {
resource "aws_subnet" "devnet_public_subnet" {
vpc_id = aws_vpc.devnet_vpc.id
cidr_block = var.devnet_public_subnet
availability_zone = "us-west-2a"
availability_zone = "eu-west-1a"
map_public_ip_on_launch = true

tags = {
Expand Down Expand Up @@ -198,5 +198,5 @@ output "instance_dns_ips" {
}

output "instance_ids" {
value = concat(aws_instance.bor_node_server.*.id , aws_instance.erigon_node_server.*.id, aws_instance.dockerized_server.*.id)
value = concat(aws_instance.bor_node_server.*.id , aws_instance.erigon_node_server.*.id, aws_instance.dockerized_server.*.id)
}
2 changes: 1 addition & 1 deletion src/express/common/config-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function validateEnvVars() {
TF_VAR_INSTANCE_AMI: validAmiStr({ default: 'ami-017fecd1353bcc96e' }),
TF_VAR_PEM_FILE: validStr({ default: 'aws-key' }),
TF_VAR_REGION: validStr({
default: 'us-west-2',
default: 'eu-west-1',
choices: [
'us-east-2',
'us-east-1',
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ variable "PEM_FILE" {
}

variable "REGION" {
default = "us-west-2"
default = "eu-west-1"
}

variable "SG_CIDR_BLOCKS" {
Expand Down