mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-15 09:20:44 +00:00
upgrade terraform (#315)
Co-authored-by: Liam Lai <liam.lai@datameshgroup.com.au>
This commit is contained in:
parent
45c1518ea1
commit
0fcf13e842
4 changed files with 12 additions and 16 deletions
16
.travis.yml
16
.travis.yml
|
|
@ -5,7 +5,7 @@ go_import_path: github.com/XinFinOrg/XDPoSChain
|
||||||
on:
|
on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- dev-upgrade
|
- dev-upgrade
|
||||||
tags: true
|
tags: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|
@ -102,7 +102,7 @@ jobs:
|
||||||
- docker build -t xinfinorg/xdposchain:$TRAVIS_TAG -f cicd/Dockerfile .
|
- docker build -t xinfinorg/xdposchain:$TRAVIS_TAG -f cicd/Dockerfile .
|
||||||
script:
|
script:
|
||||||
- docker push xinfinorg/xdposchain:$TRAVIS_TAG
|
- docker push xinfinorg/xdposchain:$TRAVIS_TAG
|
||||||
|
|
||||||
- stage: (Devnet) Build, and push images
|
- stage: (Devnet) Build, and push images
|
||||||
if: branch = dev-upgrade AND type = push AND tag IS blank
|
if: branch = dev-upgrade AND type = push AND tag IS blank
|
||||||
services:
|
services:
|
||||||
|
|
@ -131,7 +131,7 @@ jobs:
|
||||||
- terraform init $tf_init_cli_options
|
- terraform init $tf_init_cli_options
|
||||||
- terraform validate $tf_validation_cli_options
|
- terraform validate $tf_validation_cli_options
|
||||||
- terraform plan $tf_plan_cli_options
|
- terraform plan $tf_plan_cli_options
|
||||||
|
|
||||||
- stage: (Devnet) Terraform apply
|
- stage: (Devnet) Terraform apply
|
||||||
if: branch = dev-upgrade AND type = push AND tag IS blank
|
if: branch = dev-upgrade AND type = push AND tag IS blank
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
|
@ -150,19 +150,19 @@ jobs:
|
||||||
# Terraform init and then apply changes to environment
|
# Terraform init and then apply changes to environment
|
||||||
- terraform init $tf_init_cli_options
|
- terraform init $tf_init_cli_options
|
||||||
- terraform apply $tf_apply_cli_options
|
- terraform apply $tf_apply_cli_options
|
||||||
- sleep 20
|
- sleep 5
|
||||||
- |
|
- |
|
||||||
source .env
|
source .env
|
||||||
for ((i=$us_east_2_start;i<$us_east_2_end;i++)); do
|
for ((i=$us_east_2_start;i<$us_east_2_end;i++)); do
|
||||||
echo "Force deploy xdc-$i"
|
echo "Force deploy xdc-$i"
|
||||||
sleep 5 && aws ecs update-service --region us-east-2 --cluster devnet-xdcnode-cluster --service ecs-service-xdc$i --force-new-deployment;
|
aws ecs update-service --region us-east-2 --cluster devnet-xdcnode-cluster --service ecs-service-xdc$i --force-new-deployment --no-cli-pager;
|
||||||
done
|
done
|
||||||
for ((i=$eu_west_1_start;i<$eu_west_1_end;i++)); do
|
for ((i=$eu_west_1_start;i<$eu_west_1_end;i++)); do
|
||||||
echo "Force deploy xdc-$i"
|
echo "Force deploy xdc-$i"
|
||||||
sleep 5 && aws ecs update-service --region eu-west-1 --cluster devnet-xdcnode-cluster --service ecs-service-xdc$i --force-new-deployment;
|
aws ecs update-service --region eu-west-1 --cluster devnet-xdcnode-cluster --service ecs-service-xdc$i --force-new-deployment --no-cli-pager;
|
||||||
done
|
done
|
||||||
for ((i=$ap_southeast_2_start;i<$ap_southeast_2_end;i++)); do
|
for ((i=$ap_southeast_2_start;i<$ap_southeast_2_end;i++)); do
|
||||||
echo "Force deploy xdc-$i"
|
echo "Force deploy xdc-$i"
|
||||||
sleep 5 && aws ecs update-service --region ap-southeast-2 --cluster devnet-xdcnode-cluster --service ecs-service-xdc$i --force-new-deployment;
|
aws ecs update-service --region ap-southeast-2 --cluster devnet-xdcnode-cluster --service ecs-service-xdc$i --force-new-deployment --no-cli-pager;
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ XDC --ethstats ${netstats} --gcmode=full \
|
||||||
--datadir /work/xdcchain --networkid 551 \
|
--datadir /work/xdcchain --networkid 551 \
|
||||||
-port 30303 --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 \
|
-port 30303 --rpc --rpccorsdomain "*" --rpcaddr 0.0.0.0 \
|
||||||
--rpcport 8545 \
|
--rpcport 8545 \
|
||||||
--rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,XDPoS \
|
--rpcapi admin,db,eth,debug,net,shh,txpool,personal,web3,XDPoS \
|
||||||
--rpcvhosts "*" --unlock "${wallet}" --password /work/.pwd --mine \
|
--rpcvhosts "*" --unlock "${wallet}" --password /work/.pwd --mine \
|
||||||
--gasprice "1" --targetgaslimit "420000000" --verbosity ${log_level} \
|
--gasprice "1" --targetgaslimit "420000000" --verbosity ${log_level} \
|
||||||
--periodicprofile --debugdatadir /work/xdcchain \
|
--periodicprofile --debugdatadir /work/xdcchain \
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,9 @@ terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
aws = {
|
aws = {
|
||||||
source = "hashicorp/aws"
|
source = "hashicorp/aws"
|
||||||
version = "~> 4.16"
|
version = "~> 5.13.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
required_version = ">= 1.2.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Default
|
# Default
|
||||||
|
|
|
||||||
|
|
@ -2,18 +2,16 @@ terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
aws = {
|
aws = {
|
||||||
source = "hashicorp/aws"
|
source = "hashicorp/aws"
|
||||||
version = "~> 4.16"
|
version = "~> 5.13.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
required_version = ">= 1.2.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "aws_vpc" "devnet_vpc" {
|
resource "aws_vpc" "devnet_vpc" {
|
||||||
cidr_block = "10.0.0.0/16"
|
cidr_block = "10.0.0.0/16"
|
||||||
instance_tenancy = "default"
|
instance_tenancy = "default"
|
||||||
enable_dns_hostnames = true
|
enable_dns_hostnames = true
|
||||||
|
|
||||||
tags = {
|
tags = {
|
||||||
Name = "TfDevnetVpc"
|
Name = "TfDevnetVpc"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue