@@ -1623,6 +1623,58 @@ export class NodeCommand extends BaseCommand {
1623
1623
await this . freezeUpgradeNetworkNodes ( config . freezeAdminPrivateKey , ctx . upgradeZipHash , config . nodeClient )
1624
1624
}
1625
1625
} ,
1626
+ {
1627
+ title : 'Prepare staging directory' ,
1628
+ task : async ( ctx , parentTask ) => {
1629
+ const subTasks = [
1630
+ {
1631
+ title : 'Copy Gossip keys to staging' ,
1632
+ task : async ( ctx , _ ) => {
1633
+ const config = /** @type {NodeAddConfigClass } **/ ctx . config
1634
+
1635
+ await this . keyManager . copyGossipKeysToStaging ( config . keyFormat , config . keysDir , config . stagingKeysDir , config . allNodeIds )
1636
+ }
1637
+ } ,
1638
+ {
1639
+ title : 'Copy gRPC TLS keys to staging' ,
1640
+ task : async ( ctx , _ ) => {
1641
+ const config = /** @type {NodeAddConfigClass } **/ ctx . config
1642
+ for ( const nodeId of config . allNodeIds ) {
1643
+ const tlsKeyFiles = self . keyManager . prepareTLSKeyFilePaths ( nodeId , config . keysDir )
1644
+ await self . keyManager . copyNodeKeysToStaging ( tlsKeyFiles , config . stagingKeysDir )
1645
+ }
1646
+ }
1647
+ }
1648
+ ]
1649
+
1650
+ return parentTask . newListr ( subTasks , {
1651
+ concurrent : false ,
1652
+ rendererOptions : constants . LISTR_DEFAULT_RENDERER_OPTION
1653
+ } )
1654
+ }
1655
+ } ,
1656
+ {
1657
+ title : 'Copy node keys to secrets' ,
1658
+ task : async ( ctx , parentTask ) => {
1659
+ const config = /** @type {NodeAddConfigClass } **/ ctx . config
1660
+
1661
+ const subTasks = [ ]
1662
+ for ( const nodeId of config . allNodeIds ) {
1663
+ const podName = config . podNames [ nodeId ]
1664
+ subTasks . push ( {
1665
+ title : `Node: ${ chalk . yellow ( nodeId ) } ` ,
1666
+ task : ( ) =>
1667
+ self . platformInstaller . copyNodeKeys ( podName , config . stagingDir , config . allNodeIds , config . keyFormat )
1668
+ } )
1669
+ }
1670
+
1671
+ // set up the sub-tasks
1672
+ return parentTask . newListr ( subTasks , {
1673
+ concurrent : true ,
1674
+ rendererOptions : constants . LISTR_DEFAULT_RENDERER_OPTION
1675
+ } )
1676
+ }
1677
+ } ,
1626
1678
{
1627
1679
title : 'Check network nodes are frozen' ,
1628
1680
task : ( ctx , task ) => {
@@ -1669,7 +1721,6 @@ export class NodeCommand extends BaseCommand {
1669
1721
valuesArg += this . prepareValuesFiles ( this . profileValuesFile )
1670
1722
}
1671
1723
1672
- // TODO: update the secrets with the new/updated key(s), platform installer: copyGossipKeys & copyTLSKeys
1673
1724
await self . chartManager . upgrade (
1674
1725
config . namespace ,
1675
1726
constants . FULLSTACK_DEPLOYMENT_CHART ,
@@ -1718,36 +1769,6 @@ export class NodeCommand extends BaseCommand {
1718
1769
} )
1719
1770
}
1720
1771
} ,
1721
- {
1722
- title : 'Prepare staging directory' ,
1723
- task : async ( ctx , parentTask ) => {
1724
- const subTasks = [
1725
- {
1726
- title : 'Copy Gossip keys to staging' ,
1727
- task : async ( ctx , _ ) => {
1728
- const config = /** @type {NodeAddConfigClass } **/ ctx . config
1729
-
1730
- await this . keyManager . copyGossipKeysToStaging ( config . keyFormat , config . keysDir , config . stagingKeysDir , config . allNodeIds )
1731
- }
1732
- } ,
1733
- {
1734
- title : 'Copy gRPC TLS keys to staging' ,
1735
- task : async ( ctx , _ ) => {
1736
- const config = /** @type {NodeAddConfigClass } **/ ctx . config
1737
- for ( const nodeId of config . allNodeIds ) {
1738
- const tlsKeyFiles = self . keyManager . prepareTLSKeyFilePaths ( nodeId , config . keysDir )
1739
- await self . keyManager . copyNodeKeysToStaging ( tlsKeyFiles , config . stagingKeysDir )
1740
- }
1741
- }
1742
- }
1743
- ]
1744
-
1745
- return parentTask . newListr ( subTasks , {
1746
- concurrent : false ,
1747
- rendererOptions : constants . LISTR_DEFAULT_RENDERER_OPTION
1748
- } )
1749
- }
1750
- } ,
1751
1772
{
1752
1773
title : 'Fetch platform software into all network nodes' ,
1753
1774
task :
0 commit comments