Skip to content

Commit

Permalink
Merge branch 'master' into extra-args
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsteen committed Aug 18, 2021
2 parents d39c358 + 7d8cffe commit 2f3daa7
Show file tree
Hide file tree
Showing 30 changed files with 15,471 additions and 57 deletions.
3,697 changes: 3,697 additions & 0 deletions Dashboards/Rocket Pool Dashboard v1.0.0 for Lighthouse.json

Large diffs are not rendered by default.

3,728 changes: 3,728 additions & 0 deletions Dashboards/Rocket Pool Dashboard v1.0.0 for Nimbus.json

Large diffs are not rendered by default.

3,740 changes: 3,740 additions & 0 deletions Dashboards/Rocket Pool Dashboard v1.0.0 for Prysm.json

Large diffs are not rendered by default.

3,724 changes: 3,724 additions & 0 deletions Dashboards/Rocket Pool Dashboard v1.0.0 for Teku.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ if [ "$CLIENT" = "lighthouse" ]; then
CMD="$CMD --target-peers $ETH2_MAX_PEERS"
fi

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $ETH2_METRICS_PORT --validator-monitor-auto"
fi

exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Expand All @@ -36,7 +40,7 @@ if [ "$CLIENT" = "nimbus" ]; then
CMD="$CMD --max-peers=$ETH2_MAX_PEERS"
fi

if [ ! -z "$ENABLE_METRICS" ]; then
if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address=0.0.0.0 --metrics-port=$ETH2_METRICS_PORT"
fi

Expand All @@ -60,6 +64,12 @@ if [ "$CLIENT" = "prysm" ]; then
CMD="$CMD --p2p-max-peers $ETH2_MAX_PEERS"
fi

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --monitoring-host 0.0.0.0 --monitoring-port $ETH2_METRICS_PORT"
else
CMD="$CMD --disable-monitoring"
fi

exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Expand All @@ -74,6 +84,10 @@ if [ "$CLIENT" = "teku" ]; then
CMD="$CMD --p2p-peer-lower-bound=$ETH2_MAX_PEERS --p2p-peer-upper-bound=$ETH2_MAX_PEERS"
fi

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$ETH2_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ fi
# Lighthouse startup
if [ "$CLIENT" = "lighthouse" ]; then

exec /usr/local/bin/lighthouse validator --network prater --datadir /validators/lighthouse --init-slashing-protection --beacon-node "http://$ETH2_PROVIDER" --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}
CMD="/usr/local/bin/lighthouse validator --network prater --datadir /validators/lighthouse --init-slashing-protection --beacon-node $ETH2_PROVIDER"

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $VALIDATOR_METRICS_PORT"
fi

exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

Expand All @@ -35,15 +41,29 @@ if [ "$CLIENT" = "prysm" ]; then
# Get rid of the protocol prefix
ETH2_PROVIDER=$(echo $ETH2_PROVIDER | sed -E 's/.*\:\/\/(.*)/\1/')

exec /app/cmd/validator/validator --accept-terms-of-use --prater --wallet-dir /validators/prysm-non-hd --wallet-password-file /validators/prysm-non-hd/direct/accounts/secret --beacon-rpc-provider "$ETH2_PROVIDER" --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}
CMD="/app/cmd/validator/validator --accept-terms-of-use --prater --wallet-dir /validators/prysm-non-hd --wallet-password-file /validators/prysm-non-hd/direct/accounts/secret --beacon-rpc-provider $ETH2_PROVIDER"

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --monitoring-host 0.0.0.0 --monitoring-port $VALIDATOR_METRICS_PORT"
else
CMD="$CMD --disable-account-metrics"
fi

exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi


# Teku startup
if [ "$CLIENT" = "teku" ]; then

exec /opt/teku/bin/teku validator-client --network=prater --validator-keys=/validators/teku/keys:/validators/teku/passwords --beacon-node-api-endpoint="http://$ETH2_PROVIDER" --validators-graffiti="$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}
CMD="/opt/teku/bin/teku validator-client --network=prater --validator-keys=/validators/teku/keys:/validators/teku/passwords --beacon-node-api-endpoint=$ETH2_PROVIDER"

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$VALIDATOR_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD} --validators-graffiti="$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

