Skip to content

Commit

Permalink
modify terraform for eu-west-1 (maticnetwork#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
gatsbyz authored Sep 7, 2023
1 parent 4514d7a commit 0ef0803
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ansible/inventory/aws_ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
plugin: amazon.aws.aws_ec2

regions:
- us-west-2
- eu-west-1

keyed_groups:
- key: tags.Role
Expand Down
4 changes: 2 additions & 2 deletions backend.hcl.s3
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bucket = "polygon-edge-devnet-tf-states"
bucket = "polygon-edge-devnet-terraform-states"
key = "state/devnet01"
region = "us-west-2"
region = "eu-west-1"
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cd terraform-polygon-supernets
```
$ export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
$ export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ export AWS_DEFAULT_REGION=us-west-2
$ export AWS_DEFAULT_REGION=eu-west-1
```

Note: Ensure that the AWS user role has the necessary permissions to create all
Expand Down Expand Up @@ -153,7 +153,7 @@ ansible-galaxy install -r requirements.yml

```
regions:
- us-west-2
- eu-west-1
###
filters:
tag:BaseDN: "<YOUR_DEPLOYMENT_NAME>.edge.<YOUR_COMPANY>.private"
Expand Down Expand Up @@ -222,7 +222,7 @@ be able to send transactions. The command below uses

```
cast send --legacy \
--rpc-url http://ext-rpc-devnet13-edge-10623089.us-west-2.elb.amazonaws.com \
--rpc-url http://ext-rpc-devnet13-edge-10623089.eu-west-1.elb.amazonaws.com \
--value 1 \
--private-key 0x42b6e34dc21598a807dc19d7784c71b2a7a01f6480dc6f58258f78e539f1a1fa \
0x9f34dCBECFC0BD4c1ee3d12e1Fb5DCF1A0b9BCcB
Expand All @@ -236,7 +236,7 @@ is the default load test address of `polycli`:

```
polycli loadtest --chain-id 1 --mode t --requests 10 \
--verbosity 601 http://ext-rpc-devnet13-edge-10623089.us-west-2.elb.amazonaws.com
--verbosity 601 http://ext-rpc-devnet13-edge-10623089.eu-west-1.elb.amazonaws.com
```

## Destroy Procedure 💥
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
locals {
network_type = "edge"
base_ami = "ami-0ecc74eca1d66d8a6"
base_ami = "ami-0267f74ea1e610dec"
base_dn = format("%s.%s.%s.private", var.deployment_name, local.network_type, var.company_name)
base_id = format("%s-%s", var.deployment_name, local.network_type)
}

terraform {
# backend "s3" {}
backend "s3" {}
required_providers {
aws = {
source = "hashicorp/aws"
Expand Down
2 changes: 1 addition & 1 deletion modules/dns/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variable "base_dn" {
variable "region" {
description = "The region where we want to deploy"
type = string
default = "us-west-2"
default = "eu-west-1"
}

variable "deployment_name" {
Expand Down
1 change: 0 additions & 1 deletion modules/ec2/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ variable "base_instance_type" {
variable "base_ami" {
description = "Value of the base AMI that we're using"
type = string
default = "ami-0ecc74eca1d66d8a6"
}
variable "fullnode_count" {
description = "The number of full nodes that we're going to deploy"
Expand Down
3 changes: 1 addition & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ cd ansible
### Run ansible to configure the nodes
ansible all -m ping
ansible-galaxy install -r requirements.yml
# if this step fails due to "sudo: a password is required", make sure you are in sudo mode in the terminal you are running this on
ansible-playbook site.yml
ansible-playbook site.yml --ask-become-pass
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ variable "private_network_mode" {
variable "region" {
description = "The region where we want to deploy"
type = string
default = "us-west-2"
default = "eu-west-1"
}

variable "validator_count" {
Expand All @@ -133,5 +133,5 @@ variable "validator_count" {
variable "zones" {
description = "The availability zones for deployment"
type = list(string)
default = ["us-west-2a", "us-west-2b", "us-west-2c", "us-west-2d"]
default = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
}

0 comments on commit 0ef0803

Please sign in to comment.