@@ -34,23 +34,28 @@ new SolanaSingleNodeStack(app, "solana-single-node", {
34
34
registrationTransactionFundingAccountSecretARN : config . baseNodeConfig . registrationTransactionFundingAccountSecretARN ,
35
35
} ) ;
36
36
37
- new SolanaHANodesStack ( app , "solana-ha-nodes" , {
38
- stackName : `solana-ha-nodes-${ config . baseNodeConfig . nodeConfiguration } ` ,
39
- env : { account : config . baseConfig . accountId , region : config . baseConfig . region } ,
40
-
41
- instanceType : config . baseNodeConfig . instanceType ,
42
- instanceCpuType : config . baseNodeConfig . instanceCpuType ,
43
- solanaCluster : config . baseNodeConfig . solanaCluster ,
44
- solanaVersion : config . baseNodeConfig . solanaVersion ,
45
- nodeConfiguration : config . baseNodeConfig . nodeConfiguration ,
46
- dataVolume : config . baseNodeConfig . dataVolume ,
47
- accountsVolume : config . baseNodeConfig . accountsVolume ,
37
+ if ( app . node . tryGetContext ( 'deployHA' ) === 'true' ) {
38
+ if ( config . baseNodeConfig . nodeConfiguration !== "consensus" ) {
39
+ new SolanaHANodesStack ( app , "solana-ha-nodes" , {
40
+ stackName : `solana-ha-nodes-${ config . baseNodeConfig . nodeConfiguration } ` ,
41
+ env : { account : config . baseConfig . accountId , region : config . baseConfig . region } ,
48
42
49
- albHealthCheckGracePeriodMin : config . haNodeConfig . albHealthCheckGracePeriodMin ,
50
- heartBeatDelayMin : config . haNodeConfig . heartBeatDelayMin ,
51
- numberOfNodes : config . haNodeConfig . numberOfNodes ,
52
- } ) ;
43
+ instanceType : config . baseNodeConfig . instanceType ,
44
+ instanceCpuType : config . baseNodeConfig . instanceCpuType ,
45
+ solanaCluster : config . baseNodeConfig . solanaCluster ,
46
+ solanaVersion : config . baseNodeConfig . solanaVersion ,
47
+ nodeConfiguration : config . baseNodeConfig . nodeConfiguration ,
48
+ dataVolume : config . baseNodeConfig . dataVolume ,
49
+ accountsVolume : config . baseNodeConfig . accountsVolume ,
53
50
51
+ albHealthCheckGracePeriodMin : config . haNodeConfig . albHealthCheckGracePeriodMin ,
52
+ heartBeatDelayMin : config . haNodeConfig . heartBeatDelayMin ,
53
+ numberOfNodes : config . haNodeConfig . numberOfNodes ,
54
+ } ) ;
55
+ } else {
56
+ throw new Error ( "Consensus node configuration is not yet supported for HA setup" ) ;
57
+ }
58
+ }
54
59
55
60
// Security Check
56
61
cdk . Aspects . of ( app ) . add (
0 commit comments