23 changes: 14 additions & 9 deletions amd64/rp-smartnode-install/network/prater/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ chains:
\t\tinteracting with the core Ethereum platform. Teku is Apache 2\n
\t\tlicensed and written in Java, a language notable for its\n
\t\tmaturity & ubiquity."
image: consensys/teku:21.8.0
image: consensys/teku:21.8.1
link: https://docs.teku.consensys.net/en/stable/
params:
- name: Custom Graffiti
Expand All @@ -219,20 +219,25 @@ metrics:
- name: ETH2 Metrics Port
desc: The port for the Beacon Chain client to make its metrics available on
env: ETH2_METRICS_PORT
blankText: the default of 8008
default: 8008
blankText: the default of 9100
default: 9100
- name: Validator Metrics Port
desc: The port for the Validator client to make its metrics available on
env: VALIDATOR_METRICS_PORT
blankText: the default of 9101
default: 9101
type: uint16
- name: Rocket Pool Node Metrics Port
desc: The port for the Rocket Pool Node to make its metrics available on
env: NODE_METRICS_PORT
blankText: the default of 8009
default: 8009
blankText: the default of 9102
default: 9102
type: uint16
- name: Node Exporter Metrics Port
desc: The port for Prometheus's Node Exporter to make its metrics available on
env: EXPORTER_METRICS_PORT
blankText: the default of 9101
default: 9101
blankText: the default of 9103
default: 9103
type: uint16
- name: Prometheus Port
desc: The port for Prometheus to make its metrics available on
Expand All @@ -243,6 +248,6 @@ metrics:
- name: Grafana Port
desc: The port for Grafana to listen on for HTTP requests
env: GRAFANA_PORT
blankText: the default of 3001
default: 3001
blankText: the default of 3100
default: 3100
type: uint16
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--collector.textfile.directory=/host/textfile_collector"
- "--web.listen-address=:${EXPORTER_METRICS_PORT:-9101}"
- "--web.listen-address=:${EXPORTER_METRICS_PORT:-9103}"
volumes:
- /proc:/host/proc:ro,rslave
- /sys:/host/sys:ro,rslave
Expand All @@ -37,9 +37,9 @@ services:
container_name: ${COMPOSE_PROJECT_NAME}_grafana
restart: unless-stopped
environment:
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT:-3001}
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT:-3100}
ports:
- "${GRAFANA_PORT:-3001}:${GRAFANA_PORT:-3001}/tcp"
- "${GRAFANA_PORT:-3100}:${GRAFANA_PORT:-3100}/tcp"
volumes:
- "grafana-storage:/var/lib/grafana"
networks:
Expand Down
4 changes: 3 additions & 1 deletion amd64/rp-smartnode-install/network/prater/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ services:
- ETH2_PROVIDER=${ETH2_PROVIDER}
- CUSTOM_GRAFFITI=${CUSTOM_GRAFFITI}
- ROCKET_POOL_VERSION=${ROCKET_POOL_VERSION}
- ENABLE_METRICS=${ENABLE_METRICS}
- VALIDATOR_METRICS_PORT=${VALIDATOR_METRICS_PORT}
- VALIDATOR_EXTRA_ARGS=${ETH1_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-validator.sh"
Expand Down Expand Up @@ -101,7 +103,7 @@ services:
- .:/.rocketpool
networks:
- net
command: "-m 0.0.0.0 -r ${NODE_METRICS_PORT:-8009} node"
command: "-m 0.0.0.0 -r ${NODE_METRICS_PORT:-9102} node"
depends_on:
- eth1
- eth2
Expand Down
10 changes: 7 additions & 3 deletions amd64/rp-smartnode-install/network/prater/prometheus.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ scrape_configs:
static_configs:
# node-exporter is on the host network so it can get access to the actual machine's network info
# We have to use 'hosts.docker.internal' to refer to it due to this configuration
- targets: ['host.docker.internal:${NODE_EXPORTER_PORT:-9101}']
- targets: ['host.docker.internal:${NODE_EXPORTER_PORT:-9103}']

- job_name: 'eth2'
static_configs:
- targets: ['eth2:${ETH2_METRICS_PORT:-8008}']
- targets: ['eth2:${ETH2_METRICS_PORT:-9100}']

- job_name: 'validator'
static_configs:
- targets: ['validator:${VALIDATOR_METRICS_PORT:-9101}']

- job_name: 'rocketpool'
scrape_interval: 5m
scrape_timeout: 5m
static_configs:
- targets: ['node:${NODE_METRICS_PORT:-8009}']
- targets: ['node:${NODE_METRICS_PORT:-9102}']
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ if [ "$CLIENT" = "lighthouse" ]; then
CMD="$CMD --target-peers $ETH2_MAX_PEERS"
fi

<<<<<<< HEAD
exec ${CMD} ${ETH2_EXTRA_ARGS}
=======
if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $ETH2_METRICS_PORT --validator-monitor-auto"
fi

exec ${CMD}
>>>>>>> master

fi

Expand All @@ -36,7 +44,7 @@ if [ "$CLIENT" = "nimbus" ]; then
CMD="$CMD --max-peers=$ETH2_MAX_PEERS"
fi

if [ ! -z "$ENABLE_METRICS" ]; then
if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address=0.0.0.0 --metrics-port=$ETH2_METRICS_PORT"
fi

Expand All @@ -48,7 +56,7 @@ fi

# Prysm startup
if [ "$CLIENT" = "prysm" ]; then

# Get Prater SSZ
if [ ! -f "/validators/genesis.ssz" ]; then
wget "https://github.com/eth2-clients/eth2-networks/raw/master/shared/prater/genesis.ssz" -O "/validators/genesis.ssz"
Expand All @@ -60,6 +68,12 @@ if [ "$CLIENT" = "prysm" ]; then
CMD="$CMD --p2p-max-peers $ETH2_MAX_PEERS"
fi

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --monitoring-host 0.0.0.0 --monitoring-port $ETH2_METRICS_PORT"
else
CMD="$CMD --disable-monitoring"
fi

exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Expand All @@ -74,6 +88,10 @@ if [ "$CLIENT" = "teku" ]; then
CMD="$CMD --p2p-peer-lower-bound=$ETH2_MAX_PEERS --p2p-peer-upper-bound=$ETH2_MAX_PEERS"
fi

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$ETH2_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD} ${ETH2_EXTRA_ARGS}

