Skip to content

Commit 0318b1d

Browse files
committed
Merge remote-tracking branch 'origin/main' into 01178-save-reusable-solo-flags-in-remoteconfig
# Conflicts: # src/core/config/remote/listr_config_tasks.ts # src/core/config/remote/remote_config_manager.ts
2 parents 43d615e + 4ab4dd5 commit 0318b1d

File tree

14 files changed

+80
-154
lines changed

14 files changed

+80
-154
lines changed

docs/content/User/StepByStepGuide.md

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
## Advanced User Guide
2-
32
For those who would like to have more control or need some customized setups, here are some step by step instructions of how to setup and deploy a solo network.
4-
53
### Setup Kubernetes cluster
64

75
#### Remote cluster
@@ -30,7 +28,6 @@ Then run the following command to set the kubectl context to the new cluster:
3028
```bash
3129
kind create cluster -n "${SOLO_CLUSTER_NAME}"
3230
```
33-
3431
Example output
3532

3633
```
@@ -46,11 +43,12 @@ You can now use your cluster with:
4643
4744
kubectl cluster-info --context kind-solo
4845
49-
Thanks for using kind! 😊
46+
Have a nice day! 👋
5047
```
5148

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

51+
5452
```
5553
Context: kind-solo <0> all <a> Attach <ctr… ____ __.________
5654
Cluster: kind-solo <ctrl-d> Delete <l> | |/ _/ __ \______
@@ -77,6 +75,7 @@ You may now view pods in your cluster using `k9s -A` as below:
7775
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
7876
```
7977

78+
8079
### Step by Step Instructions
8180

