Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add node add-prepare and node add-execute commands #533

Conversation

Ivo-Yankov
Copy link
Contributor

@Ivo-Yankov Ivo-Yankov commented Sep 3, 2024

Description

  • Separates the flow of solo node add into 3 new commands that can be executed separately and one after the other: solo node add-prepare, solo node add-submit-transactions, solo node add-execute.
  • Removes the --node-id property and automatically sets it to the next number.
  • Adds an optional --admin-key property. If not present the genesis key will be used.

The behaviour of the new commands is as follows:

solo node add-prepare --gossip-keys true --tls-keys true --release-tag v0.53.2 --namespace solo-e2e --output-dir context [--admin-key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
---------
Initialize
Check that PVCs are enabled
Identify existing network nodes
    Check network pod: node1
    Determine new node account number
Generate Gossip key
    Backup old files
    Gossip key for node: node2
Generate gRPC TLS key
    Backup old files
    TLS key for node: node2
Load signing key certificate
Compute mTLS certificate hash
Prepare gossip endpoints
Prepare grpc service endpoints
Prepare upgrade zip file for node upgrade process
Check existing nodes staked amount
Save context data

Saves data from the ctx object to the specified directory by --output-dir

solo node add-submit-transactions --namespace solo-e2e --input-dir context
---------
Initialize
Load context data
Send node create transaction
Send prepare upgrade transaction
Send freeze upgrade transaction

Loads data into the ctx object from the specified directory by --input-dir

solo node add-execute --namespace solo-e2e --input-dir context [--local-build-path xxxxxxx]
---------
Initialize
Load context data
Identify existing network nodes
Download generated files from an existing node
Prepare staging directory
Copy node keys to secrets
Check network nodes are frozen
Get node logs and configs
Deploy new network node
Kill nodes to pick up updated configMaps
Check node pods are running
Fetch platform software into all network nodes
Download last state from an existing node
Upload last saved state to new network node
Setup new network node
Start network nodes
Check all nodes are ACTIVE
Check all node proxies are ACTIVE
Stake new node
Trigger stake weight calculate
Finalize

Loads data into the ctx object from the specified directory by --input-dir

Related Issues

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
@Ivo-Yankov Ivo-Yankov changed the title Аdd add-prepare and add-execute commands Аdd node add-prepare and node add-execute commands Sep 3, 2024
@Ivo-Yankov Ivo-Yankov self-assigned this Sep 3, 2024
@Ivo-Yankov Ivo-Yankov added Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. P0 An issue impacting production environments or impacting multiple releases or multiple individuals. labels Sep 3, 2024
Copy link
Contributor

github-actions bot commented Sep 3, 2024

E2E Relay Tests Coverage Report

1 files  ±0  1 suites  ±0   2m 42s ⏱️ +11s
6 tests ±0  6 ✅ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  7 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 3, 2024

E2E Mirror Node Tests Coverage Report

 1 files  ±0   1 suites  ±0   3m 31s ⏱️ -5s
13 tests ±0  13 ✅ ±0  0 💤 ±0  0 ❌ ±0 
14 runs  ±0  14 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
…be-leveraged-for-sdk-testing

# Conflicts:
#	src/commands/node.mjs
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Copy link
Contributor

github-actions bot commented Sep 5, 2024

Unit Test Results - Linux

  1 files  ±0   19 suites  ±0   26s ⏱️ -1s
122 tests ±0  122 ✅ ±0  0 💤 ±0  0 ❌ ±0 
148 runs  ±0  148 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

Unit Test Results - Windows

  1 files  ±0   19 suites  ±0   53s ⏱️ +4s
122 tests ±0  122 ✅ ±0  0 💤 ±0  0 ❌ ±0 
148 runs  ±0  148 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Node PEM Stop Tests Coverage Report

13 tests  ±0   13 ✅ ±0   2m 37s ⏱️ +6s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Node PFX Kill Tests Coverage Report

13 tests   13 ✅  3m 4s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit bde7ca3.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Tests Coverage Report

58 tests  ±0   58 ✅ ±0   3m 49s ⏱️ +10s
 9 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 7367c4c. ± Comparison against base commit 32dcf0c.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Node Local Build Tests Coverage Report

10 tests  ±0   10 ✅ ±0   2m 18s ⏱️ +4s
 2 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Node Update Tests Coverage Report

12 tests  ±0   12 ✅ ±0   4m 47s ⏱️ +6s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Node Delete Tests Coverage Report

10 tests  ±0   10 ✅ ±0   5m 51s ⏱️ -10s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

E2E Node Add Tests Coverage Report

22 tests  ±0   22 ✅ ±0   11m 35s ⏱️ -6s
 2 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
@Ivo-Yankov Ivo-Yankov changed the title Аdd node add-prepare and node add-execute commands feat: add node add-prepare and node add-execute commands Sep 10, 2024
…be-leveraged-for-sdk-testing

# Conflicts:
#	src/commands/node.mjs
Copy link
Contributor

github-actions bot commented Sep 10, 2024

E2E Node PEM Kill Tests Coverage Report

13 tests  ±0   13 ✅ ±0   2m 45s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
…be-leveraged-for-sdk-testing

# Conflicts:
#	README.md
#	src/commands/flags.mjs
#	src/commands/node.mjs
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
…be-leveraged-for-sdk-testing

# Conflicts:
#	src/core/k8.mjs
Copy link
Contributor

github-actions bot commented Sep 12, 2024

E2E Standard Tests Coverage Report

 1 files  ±0   9 suites  ±0   4m 6s ⏱️ +2s
58 tests ±0  58 ✅ ±0  0 💤 ±0  0 ❌ ±0 
59 runs  ±0  59 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 33424dd. ± Comparison against base commit e6c79eb.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Copy link
Contributor

github-actions bot commented Sep 13, 2024

E2E Node Add - Separate commands Tests Coverage Report

11 tests   11 ✅  5m 43s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 33424dd.

♻️ This comment has been updated with latest results.

Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Ivo-Yankov and others added 5 commits September 13, 2024 17:00
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Ivo Yankov <ivo@devlabs.bg>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
jeromy-cannon
jeromy-cannon previously approved these changes Sep 13, 2024
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
@jeromy-cannon jeromy-cannon merged commit a184775 into main Sep 13, 2024
39 of 42 checks passed
@jeromy-cannon jeromy-cannon deleted the 00522-reusable-components-of-subcommands-to-be-leveraged-for-sdk-testing branch September 13, 2024 16:26
swirlds-automation added a commit that referenced this pull request Sep 17, 2024
## [0.30.0](v0.29.0...v0.30.0) (2024-09-17)

### Features

* add node add-prepare and node add-execute commands ([#533](#533)) ([a184775](a184775))
* add support for attach jvm debugger ([#549](#549)) ([35a0075](35a0075))
* add the autogen tool to easily add e2e tests and run it for the first time & fix copyFrom ([#566](#566)) ([e6c79eb](e6c79eb))
* **network node livecheck:** implement a functionality to determine network node activeness with prometheus metrics ([#567](#567)) ([6120775](6120775))
* remove pfx support ([#537](#537)) ([aff5f63](aff5f63))

### Bug Fixes

* aligned test names to naming pattern ([#554](#554)) ([365f724](365f724))
* download application.properties file if it was generated by hedera app during handling address book change ([#571](#571)) ([35c73d8](35c73d8))
* **functionality:** removed the 'z' from the 'tar' command on the K8.copyFrom ([#561](#561)) ([796474b](796474b))
* have update readme run after version calculation in deploy and release ([#586](#586)) ([42e1685](42e1685))
* jsdoc errors due to unrecognized format ([#557](#557)) ([da7113b](da7113b))
* remove of using agreement key in hedera repo test ([#563](#563)) ([05c5517](05c5517))
* separate repeated steps as individual functions ([#562](#562)) ([dcbbe5e](dcbbe5e))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.30.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Enhancement Enhancing an existing feature driven by business requirements. Typically backwards compatible. P0 An issue impacting production environments or impacting multiple releases or multiple individuals. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reusable components of subcommands to be leveraged for SDK testing
3 participants