Ansible role for Nimbus Eth2 beacon node on Linux https://github.com/status-im/nimbus-eth2
Go to file
Jakub Sokołowski 339998be51
service: add beacon_node_history_retention
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-01-31 15:53:11 +01:00
defaults service: add beacon_node_history_retention 2023-01-31 15:53:11 +01:00
files ansible_toggle: script for disabling ansible changes 2022-01-26 10:07:55 +01:00
handlers initial commit 2021-06-22 17:34:37 +08:00
meta meta: update author to jakub@status.im 2022-01-26 09:12:24 +01:00
tasks config: wider permissions for helper scripts 2022-11-22 11:12:45 +01:00
templates service: add beacon_node_history_retention 2023-01-31 15:53:11 +01:00
README.md fix readme link (#9) 2022-06-20 09:36:00 +02:00

README.md

Description

This role provisions a Nimbus installation that can act as an ETH2 network bootstrap node.

Introduction

The role will:

Ports

The service exposes three ports by default:

  • 9000 - LibP2P peering port. Must ALWAYS be public.
  • 9200 - JSON RPC port. Must NEVER be public.
  • 9900 - Prometheus metrics port. Should not be public.

Installation

Add to your requirements.yml file:

- name: infra-role-beacon-node-linux
  src: git+git@github.com:status-im/infra-role-beacon-node-linux.git
  scm: git

Configuration

The crucial settings are:

# branch which should be built
beacon_node_repo_branch: 'stable'
# ethereum network to connect to
beacon_node_network: 'mainnet'
# optional setting for debug mode
beacon_node_log_level: 'DEBUG'
# Infura WebSocket URLs
beacon_node_web3_urls: ['wss://mainnet.infura.io/ws/v3/123qwe123qwe123qwe']

The order of WebSocket URLs matters. First is the default, the rest are fallbacks.

Management

Service

Assuming the stable branch was built you can manage the service with:

sudo systemctl start beacon-node-mainnet-stable
sudo systemctl status beacon-node-mainnet-stable
sudo systemctl stop beacon-node-mainnet-stable

You can view logs under:

tail -f /data/beacon-node-mainnet-stable/logs/service.log

All node data is located in /data/beacon-node-mainnet-stable/data.

Builds

A timer will be installed to build the image:

 > sudo systemctl list-units --type=service '*beacon-node-*'
  UNIT                                LOAD   ACTIVE SUB     DESCRIPTION
  beacon-node-prater-stable.service   loaded active running Nimbus Beacon Node on prater network (stable)
  beacon-node-prater-testing.service  loaded active running Nimbus Beacon Node on prater network (testing)
  beacon-node-prater-unstable.service loaded active running Nimbus Beacon Node on prater network (unstable)

To rebuild the image:

 > sudo systemctl start build-beacon-node-prater-stable
 > sudo systemctl status build-beacon-node-prater-stable
 ● beacon-node-prater-stable-build.service - Build beacon-node-prater-stable
     Loaded: loaded (/etc/systemd/system/beacon-node-prater-stable-build.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Wed 2021-09-29 12:00:12 UTC; 2h 15min ago
TriggeredBy: ● beacon-node-prater-stable-build.timer
       Docs: https://github.com/status-im/infra-role-systemd-timer
    Process: 1212987 ExecStart=/data/beacon-node-prater-stable/build.sh (code=exited, status=0/SUCCESS)
   Main PID: 1212987 (code=exited, status=0/SUCCESS)

Sep 29 12:00:12 build.sh[1213054]: HEAD is now at 0b21ebfe readme: update toc
Sep 29 12:00:12 build.sh[1212987]:  >>> Binary already built
Sep 29 12:00:12 systemd[1]: beacon-node-prater-stable-build.service: Succeeded.
Sep 29 12:00:12 systemd[1]: Finished Build beacon-node-prater-stable.

To check full build logs use:

journalctl -u build-beacon-node-mainnet-stable.service

Requirements

Due to being part of Status infra this role assumes availability of certain things:

  • The iptables-persistent module