@@ -9,8 +9,6 @@ import { HANodesConstruct } from "../../constructs/ha-rpc-nodes-with-alb";
9
9
import * as constants from "../../constructs/constants" ;
10
10
import { XRPSingleNodeStackProps } from "./single-node-stack" ;
11
11
import { XRPNodeSecurityGroupConstruct } from "./constructs/xrp-node-security-group" ;
12
- import { SingleNodeCWDashboardJSON } from "./constructs/node-cw-dashboard" ;
13
- import * as cw from 'aws-cdk-lib/aws-cloudwatch' ;
14
12
15
13
export interface XRPHANodesStackProps extends XRPSingleNodeStackProps {
16
14
albHealthCheckGracePeriodMin : number ;
@@ -36,33 +34,25 @@ export class XRPHANodesStack extends cdk.Stack {
36
34
dataVolume : dataVolume ,
37
35
stackName,
38
36
hubNetworkID,
39
- // hubNetworkIP,
40
- // validatorListSites,
41
- // validatorListKeys,
42
- // onlineDelete,
43
- // advisoryDelete,
44
37
albHealthCheckGracePeriodMin,
45
38
heartBeatDelayMin,
46
- numberOfNodes,
39
+ numberOfNodes
47
40
} = props ;
48
41
49
42
// Using default VPC
50
43
const vpc = ec2 . Vpc . fromLookup ( this , "vpc" , { isDefault : true } ) ;
51
44
52
45
// Setting up the security group for the node from Solana-specific construct
53
46
const instanceSG = new XRPNodeSecurityGroupConstruct ( this , "security-group" , {
54
- vpc : vpc ,
47
+ vpc : vpc
55
48
} ) ;
56
49
57
50
// Making our scripts and configis from the local "assets" directory available for instance to download
58
51
const asset = new s3Assets . Asset ( this , "assets" , {
59
- path : path . join ( __dirname , "assets" ) ,
52
+ path : path . join ( __dirname , "assets" )
60
53
} ) ;
61
54
62
- // Getting the IAM role ARN from the common stack
63
- const importedInstanceRoleArn = cdk . Fn . importValue ( "SolanaNodeInstanceRoleArn" ) ;
64
-
65
- const instanceRole = props . instanceRole ; //iam.Role.fromRoleArn(this, "iam-role", importedInstanceRoleArn);
55
+ const instanceRole = props . instanceRole ;
66
56
67
57
// Making sure our instance will be able to read the assets
68
58
asset . bucket . grantRead ( instanceRole ) ;
@@ -90,7 +80,7 @@ export class XRPHANodesStack extends cdk.Stack {
90
80
. replace ( "_HUB_NETWORK_ID_" , hubNetworkID )
91
81
. replace ( "_LIFECYCLE_HOOK_NAME_" , lifecycleHookName )
92
82
. replace ( "_ASG_NAME_" , autoScalingGroupName ) ;
93
- } ,
83
+ }
94
84
} )
95
85
) ;
96
86
@@ -101,7 +91,7 @@ export class XRPHANodesStack extends cdk.Stack {
101
91
rootDataVolumeDeviceName : "/dev/xvda" ,
102
92
machineImage : new ec2 . AmazonLinuxImage ( {
103
93
generation : ec2 . AmazonLinuxGeneration . AMAZON_LINUX_2 ,
104
- cpuType : ec2 . AmazonLinuxCpuType . X86_64 ,
94
+ cpuType : ec2 . AmazonLinuxCpuType . X86_64
105
95
} ) ,
106
96
vpc,
107
97
role : instanceRole ,
@@ -113,16 +103,13 @@ export class XRPHANodesStack extends cdk.Stack {
113
103
heartBeatDelayMin,
114
104
lifecycleHookName : lifecycleHookName ,
115
105
autoScalingGroupName : autoScalingGroupName ,
116
- rpcPortForALB : 6005 ,
106
+ rpcPortForALB : 6005
117
107
} ) ;
118
108
119
-
120
-
121
-
122
109
123
110
// Making sure we output the URL of our Applicaiton Load Balancer
124
111
new cdk . CfnOutput ( this , "alb-url" , {
125
- value : nodeASG . loadBalancerDnsName ,
112
+ value : nodeASG . loadBalancerDnsName
126
113
} ) ;
127
114
128
115
// Adding suppressions to the stack
@@ -131,20 +118,20 @@ export class XRPHANodesStack extends cdk.Stack {
131
118
[
132
119
{
133
120
id : "AwsSolutions-AS3" ,
134
- reason : "No notifications needed" ,
121
+ reason : "No notifications needed"
135
122
} ,
136
123
{
137
124
id : "AwsSolutions-S1" ,
138
- reason : "No access log needed for ALB logs bucket" ,
125
+ reason : "No access log needed for ALB logs bucket"
139
126
} ,
140
127
{
141
128
id : "AwsSolutions-EC28" ,
142
- reason : "Using basic monitoring to save costs" ,
129
+ reason : "Using basic monitoring to save costs"
143
130
} ,
144
131
{
145
132
id : "AwsSolutions-IAM5" ,
146
- reason : "Need read access to the S3 bucket with assets" ,
147
- } ,
133
+ reason : "Need read access to the S3 bucket with assets"
134
+ }
148
135
] ,
149
136
true
150
137
) ;
0 commit comments