fi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ fi
# Lighthouse startup
if [ "$CLIENT" = "lighthouse" ]; then

exec /usr/local/bin/lighthouse validator --network prater --datadir /validators/lighthouse --init-slashing-protection --beacon-node "http://$ETH2_PROVIDER" --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}
CMD="/usr/local/bin/lighthouse validator --network prater --datadir /validators/lighthouse --init-slashing-protection --beacon-node $ETH2_PROVIDER"

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics --metrics-address 0.0.0.0 --metrics-port $VALIDATOR_METRICS_PORT"
fi

exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

Expand All @@ -35,15 +41,29 @@ if [ "$CLIENT" = "prysm" ]; then
# Get rid of the protocol prefix
ETH2_PROVIDER=$(echo $ETH2_PROVIDER | sed -E 's/.*\:\/\/(.*)/\1/')

exec /app/cmd/validator/validator --accept-terms-of-use --prater --wallet-dir /validators/prysm-non-hd --wallet-password-file /validators/prysm-non-hd/direct/accounts/secret --beacon-rpc-provider "$ETH2_PROVIDER" --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}
CMD="/app/cmd/validator/validator --accept-terms-of-use --prater --wallet-dir /validators/prysm-non-hd --wallet-password-file /validators/prysm-non-hd/direct/accounts/secret --beacon-rpc-provider $ETH2_PROVIDER"

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --monitoring-host 0.0.0.0 --monitoring-port $VALIDATOR_METRICS_PORT"
else
CMD="$CMD --disable-account-metrics"
fi

exec ${CMD} --graffiti "$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi


# Teku startup
if [ "$CLIENT" = "teku" ]; then

exec /opt/teku/bin/teku validator-client --network=prater --validator-keys=/validators/teku/keys:/validators/teku/passwords --beacon-node-api-endpoint="http://$ETH2_PROVIDER" --validators-graffiti="$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}
CMD="/opt/teku/bin/teku validator-client --network=prater --validator-keys=/validators/teku/keys:/validators/teku/passwords --beacon-node-api-endpoint=$ETH2_PROVIDER"

