-
Notifications
You must be signed in to change notification settings - Fork 123
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
Update initial draft for upgrade with Linux and Kubernetes #1725
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Joan E <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@siladu Could you provide some guidance on what might need to be included for this? |
# Upgrade your Besu node | ||
|
||
When upgrading your Besu node, we recommend: | ||
|
||
- Using an orchestration method (for example, Ansible or Chef) to keep all nodes in sync with your desired configuration. | ||
- Preserving your node's data and configuration | ||
<!--- - Using an orchestration method to keep all nodes in sync with your desired configuration. ---> | ||
- Storing your configuration under version control. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove full stop here as well (or add to other bullet?)
2. Back up your data directory and configuration: | ||
|
||
```bash | ||
sudo cp -r /var/lib/besu/data /var/lib/besu/data.backup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For mainnet, the data directory is huge and most stakers wouldn't be able to back it up without running out of space and potentially breaking their node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link in my issue was broken, it should have been https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-ii-maintenance/updating-execution-client#besu
sudo cp /etc/besu/config.toml /etc/besu/config.toml.backup | ||
``` | ||
|
||
3. Download and install the new version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coincashew script that uses https://api.github.com/repos/hyperledger/besu/releases/latest is good.
Think we should credit them if we copy it though.
1. Check node status: | ||
|
||
```bash | ||
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to have a verification step 👍
Think it's good to check your node is up, back in sync and has peers.
This will also give you the actual version:
curl -X POST --data '{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://127.0.0.1:8545
Not everyone will have RPC enabled so this would break for those cases so think we should have some alternative ways to check too.
We have logs and metrics that output the version, e.g. the startup logs look something like this and should always be available:
{"@timestamp":"2025-01-17T07:23:03,791","level":"INFO","thread":"main","class":"Besu","message":"Starting Besu","throwable":""}
{"@timestamp":"2025-01-17T07:23:04,558","level":"INFO","thread":"main","class":"Besu","message":"Connecting to 0 static nodes.","throwable":""}
{"@timestamp":"2025-01-17T07:23:04,643","level":"INFO","thread":"main","class":"Besu","message":"
####################################################################################################
# #
# Besu version 25.1.0 #
#
... #
The latest logs will indicate whether besu is in sync too.
The metrics, like the RPCs, aren't enabled by default but if they are then you can check the process_release
metric in prometheus or like this:
$ curl -s localhost:9545/metrics | grep process_release
process_release{version="besu/v25.10/linux-x86_64/openjdk-java-21"} 1.0
|
||
### Data corruption | ||
|
||
If you encounter data corruption, restore the node data from a known good backup. Ensure regular backups are in place to avoid data loss. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could add "As a last resort, deleting the database will resync the node and may solve corruption issues, but may suffer significant downtime depending on the size of the network."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense to also mention ansible, even if rarely used, since we have this page https://besu.hyperledger.org/private-networks/how-to/deploy/ansible and have the ansible role publicly available.
I just think the other deployment are more relevant/popular.
Sorry if my issue description misled on this :)
|
||
The playbook: | ||
### Upgrading in Kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like someone more familiar with Kubernetes like @joshuafernandes to review this and maybe the docker section please.
Description
Issue(s) fixed
Fixes #1711
Preview