8281
* Initialize `solo` directories:
@@ -93,7 +92,7 @@ solo init
9392
```
9493
9594
******************************* Solo *********************************************
96-
Version : 0.33.0
95+
Version : 0.34.0
9796
Kubernetes Context : kind-solo
9897
Kubernetes Cluster : kind-solo
9998
**********************************************************************************
@@ -120,7 +119,7 @@ solo node keys --gossip-keys --tls-keys -i node1,node2,node3
120119
```
121120
122121
******************************* Solo *********************************************
123-
Version : 0.33.0
122+
Version : 0.34.0
124123
Kubernetes Context : kind-solo
125124
Kubernetes Cluster : kind-solo
126125
**********************************************************************************
@@ -131,22 +130,19 @@ Kubernetes Cluster : kind-solo
131130
✔ Gossip key for node: node3
132131
✔ Generate gossip keys
133132
✔ Backup old files
134-
✔ TLS key for node: node3
135133
✔ TLS key for node: node2
136134
✔ TLS key for node: node1
135+
✔ TLS key for node: node3
137136
✔ Generate gRPC TLS Keys
138137
✔ Finalize
139138
```
140-
141139
PEM key files are generated in `~/.solo/keys` directory.
142-
143140
```
144141
hedera-node1.crt hedera-node3.crt s-private-node1.pem s-public-node1.pem unused-gossip-pem
145142
hedera-node1.key hedera-node3.key s-private-node2.pem s-public-node2.pem unused-tls
146143
hedera-node2.crt hedera-node4.crt s-private-node3.pem s-public-node3.pem
147144
hedera-node2.key hedera-node4.key s-private-node4.pem s-public-node4.pem
148145
```
149-
150146
* Setup cluster with shared components
151147

152148
```
@@ -158,10 +154,11 @@ solo cluster setup -s "${SOLO_CLUSTER_SETUP_NAMESPACE}"
158154
```
159155
160156
******************************* Solo *********************************************
161-
Version : 0.33.0
157+
Version : 0.34.0
162158
Kubernetes Context : kind-solo
163159
Kubernetes Cluster : kind-solo
164160
**********************************************************************************
161+
Current deployment name is not set in local config
165162
✔ Initialize
166163
✔ Prepare chart values
167164
✔ Install 'solo-cluster-setup' chart
@@ -184,36 +181,36 @@ solo network deploy -i node1,node2,node3 -n "${SOLO_NAMESPACE}"
184181
```
185182
186183
******************************* Solo *********************************************
187-
Version : 0.33.0
184+
Version : 0.34.0
188185
Kubernetes Context : kind-solo
189186
Kubernetes Cluster : kind-solo
190187
Kubernetes Namespace : solo
191188
**********************************************************************************
189+
remote config not found
192190
✔ Acquire lease - lease acquired successfully, attempt: 1/10
193191
✔ Initialize
194-
✔ Load remote config - remote config not found
195192
✔ Check if cluster setup chart is installed
196193
✔ Copy Gossip keys to staging
197194
✔ Copy gRPC TLS keys to staging
198195
✔ Prepare staging directory
199196
✔ Copy Gossip keys
200-
✔ Node: node2
201-
✔ Copy TLS keys
202-
✔ Copy Gossip keys
203197
✔ Node: node3
204198
✔ Copy Gossip keys
205199
✔ Node: node1
200+
✔ Copy TLS keys
201+
✔ Copy Gossip keys
202+
✔ Node: node2
206203
✔ Copy node keys to secrets
207204
✔ Install chart 'solo-deployment'
208205
✔ Check Node: node1
209206
✔ Check Node: node2
210207
✔ Check Node: node3
211208
✔ Check node pods are running
209+
✔ Check Envoy Proxy for: node3
212210
✔ Check Envoy Proxy for: node1
211+
✔ Check HAProxy for: node2
213212
✔ Check Envoy Proxy for: node2
214213
✔ Check HAProxy for: node1
215-
✔ Check Envoy Proxy for: node3
216-
✔ Check HAProxy for: node2
217214
✔ Check HAProxy for: node3
218215
✔ Check proxy pods are running
219216
✔ Check MinIO
@@ -232,31 +229,31 @@ solo node setup -i node1,node2,node3 -n "${SOLO_NAMESPACE}"
232229
```
233230
234231
******************************* Solo *********************************************
235-
Version : 0.33.0
232+
Version : 0.34.0
236233
Kubernetes Context : kind-solo
237234
Kubernetes Cluster : kind-solo
238235
Kubernetes Namespace : solo
239236
**********************************************************************************
237+
remote config not found
240238
✔ Acquire lease - lease acquired successfully, attempt: 1/10
241239
✔ Initialize
242-
✔ Load remote config - remote config not found
243-
✔ Check network pod: node1
244240
✔ Check network pod: node2
241+
✔ Check network pod: node1
245242
✔ Check network pod: node3
246243
✔ Identify network pods
247-
✔ Update node: node2 [ platformVersion = v0.58.3 ]
248-
✔ Update node: node3 [ platformVersion = v0.58.3 ]
249-
✔ Update node: node1 [ platformVersion = v0.58.3 ]
244+
✔ Update node: node2 [ platformVersion = v0.59.0-main.x5322bdc ]
245+
✔ Update node: node3 [ platformVersion = v0.59.0-main.x5322bdc ]
246+
✔ Update node: node1 [ platformVersion = v0.59.0-main.x5322bdc ]
250247
✔ Fetch platform software into network nodes
251248
✔ Copy configuration files
252249
✔ Copy configuration files
253250
✔ Copy configuration files
254251
✔ Set file permissions
252+
✔ Node: node2
253+
✔ Set file permissions
255254
✔ Node: node1
256255
✔ Set file permissions
257256
✔ Node: node3
258-
✔ Set file permissions
259-
✔ Node: node2
260257
✔ Setup network nodes
261258
```
262259

