From 99147223eff7a49b42dcc0f00c018437ed0eb4fc Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Mon, 1 Mar 2021 10:17:30 -0500 Subject: [PATCH] more space and power. may need iops too? --- ec2-instance-props.json | 4 ++-- ec2-userdata | 4 ++++ snapshot.sh | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ec2-instance-props.json b/ec2-instance-props.json index 26e6399..98dc891 100644 --- a/ec2-instance-props.json +++ b/ec2-instance-props.json @@ -1,7 +1,7 @@ { - "BlockDeviceMappings": [{"DeviceName": "/dev/sda1", "Ebs": {"DeleteOnTermination": true, "VolumeSize": 50, "VolumeType": "gp2"}}], + "BlockDeviceMappings": [{"DeviceName": "/dev/sda1", "Ebs": {"DeleteOnTermination": true, "VolumeSize": 250, "VolumeType": "gp2"}}], "ImageId": "ami-0d5d9d301c853a04a", - "InstanceType": "t3.large", + "InstanceType": "m5d.large", "KeyName": "master-key-20181218", "SecurityGroupIds": ["sg-d64cafbe"], "SubnetId": "subnet-eef8ee96", diff --git a/ec2-userdata b/ec2-userdata index 2836863..0d2ed88 100644 --- a/ec2-userdata +++ b/ec2-userdata @@ -14,6 +14,10 @@ sudo systemctl enable docker && sudo systemctl start docker && \ sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \ sudo chmod +x /usr/local/bin/docker-compose +sudo groupadd docker +sudo usermod -aG docker ubuntu +newgrp docker + wget -O /home/ubuntu/snapshot.sh "https://raw.githubusercontent.com/lbryio/snapshots/master/snapshot.sh" wget -O /home/ubuntu/docker-compose.yml "https://raw.githubusercontent.com/lbryio/lbry-sdk/master/docker/docker-compose-wallet-server.yml" diff --git a/snapshot.sh b/snapshot.sh index a1b8c99..3855081 100644 --- a/snapshot.sh +++ b/snapshot.sh @@ -25,7 +25,7 @@ while true; do HEADERS=$(echo "$info" | grep headers | egrep -o '[0-9]+') BLOCKS=$(echo "$info" | grep blocks | egrep -o '[0-9]+') - echo "$HEIGHT $HEADERS $BLOCKS $WALLET_BLOCKS" + echo "explorer height $HEIGHT, headers height $HEADERS, lbrycrd $BLOCKS, wallet $WALLET_BLOCKS" if [[ "$HEADERS" -ge "$HEIGHT" && "$BLOCKS" -ge "$HEADERS" && "$WALLET_BLOCKS" -ge "$BLOCKS" ]]; then break; else sleep 1; fi done echo "final: $HEIGHT $HEADERS $BLOCKS $WALLET_BLOCKS"