docs: add apt repo (#4644)

* docs: add apt repo

* Update docs/the_nimbus_book/src/keep-updated.md

Co-authored-by: tersec <tersec@users.noreply.github.com>

* more package manager integration

* fix admonition

---------

Co-authored-by: zah <zahary@status.im>
Co-authored-by: tersec <tersec@users.noreply.github.com>
This commit is contained in:
Jacek Sieka 2023-03-02 17:22:07 +01:00 committed by GitHub
parent d058aa09c8
commit daf8ee6c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 69 deletions

View File

@ -4,10 +4,11 @@ This page will take you through how to set up a `systemd` service for your beaco
`systemd` is used in order to have a command or program run when your device boots (i.e. add it as a service). Once this is done, you can start/stop enable/disable from the linux prompt.
!!! note
[`systemd`](https://systemd.io/) is a service manager designed specifically for Linux - it cannot be used on Windows / Mac. You can get more information about systemd [here](https://fedoramagazine.org/what-is-an-init-system/)
!!! abstract "`systemd`"
[`systemd`](https://systemd.io/) is a service manager designed specifically for Linux - it cannot be used on Windows / Mac. You can find out more about `systemd` [here](https://fedoramagazine.org/what-is-an-init-system/)
When installing Nimbus via your package manager, a user and service will already have been created for you and you can skip straight to the configuration section.
!!! note "Package manager installations"
When installing Nimbus via your [package manager](./binaries.md), a user and service will already have been created for you and you can skip straight to the configuration section.
### 1. Create a dedicated user

View File

@ -1,29 +1,44 @@
# Binaries
Binary releases can be downloaded from [https://github.com/status-im/nimbus-eth2/releases/latest](https://github.com/status-im/nimbus-eth2/releases/latest).
Binary releases are available from [GitHub](https://github.com/status-im/nimbus-eth2/releases/latest) and our [APT repository](https://apt.status.im/) (Debian/Ubuntu).
We currently have binaries available for Linux `AMD64`, `ARM` and `ARM64`, Windows `AMD64` and macOS (`AMD64` and `ARM64`).
## Download
=== "Manual installation"
The binaries are available at the bottom of the page under `Assets`. You should see a list that looks like the following:
The latest release is always available from [Github](https://github.com/status-im/nimbus-eth2/releases/latest) under the **Assets** header at the bottom of the page.
![Assets](https://i.imgur.com/6wuvM2d.png)
To install or upgrade a binary release, simply unpack the archive appropriate for your operating system and architecture in a directory of your choice, and run the binary.
Click on the file that corresponds to your OS and architecture, unpack the archive, read the README and run the binary directly (or through one of our provided wrapper scripts).
```sh
# Create a directory that can hold the beacon chain data and applications - this should be a fast SSD
mkdir -p nimbus-eth2
# Unpack the archive into the `nimbus-eth2` directory you just created
tar xvf nimbus-eth2_Linux_amd64_22.6.1_2444e994.tar.gz --strip-components 1 -C nimbus-eth2
```
## Installation
After unpacking, you may wish to [verify the checksum](./checksums.md).
To install or upgrade a binary release, simply unpack the downloaded archive in a directory of your choice.
=== "Debain / Ubuntu"
```sh
# Create a directory that can hold the beacon chain data and applications - this should be a fast SSD
mkdir -p nimbus-eth2
# Unpack the archive into the `nimbus-eth2` directory you just created
tar xvf nimbus-eth2_Linux_amd64_22.6.1_2444e994.tar.gz --strip-components 1 -C nimbus-eth2
```
Install Nimbus from our [APT repository](https://apt.status.im/):
After unpacking, you may wish to [verify the checksum](./checksums.md).
```sh
# Add the nimbus repository
echo 'deb https://apt.status.im/nimbus all main' | sudo tee /etc/apt/sources.list.d/nimbus.list
# Import the GPG key
sudo curl https://apt.status.im/pubkey.asc -o /etc/apt/trusted.gpg.d/apt-status-im.asc
# Update repository files and install Nimbus components
sudo apt-get update
sudo apt-get install nimbus-beacon-node nimbus-validator-client
```
!!! note "Helper scripts"
When installing via package manager, replace `run-mainnet-beacon-node.sh` and similar helper scripts used in this guide with `nimbus_beacon_node` - blockchain data will be written to the default [data directory](./data-dir.md) unless changed with `--data-dir`.
!!! tip "`systemd`"
Packages include `systemd` service unit files - see the [systemd guide](./beacon-node-systemd.md) for usage instructions - the `nimbus` user is created as part of the installation process!
## Reproducible builds

View File

@ -5,44 +5,50 @@ Make sure you stay on the lookout for any critical updates to Nimbus. The best w
!!! note
If your beacon node is already running, you'll need to restart it for the changes to take effect.
To update to the latest version, either download the binary or compile the beacon node release (see below).
To update to the latest version, either download the binary or compile the beacon node release (see below), then restart the service.
!!! tip
To check which version of Nimbus you're currently running, run `build/nimbus_beacon_node --version`
## Binaries
## Upgrade to the latest version
Open the latest [Nimbus release](https://github.com/status-im/nimbus-eth2/releases/latest) and download the file that corresponds to your operation system and machine.
=== "Manual installation"
Open the [Nimbus release page](https://github.com/status-im/nimbus-eth2/releases/latest) and download the file that corresponds to your operation system and machine.
Once downloaded, unpack the binaries in the same folder as your current version, overwriting the existing files.
Once downloaded, unpack the binaries in the same folder as your current version, overwriting the existing files.
```sh
wget <insert download link here>
tar -xzf nimbus-eth2_Linux_arm64v8*.tar.gz --strip-components 1 -C nimbus-eth2
rm nimbus-eth2_Linux_arm64v8*.tar.gz
```
```sh
wget <insert download link here>
tar -xzf nimbus-eth2_Linux_arm64v8*.tar.gz --strip-components 1 -C nimbus-eth2
rm nimbus-eth2_Linux_arm64v8*.tar.gz
```
## Build from source
=== "Debian / Ubuntu"
Upgrading Nimbus when built from source is similar to the installation process.
Update Nimbus via the package manager as usual
Run:
```sh
sudo apt-get update && sudo apt-get upgrade
```
```sh
# Download the updated source code
git pull && make update
```
=== "Build from source"
Followed by:
Upgrading Nimbus when built from source is similar to the installation process.
```sh
make -j4 nimbus_beacon_node
```
Run:
Now, restart your node.
```sh
# Download the updated source code
git pull && make update
!!! tip
In order to minimise downtime, we recommend updating and [rebuilding](./build.md) the beacon node **before restarting**.
# Build the downloaded newly downloaded version
make -j4 nimbus_beacon_node
```
!!! tip
If you want to minimise downtime, you can build Nimbus while the node is running!
Complete the upgrade by restarting the node!
## Urgency guidelines
@ -59,34 +65,40 @@ As of `v1.4.0`, releases are marked with the following tags:
*Occassionally you may need to either upgrade or downgrade to a specific version of Nimbus.*
To pull a specific version of Nimbus (e.g. `v22.9.1`), run:
```sh
git checkout v22.9.1 && make update
```
Nimbus can safely be downgraded to any version targeting the current hard fork of the chain, unless otherwise noted among the release notes.
Followed by:
=== "Manual installation"
```sh
make nimbus_beacon_node
```
Download the desired version from [Github](https://github.com/status-im/nimbus-eth2/releases/) and replace the binaries, similar to upgrading.
=== "Debian / Ubuntu"
Use the package manager to install a specific version:
```sh
sudo apt-get install nimbus-beacon-node=23.2.0
```
=== "Build from source"
To pull a specific version of Nimbus (e.g. `v22.9.1`), run:
```sh
# Switch source code to the desired version
git checkout v22.9.1 && make update
# Run the build command as usual
make -j4 nimbus_beacon_node
```
When later you want to go back to the stable release:
```sh
# Switch source code to the stable version
git checkout stable && make update
# Run the build command as usual
make -j4 nimbus_beacon_node
```
Now, restart your node.
!!! note
Alternatively, you can grab the appropriate binary release - create a backup of your `build` folder, then download the appropriate binary from here: [https://github.com/status-im/nimbus-eth2/releases/tag/v22.9.1](https://github.com/status-im/nimbus-eth2/releases/tag/v22.9.1)
### Go back to stable
If you need to go back to the latest (stable) version, run:
```sh
git checkout stable && make update
```
Followed by
```sh
make nimbus_beacon_node
```
Don't forget to restart your node.

View File

@ -20,7 +20,7 @@ For example, Nethermind on Goerli can run via:
cd nethermind/src/Nethermind/Nethermind.Runner
dotnet run -c Release -- --config goerli \
--JsonRpc.Host=0.0.0.0 \
--JsonRpc.JwtSecretFile=/opt/jwtsecre
--JsonRpc.JwtSecretFile=/opt/jwtsecret
```
Erigon can be run using:

View File

@ -43,7 +43,9 @@ wget https://github.com/status-im/nimbus-eth2/releases/download/v22.10.1/nimbus-
tar xvf nimbus-eth2_Linux_amd64_22.10.1_97a1cdc4.tar.gz --strip-components 1 -C nimbus-eth2
```
!!! tip
!!! tip "Other installation methods"
Debian / Ubuntu users may wish to use our [APT repository](./binaries.md).
Advanced users looking to take advantage of hardware-specific features and optimization may wish to [build from source](./build.md) instead!
### 4. Start the node