File tree Expand file tree Collapse file tree 3 files changed +19
-18
lines changed Expand file tree Collapse file tree 3 files changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,22 @@ export class HANodesConstruct extends cdkContructs.Construct {
75
75
}
76
76
77
77
if ( dataVolume . type !== constants . InstanceStoreageDeviceVolumeType ) {
78
- blockDevices . push (
79
- {
80
- deviceName : constants . VolumeDeviceNames [ arrayIndex ] ,
81
- volume : autoscaling . BlockDeviceVolume . ebs ( dataVolume . sizeGiB , {
82
- deleteOnTermination : true ,
83
- throughput : dataVolume . throughput ,
84
- encrypted : true ,
85
- iops : dataVolume . iops ,
86
- volumeType : autoscaling . EbsDeviceVolumeType [ dataVolume . type . toUpperCase ( ) as keyof typeof autoscaling . EbsDeviceVolumeType ] ,
87
- } ) ,
88
- }
89
- )
78
+ const volumeType = dataVolume . type . toUpperCase ( ) ;
79
+ const ebsConfig : any = {
80
+ deleteOnTermination : true ,
81
+ encrypted : true ,
82
+ iops : dataVolume . iops ,
83
+ volumeType : autoscaling . EbsDeviceVolumeType [ dataVolume . type . toUpperCase ( ) as keyof typeof autoscaling . EbsDeviceVolumeType ] ,
84
+ } ;
85
+
86
+ if ( volumeType == 'GP3' ) {
87
+ ebsConfig . throughput = dataVolume . throughput ;
88
+ }
89
+
90
+ blockDevices . push ( {
91
+ deviceName : constants . VolumeDeviceNames [ arrayIndex ] ,
92
+ volume : autoscaling . BlockDeviceVolume . ebs ( dataVolume . sizeGiB , ebsConfig )
93
+ } )
90
94
}
91
95
} ) ;
92
96
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ get_all_empty_nvme_disks () {
32
32
local unmounted_nvme_disks=()
33
33
local sorted_unmounted_nvme_disks
34
34
35
- all_not_mounted_nvme_disks=$( lsblk -lnb | awk ' {if ($7=="") {print $1}}' | grep nvme)
35
+ # The disk will only be mounted when the nvme disk is larger than 100GB to avoid storing blockchain node data directly on the root EBS disk (which is 46GB by default)
36
+ all_not_mounted_nvme_disks=$( lsblk -lnb | awk ' {if ($7 == "" && $4 > 100000000) {print $1}}' | grep nvme)
36
37
all_mounted_nvme_partitions=$( mount | awk ' {print $1}' | grep /dev/nvme)
37
38
for disk in ${all_not_mounted_nvme_disks[*]} ; do
38
39
if [[ ! " ${all_mounted_nvme_partitions[*]} " =~ $disk ]]; then
Original file line number Diff line number Diff line change @@ -33,20 +33,16 @@ apt-get -yqq install jq unzip python3-pip chrony
33
33
34
34
if [ " $ARCH " == " x86_64" ]; then
35
35
CW_AGENT_BINARY_URI=https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb
36
- AWS_CLI_BINARY_URI=https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
37
36
else
38
37
CW_AGENT_BINARY_URI=https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/arm64/latest/amazon-cloudwatch-agent.deb
39
- AWS_CLI_BINARY_URI=https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip
40
38
fi
41
39
42
40
cd /opt || exit 1
43
41
44
42
ARCH=$( uname -m)
45
43
46
44
echo " Intalling AWS CLI"
47
- curl " $AWS_CLI_BINARY_URI " -o " awscliv2.zip"
48
- unzip awscliv2.zip
49
- /opt/aws/install
45
+ snap install aws-cli --classic
50
46
51
47
echo " Downloading assets zip file"
52
48
aws s3 cp $ASSETS_S3_PATH ./assets.zip --region $AWS_REGION
You can’t perform that action at this time.
0 commit comments