Beacon Chain Node

  1. Firewall

Install xray (Ubuntu 20.04) node

 

setup ssh for remote access

[mbarrow@xray ~]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/mbarrow/.ssh/id_rsa):  Created directory '/home/mbarrow/.ssh'. Enter passphrase (empty for no passphrase):  Enter same passphrase again:  Your identification has been saved in /home/mbarrow/.ssh/id_rsa. Your public key has been saved in /home/mbarrow/.ssh/id_rsa.pub. The key fingerprint is: SHA256:yCL0uBEDyvMNznTAnlZ/IlJwstZgkxi84xGc5EcHQMk mbarrow@xray The key's randomart image is: +---[RSA 2048]----+ |B=BX+o           | |+EooXo           | |.+B*+o.          | | =OX+o + .       | |. B++.+ S        | | . + .           | |  .              | |                 | |                 | +----[SHA256]-----+

 

[mbarrow@xray .ssh]$ vi authorized_keys

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDD1E/jj/edBSEMaSErYlb90d1Q+eg6fsXzwEvYBHmKztraA3rr/70/bVLJQr6URgK+GKgchonmQ5XR/JHU1iChuoQITzEgiLMuwmjeRzMl1f1lhTVXRD4VbGWkuryyAOQx69CrQEfQ+0pKA7OzVBwq4AniqAxw3sQINlIlV+DMQRgFr499leaeLUHnkaiRXPi91dduDMQ3dqsaSsWf9TQDnxSmp44fLb08rvQ1ziqO8AaKEtXpj0Zz1WZQa1/mk2t76jMvS6Dg1/VqOc1ubAj6X52cJCvVW+M/+o8VgodLDSQOQMM0kLn7onfJLslzHD+ax/58zhk/6IPdg+qGUpi1 mbarrow@MTBMBP.local                      

[mbarrow@xray .ssh]$ chmod 700 authorized_keys  OpenEthereum ETH1 node setup

 

OpenEthereum (used to be called Parity) is written in Rust and licensed under the GPLv3. The design goals are to be “the fastest, lightest, and most secure Ethereum client”.

Installing OpenEthereum

The OpenEthereum documentation explains how to download and install the client.

Dependencies

mbarrow@xray:~$ sudo apt-get install build-essential cmake libudev-dev

 

[mbarrow@xray ~]$ mkdir openethereum

[mbarrow@xray ~]$ cd openethereum/

[mbarrow@xray openethereum]$ wget https://github.com/openethereum/openethereum/releases/download/v3.1.0/openethereum-linux-v3.1.0.zip

 

 

Automate openethereum start:

 

mbarrow@xray:~$ sudo vi /etc/systemd/system/eth1.service

mbarrow@xray:~$ sudo systemctl daemon-reload

mbarrow@xray:~$ sudo systemctl enable eth1

 

Create the validator keys:

 

 

Install Lighthouse

 

Import Keystore file into the Validator Wallet

Configure the Beacon Node Service

 

 

 

Monitoring the validator with Grafana and Prometheus

 

Install prometheus and prometheus node exporter 

 

Install Grafana

Enable services to start automatically

Update prometheus.yml located in /etc/prometheus/prometheus.yml

 

Restart the Services

Verify the services

 

grafana-server.service - Grafana instance

     Loaded: loaded (/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)

     Active: active (running) since Thu 2020-12-03 02:14:39 UTC; 46s ago

       Docs: http://docs.grafana.org

   Main PID: 10087 (grafana-server)

      Tasks: 9 (limit: 9450)

     Memory: 48.0M

     CGroup: /system.slice/grafana-server.service

             └─10087 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=deb cfg:default.paths.logs=/var/log>

 

Dec 03 02:15:22 xray grafana-server[10087]: t=2020-12-03T02:15:22+0000 lvl=info msg="Executing migration" logger=migrator id="Add index for gnetId in dashboard"

Dec 03 02:15:22 xray grafana-server[10087]: t=2020-12-03T02:15:22+0000 lvl=info msg="Executing migration" logger=migrator id="Add column plugin_id in dashboard"

Dec 03 02:15:23 xray grafana-server[10087]: t=2020-12-03T02:15:23+0000 lvl=info msg="Executing migration" logger=migrator id="Add index for plugin_id in dashboard"

Dec 03 02:15:23 xray grafana-server[10087]: t=2020-12-03T02:15:23+0000 lvl=info msg="Executing migration" logger=migrator id="Add index for dashboard_id in dashboard_tag"

Dec 03 02:15:23 xray grafana-server[10087]: t=2020-12-03T02:15:23+0000 lvl=info msg="Executing migration" logger=migrator id="Update dashboard table charset"

Dec 03 02:15:24 xray grafana-server[10087]: t=2020-12-03T02:15:24+0000 lvl=info msg="Executing migration" logger=migrator id="Update dashboard_tag table charset"