if [ "$ENABLE_METRICS" -eq "1" ]; then
CMD="$CMD --metrics-enabled=true --metrics-interface=0.0.0.0 --metrics-port=$VALIDATOR_METRICS_PORT --metrics-host-allowlist=*"
fi

exec ${CMD} --validators-graffiti="$GRAFFITI" ${VALIDATOR_EXTRA_ARGS}

fi

23 changes: 14 additions & 9 deletions arm64/rp-smartnode-install/network/prater/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ chains:
\t\tinteracting with the core Ethereum platform. Teku is Apache 2\n
\t\tlicensed and written in Java, a language notable for its\n
\t\tmaturity & ubiquity."
image: rocketpool/teku:21.8.0
image: rocketpool/teku:21.8.1
link: https://docs.teku.consensys.net/en/stable/
params:
- name: Custom Graffiti
Expand All @@ -222,20 +222,25 @@ metrics:
- name: ETH2 Metrics Port
desc: The port for the Beacon Chain client to make its metrics available on
env: ETH2_METRICS_PORT
blankText: the default of 8008
default: 8008
blankText: the default of 9100
default: 9100
- name: Validator Metrics Port
desc: The port for the Validator client to make its metrics available on
env: VALIDATOR_METRICS_PORT
blankText: the default of 9101
default: 9101
type: uint16
- name: Rocket Pool Node Metrics Port
desc: The port for the Rocket Pool Node to make its metrics available on
env: NODE_METRICS_PORT
blankText: the default of 8009
default: 8009
blankText: the default of 9102
default: 9102
type: uint16
- name: Node Exporter Metrics Port
desc: The port for Prometheus's Node Exporter to make its metrics available on
env: EXPORTER_METRICS_PORT
blankText: the default of 9101
default: 9101
blankText: the default of 9103
default: 9103
type: uint16
- name: Prometheus Port
desc: The port for Prometheus to make its metrics available on
Expand All @@ -246,6 +251,6 @@ metrics:
- name: Grafana Port
desc: The port for Grafana to listen on for HTTP requests
env: GRAFANA_PORT
blankText: the default of 3001
default: 3001
blankText: the default of 3100
default: 3100
type: uint16
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--collector.textfile.directory=/host/textfile_collector"
- "--web.listen-address=:${EXPORTER_METRICS_PORT:-9101}"
- "--web.listen-address=:${EXPORTER_METRICS_PORT:-9103}"
volumes:
- /proc:/host/proc:ro,rslave
- /sys:/host/sys:ro,rslave
Expand All @@ -37,9 +37,9 @@ services:
container_name: ${COMPOSE_PROJECT_NAME}_grafana
restart: unless-stopped
environment:
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT:-3001}
- GF_SERVER_HTTP_PORT=${GRAFANA_PORT:-3100}
ports:
- "${GRAFANA_PORT:-3001}:${GRAFANA_PORT:-3001}/tcp"
- "${GRAFANA_PORT:-3100}:${GRAFANA_PORT:-3100}/tcp"
volumes:
- "grafana-storage:/var/lib/grafana"
networks:
Expand Down
4 changes: 3 additions & 1 deletion arm64/rp-smartnode-install/network/prater/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ services:
- ETH2_PROVIDER=${ETH2_PROVIDER}
- CUSTOM_GRAFFITI=${CUSTOM_GRAFFITI}
- ROCKET_POOL_VERSION=${ROCKET_POOL_VERSION}
- ENABLE_METRICS=${ENABLE_METRICS}
- VALIDATOR_METRICS_PORT=${VALIDATOR_METRICS_PORT}
- VALIDATOR_EXTRA_ARGS=${VALIDATOR_EXTRA_ARGS}
entrypoint: sh
command: "/setup/start-validator.sh"
Expand Down Expand Up @@ -101,7 +103,7 @@ services:
- .:/.rocketpool
networks:
- net
command: "-m 0.0.0.0 -r ${NODE_METRICS_PORT:-8009} node"
command: "-m 0.0.0.0 -r ${NODE_METRICS_PORT:-9102} node"
depends_on:
- eth1
- eth2
Expand Down
Loading

0 comments on commit 2f3daa7

Please sign in to comment.