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(cli): allow user to set jvm options for Hedera nodes #84

Merged
merged 5 commits into from
Feb 28, 2024

Conversation

leninmehedy
Copy link
Member

@leninmehedy leninmehedy commented Feb 27, 2024

Description

This pull request changes the following:

  • fix: fetch platform code directly inside the container
    • This is because fetching the platform zip file locally and then uploading to the container is time consuming and brittle.
  • feat: allow user to set jvm options for Hedera nodes

When node starts, JVM options are loaded from /opt/hgcapp/services-Hedera/HapiApp2.0/application.env

Now user is able to set JVM options with flag --application-env flag.
node start --application-env application.env

Related Issues

@leninmehedy leninmehedy requested a review from a team as a code owner February 27, 2024 00:51
@leninmehedy leninmehedy requested a review from isavov February 27, 2024 00:51
@leninmehedy leninmehedy changed the title feat(cli): allow user to set jvm options for Hedera nodes feat(cli): allow user to set jvm options for Hedera nodes and let nodes download platform zip file Feb 27, 2024
@leninmehedy leninmehedy changed the title feat(cli): allow user to set jvm options for Hedera nodes and let nodes download platform zip file feat(cli): allow user to set jvm options for Hedera nodes and fetch platform code directly inside the container Feb 27, 2024
Copy link
Contributor

github-actions bot commented Feb 27, 2024

Unit Test Results

 1 files  ±0  13 suites  ±0   23s ⏱️ ±0s
83 tests ±0  83 ✅ ±0  0 💤 ±0  0 ❌ ±0 
90 runs  ±0  90 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d7a6f84. ± Comparison against base commit fd0ee4b.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
PackageInstaller extractPlatform should fail for missing buildZipFile path ‑ PackageInstaller extractPlatform should fail for missing buildZipFile path
PackageInstaller extractPlatform should fail for missing tag ‑ PackageInstaller extractPlatform should fail for missing tag

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Feb 27, 2024

E2E Test Results

  1 files  ±  0    6 suites  ±0   15m 26s ⏱️ + 2m 39s
734 tests ±  0  734 ✅ +  2  0 💤 ±0  0 ❌  - 2 
734 runs  +707  734 ✅ +709  0 💤 ±0  0 ❌  - 2 

Results for commit d7a6f84. ± Comparison against base commit fd0ee4b.

This pull request removes 700 and adds 700 tests. Note that renamed tests count towards both.
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 10 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 10 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 100 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 100 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 1000 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 1000 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 11 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 11 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 12 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 12 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 13 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 13 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 14 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 14 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 15 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 15 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 16 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 16 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 17 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] [beforeAll - ERROR]: only genesis account should have genesis key for all special accounts special account 17 should not have genesis key
…
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 10 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 10 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 100 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 100 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 1000 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 1000 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 11 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 11 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 12 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 12 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 13 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 13 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 14 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 14 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 15 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 15 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 16 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 16 should not have genesis key
NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 17 should not have genesis key ‑ NodeCommand node start should succeed [release v0.42.5, keyFormat: pfx] only genesis account should have genesis key for all special accounts special account 17 should not have genesis key
…

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 63.73%. Comparing base (2e19906) to head (d7a6f84).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #84   +/-   ##
=======================================
  Coverage   63.72%   63.73%           
=======================================
  Files          27       27           
  Lines        2553     2570   +17     
  Branches      419      422    +3     
=======================================
+ Hits         1627     1638   +11     
- Misses        926      932    +6     
Files Coverage Δ
src/commands/flags.mjs 94.00% <100.00%> (+0.12%) ⬆️
src/core/platform_installer.mjs 88.64% <100.00%> (+0.12%) ⬆️
src/core/templates.mjs 77.77% <75.00%> (-0.80%) ⬇️
src/commands/node.mjs 53.73% <50.00%> (-0.58%) ⬇️

Impacted file tree graph

@leninmehedy leninmehedy changed the title feat(cli): allow user to set jvm options for Hedera nodes and fetch platform code directly inside the container feat(cli): allow user to set jvm options for Hedera nodes Feb 27, 2024
@leninmehedy leninmehedy force-pushed the 00066-unable-to-run-solo-cluster-setup branch from e817281 to 038693e Compare February 27, 2024 08:37
@leninmehedy leninmehedy requested a review from a team as a code owner February 27, 2024 08:37
@leninmehedy leninmehedy force-pushed the 00066-unable-to-run-solo-cluster-setup branch 2 times, most recently from 7081196 to 3af16ad Compare February 27, 2024 08:42
@leninmehedy leninmehedy force-pushed the enable-jvm-options branch 3 times, most recently from 7f20984 to e663f90 Compare February 27, 2024 09:12
@leninmehedy leninmehedy force-pushed the 00066-unable-to-run-solo-cluster-setup branch from 3af16ad to 5e21f91 Compare February 27, 2024 09:16
@jeromy-cannon
Copy link
Contributor

@leninmehedy , just a thought, but if we created a persistent volume mount, we could just download one time and reduce the traffic

jeromy-cannon
jeromy-cannon previously approved these changes Feb 27, 2024
@leninmehedy
Copy link
Member Author

@leninmehedy , just a thought, but if we created a persistent volume mount, we could just download one time and reduce the traffic

Yes, hold on that thought. Please create a ticket to create persistent-volume and add your notes. PVC should be a high priority (maybe P1)

Base automatically changed from 00066-unable-to-run-solo-cluster-setup to main February 27, 2024 09:53
@jeromy-cannon jeromy-cannon dismissed their stale review February 27, 2024 09:53

The base branch was changed.

Signed-off-by: Lenin Mehedy <[email protected]>
This is because fetching the platform zip file locally and then uploading to the container is time consuming and brittle.

Signed-off-by: Lenin Mehedy <[email protected]>
@leninmehedy
Copy link
Member Author

leninmehedy commented Feb 28, 2024

Merging this as this is a working copy that enabled us to provision a 10K TPS network. Further enhancements will be done as separate PRs.

#111
#110

@leninmehedy leninmehedy merged commit 22ff35d into main Feb 28, 2024
16 checks passed
@leninmehedy leninmehedy deleted the enable-jvm-options branch February 28, 2024 20:20
swirlds-automation added a commit that referenced this pull request Mar 8, 2024
## [0.22.0](v0.21.2...v0.22.0) (2024-03-08)

### Features

* **cli:** allow user to set jvm options for Hedera nodes ([#84](#84)) ([22ff35d](22ff35d))
* download helm binary based on os and platform architecture ([#128](#128)) ([e64e9a2](e64e9a2))

### Bug Fixes

* do checksum check after downloading platform zip file ([#125](#125)) ([3d91617](3d91617))
* updated incorrect log messages ([#132](#132)) ([d890974](d890974))

### Performance Improvements

* enhance account key update logic to batch transactions instead of loading all with sleep ([#105](#105)) ([e4bd1ef](e4bd1ef))
@swirlds-automation
Copy link
Contributor

🎉 This PR is included in version 0.22.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Solo should allow overriding the JVM settings
4 participants