@@ -271,25 +268,25 @@ solo node start -i node1,node2,node3 -n "${SOLO_NAMESPACE}"
271268
```
272269
273270
******************************* Solo *********************************************
274-
Version : 0.33.0
271+
Version : 0.34.0
275272
Kubernetes Context : kind-solo
276273
Kubernetes Cluster : kind-solo
277274
Kubernetes Namespace : solo
278275
**********************************************************************************
276+
remote config not found
279277
✔ Acquire lease - lease acquired successfully, attempt: 1/10
280278
✔ Initialize
281-
✔ Load remote config - remote config not found
282-
✔ Check network pod: node3
283279
✔ Check network pod: node1
284280
✔ Check network pod: node2
281+
✔ Check network pod: node3
285282
✔ Identify existing network nodes
286-
✔ Start node: node1
287283
✔ Start node: node3
288284
✔ Start node: node2
285+
✔ Start node: node1
289286
✔ Starting nodes
290-
✔ Check network pod: node2 - status ACTIVE, attempt: 18/120
291-
✔ Check network pod: node1 - status ACTIVE, attempt: 18/120
292-
✔ Check network pod: node3 - status ACTIVE, attempt: 18/120
287+
✔ Check network pod: node1 - status ACTIVE, attempt: 19/120
288+
✔ Check network pod: node2 - status ACTIVE, attempt: 19/120
289+
✔ Check network pod: node3 - status ACTIVE, attempt: 19/120
293290
✔ Check all nodes are ACTIVE
294291
✔ Check proxy for node: node1
295292
✔ Check proxy for node: node2
@@ -312,19 +309,17 @@ solo mirror-node deploy -n "${SOLO_NAMESPACE}"
312309
```
313310
314311
******************************* Solo *********************************************
315-
Version : 0.33.0
312+
Version : 0.34.0
316313
Kubernetes Context : kind-solo
317314
Kubernetes Cluster : kind-solo
318315
Kubernetes Namespace : solo
319316
**********************************************************************************
317+
remote config not found
320318
✔ Acquire lease - lease acquired successfully, attempt: 1/10
321319
✔ Initialize
322-
✔ Load remote config - remote config not found
323320
✔ Prepare address book
324321
✔ Deploy mirror-node
325-
✔ Deploy hedera-explorer
326322
✔ Enable mirror-node
327-
✔ Check Hedera Explorer
328323
✔ Check Postgres DB
329324
✔ Check REST API
330325
✔ Check GRPC
@@ -346,14 +341,14 @@ solo relay deploy -i node1 -n "${SOLO_NAMESPACE}"
346341
```
347342
348343
******************************* Solo *********************************************
349-
Version : 0.33.0
344+
Version : 0.34.0
350345
Kubernetes Context : kind-solo
351346
Kubernetes Cluster : kind-solo
352347
Kubernetes Namespace : solo
353348
**********************************************************************************
349+
remote config not found
354350
✔ Acquire lease - lease acquired successfully, attempt: 1/10
355351
✔ Initialize
356-
✔ Load remote config - remote config not found
357352
✔ Prepare chart values
358353
✔ Deploy JSON RPC Relay
359354
✔ Check relay is ready

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hashgraph/solo",
3-
"version": "0.33.0",
3+
"version": "0.34.0",
44
"description": "An opinionated CLI tool to deploy and manage private Hedera Networks.",
55
"main": "./dist/src/index.js",
66
"type": "module",
@@ -91,14 +91,14 @@
9191
"@types/ip": "^1.1.3",
9292
"@types/mocha": "^10.0.10",
9393
"@types/mocha-each": "^2.0.4",
94-
"@types/node": "^22.10.9",
94+
"@types/node": "^22.10.10",
9595
"@types/semver": "^7.5.8",
9696
"@types/sinon": "^17.0.3",
9797
"@types/sinon-chai": "^4.0.0",
9898
"@types/stream-buffers": "^3.0.7",
9999
"@types/tar": "^6.1.13",
100100
"@types/uuid": "^10.0.0",
101-
"@types/ws": "^8.5.13",
101+
"@types/ws": "^8.5.14",
102102
"@types/yargs": "^17.0.33",
103103
"@typescript-eslint/utils": "^8.21.0",
104104
"c8": "^10.1.3",

src/commands/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export abstract class BaseCommand extends ShellRunner {
4747
protected readonly depManager: DependencyManager;
4848
protected readonly leaseManager: LeaseManager;
4949
protected readonly _configMaps = new Map<string, any>();
50-
protected readonly localConfig: LocalConfig;
50+
public readonly localConfig: LocalConfig;
5151
protected readonly remoteConfigManager: RemoteConfigManager;
5252

5353
constructor(opts: Opts) {

src/commands/cluster/tasks.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,12 @@ export class ClusterCommandTasks {
282282
// If one or more contexts are provided, use the first one
283283
if (contexts.length) {
284284
selectedContext = contexts[0];
285+
286+
if (clusters.length) {
287+
selectedCluster = clusters[0];
288+
} else if (localConfig.deployments[deploymentName]) {
289+
selectedCluster = localConfig.deployments[deploymentName].clusters[0];
290+
}
285291
}
286292

287293
// If one or more clusters are provided, use the first one to determine the context
@@ -335,7 +341,7 @@ export class ClusterCommandTasks {
335341

336342
const connectionValid = await this.parent.getK8().testClusterConnection(selectedContext, selectedCluster);
337343
if (!connectionValid) {
338-
throw new SoloError(ErrorMessages.INVALID_CONTEXT_FOR_CLUSTER(selectedContext));
344+
throw new SoloError(ErrorMessages.INVALID_CONTEXT_FOR_CLUSTER(selectedContext, selectedCluster));
339345
}
340346
this.parent.getK8().setCurrentContext(selectedContext);
341347
this.parent.getConfigManager().setFlag(flags.context, selectedContext);

0 commit comments

Comments
 (0)