Skip to content

Commit 20ad543

Browse files
committed
first pass
1 parent d24d92d commit 20ad543

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

lib/fantom/ha-node-deploy.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"fantom-ha-nodes-read-mainnet": {
3+
"alburl": "internal-fantom-rpcno-MlhmELLUiozb-1571569363.us-east-1.elb.amazonaws.com"
4+
}
5+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
set -e
3+
echo "Script is starting..."
4+
ulimit -n 500000
5+
6+
# Get local IP
7+
TOKEN=$(curl -s -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
8+
export EC2_INTERNAL_IP=$(curl -H "X-aws-ec2-metadata-token: $TOKEN" -s "http://169.254.169.254/latest/meta-data/local-ipv4")
9+
10+
# Start read node
11+
/home/bcuser/go-opera/build/opera --genesis /data/genesis.g \
12+
--datadir /data \
13+
--maxpeers 110 \
14+
--cache 24000 \
15+
--nousb \
16+
--db.preset ldb-1 \
17+
--syncmode snap \
18+
--http --http.port=18545 --http.corsdomain="*" \
19+
--http.addr="${EC2_INTERNAL_IP}" \
20+
--http.api=eth,web3,net,txpool,ftm
21+
22+
echo "Script is still running..."
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#############################################################
2+
# Example configuration for FANTOM nodes runner app on AWS #
3+
#############################################################
4+
5+
## Set the AWS account is and region for your environment ##
6+
AWS_ACCOUNT_ID="xxxxxxxxxxx"
7+
AWS_REGION="ap-southeast-2"
8+
9+
## Optional FANTOM snapshots download link # IMPORTANT !!! Make sure the url is valid before you use it!
10+
#FANTOM_SNAPSHOTS_URI=https://snapshot.fantom.network/files/snapsync/ # Optional param. We extract the actual URL from https://raw.githubusercontent.com/48Club/fantom-snapshots/main/data.json if nothing is specified. Otherwise, check the latest vesion for Full node here: https://github.com/48Club/fantom-snapshots
11+
12+
## Common configuration parameters ##
13+
FANTOM_NETWORK="mainnet" # All options: "mainnet", "testnet"
14+
FANTOM_NODE_CONFIGURATION="read" # All options: "read", "api", "validator"
15+
16+
## Instance Nodes
17+
FANTOM_INSTANCE_TYPE="m6a.2xlarge"
18+
FANTOM_CPU_TYPE="x86_64" # All options: "x86_64", "ARM_64". IMPORTANT: Make sure the CPU type matches the instance type used
19+
20+
# Data volume configuration
21+
FANTOM_DATA_VOL_TYPE="gp3" # Other options: "io1" | "io2" | "gp3" | "instance-store" . IMPORTANT: Use "instance-store" option only with instance types that support that feature, like popular for node im4gn, d3, i3en, and i4i instance families
22+
FANTOM_DATA_VOL_SIZE="2000" # Current required data size to keep both snapshot archive and unarchived version of it
23+
FANTOM_DATA_VOL_IOPS="7000" # Max IOPS for EBS volumes (not applicable for "instance-store")
24+
FANTOM_DATA_VOL_THROUGHPUT="400" # Max throughput for EBS gp3 volumes (not applicable for "io1" | "io2" | "instance-store")
25+
26+
## HA nodes configuration ##
27+
FANTOM_HA_NUMBER_OF_NODES="2" # Total number of RPC nodes to be provisioned. Default: 2
28+
FANTOM_HA_ALB_HEALTHCHECK_GRACE_PERIOD_MIN="300" # Time enough to initialize the instance
29+
FANTOM_HA_NODES_HEARTBEAT_DELAY_MIN="120" # Time sufficient enough for a node do sync

0 commit comments

Comments
 (0)