Skip to content

Commit c81b3b4

Browse files
chore: remove unused keytool (#669)
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
1 parent b9ae362 commit c81b3b4

15 files changed

+17
-465
lines changed

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Then run the following command to set the kubectl context to the new cluster:
7676
```bash
7777
kind create cluster -n "${SOLO_CLUSTER_NAME}"
7878
```
79+
7980
Example output
8081

8182
```
@@ -96,7 +97,6 @@ Have a nice day! 👋
9697

9798
You may now view pods in your cluster using `k9s -A` as below:
9899

99-
100100
```
101101
Context: kind-solo <0> all <a> Attach <ctr… ____ __.________
102102
Cluster: kind-solo <ctrl-d> Delete <l> | |/ _/ __ \______
@@ -187,13 +187,16 @@ Kubernetes Namespace : solo
187187
✔ Generate gRPC TLS keys
188188
✔ Finalize
189189
```
190+
190191
PEM key files are generated in `~/.solo/keys` directory.
192+
191193
```
192194
hedera-node1.crt hedera-node3.crt s-private-node1.pem s-public-node1.pem unused-gossip-pem
193195
hedera-node1.key hedera-node3.key s-private-node2.pem s-public-node2.pem unused-tls
194196
hedera-node2.crt hedera-node4.crt s-private-node3.pem s-public-node3.pem
195197
hedera-node2.key hedera-node4.key s-private-node4.pem s-public-node4.pem
196198
```
199+
197200
* Setup cluster with shared components
198201

199202
```
@@ -486,6 +489,7 @@ To set customized `settings.txt` file, edit the file
486489
`~/.solo/cache/templates/settings.txt` after `solo init` command.
487490

488491
Then you can start customized built hedera network with the following command:
492+
489493
```
490494
solo node setup --local-build-path <default path to hedera repo>,node1=<custom build hedera repo>,node2=<custom build repo>
491495
@@ -495,12 +499,15 @@ solo node setup --local-build-path <default path to hedera repo>,node1=<custom b
495499
## For Developers Working on Platform core
496500

497501
To deploy node with local build PTT jar files, run the following command:
502+
498503
```
499504
solo node setup --local-build-path <default path to hedera repo>,node1=<custom build hedera repo>,node2=<custom build repo> --app PlatformTestingTool.jar --app-config <path-to-test-json1,path-to-test-json2>
500505
501506
# example: solo node setup --local-build-path ../hedera-services/platform-sdk/sdk/data,node1=../hedera-services/platform-sdk/sdk/data,node2=../hedera-services/platform-sdk/sdk/data --app PlatformTestingTool.jar --app-config ../hedera-services/platform-sdk/platform-apps/tests/PlatformTestingTool/src/main/resources/FCMFCQ-Basic-2.5k-5m.json
502507
```
508+
503509
## Logs
510+
504511
You can find log for running solo command under the directory `~/.solo/logs/`
505512
The file `solo.log` contains the logs for the solo command.
506513
The file `hashgraph-sdk.log` contains the logs from Solo client when sending transactions to network nodes.
@@ -510,6 +517,7 @@ The file `hashgraph-sdk.log` contains the logs from Solo client when sending tra
510517
NOTE: the hedera-services path referenced '../hedera-services/hedera-node/data' may need to be updated based on what directory you are currently in. This also assumes that you have done an assemble/build and the directory contents are up-to-date.
511518

512519
Example 1: attach jvm debugger to a hedera node
520+
513521
```bash
514522
./test/e2e/setup-e2e.sh
515523
solo node keys --gossip-keys --tls-keys

src/commands/node.mjs

+3-5
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import { downloadGeneratedFilesConfigBuilder, prepareUpgradeConfigBuilder } from
6363
export class NodeCommand extends BaseCommand {
6464
/**
6565
* @param {{logger: SoloLogger, helm: Helm, k8: K8, chartManager: ChartManager, configManager: ConfigManager,
66-
* depManager: DependencyManager, keytoolDepManager: KeytoolDependencyManager, downloader: PackageDownloader,
66+
* depManager: DependencyManager, downloader: PackageDownloader,
6767
* platformInstaller: PlatformInstaller, keyManager: KeyManager, accountManager: AccountManager,
6868
* profileManager: ProfileManager}} opts
6969
*/
@@ -74,14 +74,12 @@ export class NodeCommand extends BaseCommand {
7474
if (!opts || !opts.platformInstaller) throw new IllegalArgumentError('An instance of core/PlatformInstaller is required', opts.platformInstaller)
7575
if (!opts || !opts.keyManager) throw new IllegalArgumentError('An instance of core/KeyManager is required', opts.keyManager)
7676
if (!opts || !opts.accountManager) throw new IllegalArgumentError('An instance of core/AccountManager is required', opts.accountManager)
77-
if (!opts || !opts.keytoolDepManager) throw new IllegalArgumentError('An instance of KeytoolDependencyManager is required', opts.keytoolDepManager)
7877
if (!opts || !opts.profileManager) throw new IllegalArgumentError('An instance of ProfileManager is required', opts.profileManager)
7978

8079
this.downloader = opts.downloader
8180
this.platformInstaller = opts.platformInstaller
8281
this.keyManager = opts.keyManager
8382
this.accountManager = opts.accountManager
84-
this.keytoolDepManager = opts.keytoolDepManager
8583
this.profileManager = opts.profileManager
8684
this._portForwards = []
8785

@@ -1255,7 +1253,7 @@ export class NodeCommand extends BaseCommand {
12551253
title: 'Generate gossip keys',
12561254
task: (ctx, parentTask) => {
12571255
const config = ctx.config
1258-
const subTasks = self.keyManager.taskGenerateGossipKeys(self.keytoolDepManager, config.nodeAliases, config.keysDir, config.curDate)
1256+
const subTasks = self.keyManager.taskGenerateGossipKeys(config.nodeAliases, config.keysDir, config.curDate)
12591257
// set up the sub-tasks
12601258
return parentTask.newListr(subTasks, {
12611259
concurrent: false,
@@ -1651,7 +1649,7 @@ export class NodeCommand extends BaseCommand {
16511649
title: 'Generate Gossip key',
16521650
task: (ctx, parentTask) => {
16531651
const config = /** @type {NodeAddConfigClass} **/ ctx.config
1654-
const subTasks = self.keyManager.taskGenerateGossipKeys(self.keytoolDepManager, [config.nodeAlias], config.keysDir, config.curDate, config.allNodeAliases) // 666
1652+
const subTasks = self.keyManager.taskGenerateGossipKeys([config.nodeAlias], config.keysDir, config.curDate, config.allNodeAliases) // 666
16551653
// set up the sub-tasks
16561654
return parentTask.newListr(subTasks, {
16571655
concurrent: false,

src/core/constants.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export const SOLO_CACHE_DIR = path.join(SOLO_HOME_DIR, 'cache')
2828
export const SOLO_VALUES_DIR = path.join(SOLO_CACHE_DIR, 'values-files')
2929
export const DEFAULT_NAMESPACE = 'default'
3030
export const HELM = 'helm'
31-
export const KEYTOOL = 'keytool'
3231
export const SOLO_CONFIG_FILE = path.join(SOLO_HOME_DIR, 'solo.yaml')
3332
export const RESOURCES_DIR = normalize(path.join(CUR_FILE_DIR, '..', '..', 'resources'))
3433
export const TEMP_DIR = normalize(path.join(CUR_FILE_DIR, '..', '..', 'temp'))

src/core/dependency_managers/index.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@
1616
*/
1717
import { DependencyManager } from './dependency_manager.mjs'
1818
import { HelmDependencyManager } from './helm_dependency_manager.mjs'
19-
import { KeytoolDependencyManager } from './keytool_dependency_manager.mjs'
2019

21-
export { HelmDependencyManager, KeytoolDependencyManager, DependencyManager }
20+
export { HelmDependencyManager, DependencyManager }

src/core/dependency_managers/keytool_dependency_manager.mjs

-207
This file was deleted.

src/core/index.mjs

-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { Templates } from './templates.mjs'
2525
import { ChartManager } from './chart_manager.mjs'
2626
import { ConfigManager } from './config_manager.mjs'
2727
import { KeyManager } from './key_manager.mjs'
28-
import { Keytool } from './keytool.mjs'
2928
import { ProfileManager } from './profile_manager.mjs'
3029
import { YargsCommand } from './yargs_command.mjs'
3130
import { Task } from './task.mjs'
@@ -45,7 +44,6 @@ export {
4544
ChartManager,
4645
ConfigManager,
4746
KeyManager,
48-
Keytool,
4947
ProfileManager,
5048
YargsCommand,
5149
Task

src/core/key_manager.mjs

+1-2
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,14 @@ export class KeyManager {
521521
*
522522
* WARNING: These tasks MUST run in sequence.
523523
*
524-
* @param {KeytoolDependencyManager} keytoolDepManager - an instance of core/KeytoolDepManager
525524
* @param {NodeAliases} nodeAliases
526525
* @param {string} keysDir - keys directory
527526
* @param {Date} curDate - current date
528527
* @param {NodeAliases|null} [allNodeAliases] - includes the nodeAliases to get new keys as well as existing nodeAliases that will be included in the public.pfx file
529528
* @return {Object[]} a list of subtasks
530529
* @public
531530
*/
532-
taskGenerateGossipKeys (keytoolDepManager, nodeAliases, keysDir, curDate = new Date(), allNodeAliases = null) {
531+
taskGenerateGossipKeys (nodeAliases, keysDir, curDate = new Date(), allNodeAliases = null) {
533532
allNodeAliases = allNodeAliases || nodeAliases
534533
if (!Array.isArray(nodeAliases) || !nodeAliases.every((nodeAlias) => typeof nodeAlias === 'string')) {
535534
throw new IllegalArgumentError('nodeAliases must be an array of strings, nodeAliases = ' + JSON.stringify(nodeAliases))

0 commit comments

Comments
 (0)