@@ -194,7 +194,7 @@ export class NodeCommand extends BaseCommand {
194
194
config . releasePrefix = Templates . prepareReleasePrefix ( config . releaseTag )
195
195
config . buildZipFile = `${ config . cacheDir } /${ config . releasePrefix } /build-${ config . releaseTag } .zip`
196
196
config . keysDir = path . join ( config . cacheDir , 'keys' )
197
- config . stagingDir = ` ${ config . cacheDir } / ${ config . releasePrefix } /staging/ ${ config . releaseTag } `
197
+ config . stagingDir = Templates . renderStagingDir ( self . configManager , flags )
198
198
config . stagingKeysDir = path . join ( config . stagingDir , 'keys' )
199
199
200
200
if ( config . keyFormat === constants . KEY_FORMAT_PFX && config . generateGossipKeys ) {
@@ -227,15 +227,6 @@ export class NodeCommand extends BaseCommand {
227
227
title : 'Identify network pods' ,
228
228
task : ( ctx , task ) => self . taskCheckNetworkNodePods ( ctx , task )
229
229
} ,
230
- {
231
- title : 'Fetch platform software' ,
232
- task : async ( ctx , _ ) => {
233
- const config = ctx . config
234
- if ( config . force || ! fs . existsSync ( config . buildZipFile ) ) {
235
- ctx . config . buildZipFile = await self . downloader . fetchPlatform ( ctx . config . releaseTag , config . cacheDir )
236
- }
237
- }
238
- } ,
239
230
{
240
231
title : 'Generate Gossip keys' ,
241
232
task : async ( ctx , _ ) => {
@@ -349,7 +340,7 @@ export class NodeCommand extends BaseCommand {
349
340
}
350
341
} ,
351
342
{
352
- title : 'Upload platform software into network nodes' ,
343
+ title : 'Fetch platform software into network nodes' ,
353
344
task :
354
345
async ( ctx , task ) => {
355
346
const config = ctx . config
@@ -360,7 +351,7 @@ export class NodeCommand extends BaseCommand {
360
351
subTasks . push ( {
361
352
title : `Node: ${ chalk . yellow ( nodeId ) } ` ,
362
353
task : ( ) =>
363
- self . plaformInstaller . copyPlatform ( podName , config . buildZipFile )
354
+ self . plaformInstaller . fetchPlatform ( podName , config . releaseTag )
364
355
} )
365
356
}
366
357
@@ -428,17 +419,21 @@ export class NodeCommand extends BaseCommand {
428
419
429
420
ctx . config = {
430
421
namespace : self . configManager . getFlag ( flags . namespace ) ,
431
- chartDir : this . configManager . getFlag ( flags . chartDirectory ) ,
432
- fstChartVersion : this . configManager . getFlag ( flags . fstChartVersion ) ,
422
+ chartDir : self . configManager . getFlag ( flags . chartDirectory ) ,
423
+ fstChartVersion : self . configManager . getFlag ( flags . fstChartVersion ) ,
433
424
nodeIds : helpers . parseNodeIDs ( self . configManager . getFlag ( flags . nodeIDs ) ) ,
434
- deployMirrorNode : this . configManager . getFlag ( flags . deployMirrorNode ) ,
435
- deployHederaExplorer : this . configManager . getFlag ( flags . deployHederaExplorer ) ,
436
- updateAccountKeys : self . configManager . getFlag ( flags . updateAccountKeys )
425
+ deployMirrorNode : self . configManager . getFlag ( flags . deployMirrorNode ) ,
426
+ deployHederaExplorer : self . configManager . getFlag ( flags . deployHederaExplorer ) ,
427
+ updateAccountKeys : self . configManager . getFlag ( flags . updateAccountKeys ) ,
428
+ applicationEnv : self . configManager . getFlag ( flags . applicationEnv ) ,
429
+ cacheDir : self . configManager . getFlag ( flags . cacheDir )
437
430
}
438
431
439
432
ctx . config . chartPath = await this . prepareChartPath ( ctx . config . chartDir ,
440
433
constants . FULLSTACK_TESTING_CHART , constants . FULLSTACK_DEPLOYMENT_CHART )
441
434
435
+ ctx . config . stagingDir = Templates . renderStagingDir ( self . configManager , flags )
436
+
442
437
ctx . config . valuesArg = ` --set hedera-mirror-node.enabled=${ ctx . config . deployMirrorNode } --set hedera-explorer.enabled=${ ctx . config . deployHederaExplorer } `
443
438
444
439
if ( ! await this . k8 . hasNamespace ( ctx . config . namespace ) ) {
@@ -460,6 +455,15 @@ export class NodeCommand extends BaseCommand {
460
455
title : `Start node: ${ chalk . yellow ( nodeId ) } ` ,
461
456
task : async ( ) => {
462
457
await self . k8 . execContainer ( podName , constants . ROOT_CONTAINER , [ 'rm' , '-rf' , `${ constants . HEDERA_HAPI_PATH } /data/logs` ] )
458
+
459
+ // copy application.env file if required
460
+ if ( ctx . config . applicationEnv ) {
461
+ const stagingDir = Templates . renderStagingDir ( self . configManager , flags )
462
+ const applicationEnvFile = path . join ( stagingDir , 'application.env' )
463
+ fs . cpSync ( ctx . config . applicationEnv , applicationEnvFile )
464
+ await self . k8 . copyTo ( podName , constants . ROOT_CONTAINER , applicationEnvFile , `${ constants . HEDERA_HAPI_PATH } ` )
465
+ }
466
+
463
467
await self . k8 . execContainer ( podName , constants . ROOT_CONTAINER , [ 'systemctl' , 'restart' , 'network-node' ] )
464
468
}
465
469
} )
@@ -818,7 +822,8 @@ export class NodeCommand extends BaseCommand {
818
822
builder : y => flags . setCommandFlags ( y ,
819
823
flags . namespace ,
820
824
flags . nodeIDs ,
821
- flags . updateAccountKeys
825
+ flags . updateAccountKeys ,
826
+ flags . applicationEnv
822
827
) ,
823
828
handler : argv => {
824
829
nodeCmd . logger . debug ( "==== Running 'node start' ===" )
0 commit comments