Dec 03 02:15:25 xray grafana-server[10087]: t=2020-12-03T02:15:25+0000 lvl=info msg="Executing migration" logger=migrator id="Add column folder_id in dashboard"

Dec 03 02:15:25 xray grafana-server[10087]: t=2020-12-03T02:15:25+0000 lvl=info msg="Executing migration" logger=migrator id="Add column isFolder in dashboard"

Dec 03 02:15:26 xray grafana-server[10087]: t=2020-12-03T02:15:26+0000 lvl=info msg="Executing migration" logger=migrator id="Add column has_acl in dashboard"

Dec 03 02:15:26 xray grafana-server[10087]: t=2020-12-03T02:15:26+0000 lvl=info msg="Executing migration" logger=migrator id="Add column uid in dashboard"

Dec 03 02:15:27 xray grafana-server[10087]: t=2020-12-03T02:15:27+0000 lvl=info msg="Executing migration" logger=migrator id="Update uid column values in dashboard"

Dec 03 02:15:27 xray grafana-server[10087]: t=2020-12-03T02:15:27+0000 lvl=info msg="Executing migration" logger=migrator id="Add unique index dashboard_org_id_uid"

Dec 03 02:15:27 xray grafana-server[10087]: t=2020-12-03T02:15:27+0000 lvl=info msg="Executing migration" logger=migrator id="Remove unique index org_id_slug"

Dec 03 02:15:28 xray grafana-server[10087]: t=2020-12-03T02:15:28+0000 lvl=info msg="Executing migration" logger=migrator id="Update dashboard title length"

 

prometheus.service - Monitoring system and time series database

     Loaded: loaded (/lib/systemd/system/prometheus.service; enabled; vendor preset: enabled)

     Active: active (running) since Thu 2020-12-03 02:14:40 UTC; 47s ago

       Docs: Overview | Prometheus

   Main PID: 10098 (prometheus)

      Tasks: 15 (limit: 9450)

     Memory: 61.8M

     CGroup: /system.slice/prometheus.service

             └─10098 /usr/bin/prometheus

 

Dec 03 02:14:46 xray prometheus[10098]: level=info ts=2020-12-03T02:14:46.804Z caller=head.go:632 component=tsdb msg="WAL segment loaded" segment=22 maxSegment=26

Dec 03 02:14:47 xray prometheus[10098]: level=info ts=2020-12-03T02:14:47.642Z caller=head.go:632 component=tsdb msg="WAL segment loaded" segment=23 maxSegment=26

Dec 03 02:14:49 xray prometheus[10098]: level=info ts=2020-12-03T02:14:49.911Z caller=head.go:632 component=tsdb msg="WAL segment loaded" segment=24 maxSegment=26

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.384Z caller=head.go:632 component=tsdb msg="WAL segment loaded" segment=25 maxSegment=26

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.384Z caller=head.go:632 component=tsdb msg="WAL segment loaded" segment=26 maxSegment=26

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.394Z caller=main.go:661 fs_type=EXT4_SUPER_MAGIC

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.394Z caller=main.go:662 msg="TSDB started"

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.394Z caller=main.go:732 msg="Loading configuration file" filename=/etc/prometheus/prometheus.yml

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.733Z caller=main.go:760 msg="Completed loading of configuration file" filename=/etc/prometheus/prom>

Dec 03 02:14:50 xray prometheus[10098]: level=info ts=2020-12-03T02:14:50.733Z caller=main.go:615 msg="Server is ready to receive web requests."

 

prometheus-node-exporter.service - Prometheus exporter for machine metrics

     Loaded: loaded (/lib/systemd/system/prometheus-node-exporter.service; enabled; vendor preset: enabled)

     Active: active (running) since Thu 2020-12-03 02:14:42 UTC; 48s ago

       Docs: GitHub - prometheus/node_exporter: Exporter for machine metrics

   Main PID: 10126 (prometheus-node)

      Tasks: 13 (limit: 9450)

     Memory: 11.9M

     CGroup: /system.slice/prometheus-node-exporter.service

             └─10126 /usr/bin/prometheus-node-exporter

 

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - stat" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - systemd" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - textfile" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - time" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - timex" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - uname" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - vmstat" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - xfs" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg=" - zfs" source="node_exporter.go:104"

Dec 03 02:14:43 xray prometheus-node-exporter[10126]: time="2020-12-03T02:14:43Z" level=info msg="Listening on :9100" source="node_exporter.go:170"

mbarrow@xray:~$ sudo systemctl restart prometheus.service

 

Open port 3000

 

 

Setup Grafana Dashboard

 

  1. Open http://xray:3000

  2. Login with admin / admin

  3. Change password

  4. Click the configuration gear icon, then Add data Source

  5. Select Prometheus

  6. Set Name to "Prometheus"

  7. Set URL to http://localhost:9090

  8. Click Save & Test

  9. Download and save this json file.

  10. Click Create + icon > Import

  11. Add dashboard by Upload JSON file

  12. Click the Import button.