forked from cerc-io/stack-orchestrator
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a750f0d9e | ||
|
|
8a6ba6d01b | ||
|
|
b4ddef7ff0 | ||
|
|
a38ac5470d | ||
|
|
77380aec94 | ||
|
|
ce7e5f2d82 | ||
|
|
4dda8e2a87 | ||
|
|
24ab259741 | ||
|
|
607575e4f4 | ||
|
|
86e245e272 | ||
|
|
d677e5f369 | ||
|
|
9991baa8d6 | ||
|
|
d033d4ff93 | ||
|
|
f02bbee3bf | ||
|
|
bdde1b2c9e | ||
|
|
96a83422e7 | ||
|
|
af03208da7 | ||
|
|
86e2407800 | ||
|
|
c01ff28b4f | ||
|
|
ec54258285 | ||
|
|
1f2ee33b42 | ||
|
|
a2b700727c |
@@ -13,6 +13,8 @@ services:
|
||||
grafana:
|
||||
restart: always
|
||||
image: grafana/grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_PASSWORD=changeme6325
|
||||
volumes:
|
||||
- ../config/fixturenet-eth-metrics/grafana/etc/provisioning/dashboards:/etc/grafana/provisioning/dashboards
|
||||
- ../config/fixturenet-eth-metrics/grafana/etc/provisioning/datasources:/etc/grafana/provisioning/datasources
|
||||
|
||||
@@ -20,6 +20,7 @@ services:
|
||||
CERC_REMOTE_DEBUG: "true"
|
||||
CERC_RUN_STATEDIFF: "detect"
|
||||
CERC_STATEDIFF_DB_NODE_ID: 1
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
env_file:
|
||||
- ../config/fixturenet-eth/fixturenet-eth.env
|
||||
image: cerc/fixturenet-eth-geth:local
|
||||
|
||||
+366
-41
@@ -326,8 +326,9 @@
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_call_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"legendFormat": "eth_call",
|
||||
"expr": "rate(rpc_duration_eth_blockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_blockNumber",
|
||||
"range": true,
|
||||
"refId": "A"
|
||||
},
|
||||
@@ -337,48 +338,12 @@
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"expr": "rate(rpc_duration_eth_call_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlocksByHash",
|
||||
"legendFormat": "eth_call",
|
||||
"range": true,
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlocksByNumber",
|
||||
"range": true,
|
||||
"refId": "C"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getStorageAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "getStorageAt",
|
||||
"range": true,
|
||||
"refId": "D"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_statediff_writeStateDiffAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "statediff_writeStateDiffAt",
|
||||
"range": true,
|
||||
"refId": "E"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@@ -389,8 +354,356 @@
|
||||
"hide": false,
|
||||
"legendFormat": "eth_chainId",
|
||||
"range": true,
|
||||
"refId": "C"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_estimateGas_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_estimateGas",
|
||||
"range": true,
|
||||
"refId": "D"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_gasPrice_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_gasPrice",
|
||||
"range": true,
|
||||
"refId": "E"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBalance_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBalance",
|
||||
"range": true,
|
||||
"refId": "F"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockByHash",
|
||||
"range": true,
|
||||
"refId": "G"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockByNumber",
|
||||
"range": true,
|
||||
"refId": "H"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockReceipts_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockReceipts",
|
||||
"range": true,
|
||||
"refId": "I"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockTransactionCountByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockTransactionCountByHash",
|
||||
"range": true,
|
||||
"refId": "J"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getBlockTransactionCountByNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getBlockTransactionCountByNumber",
|
||||
"range": true,
|
||||
"refId": "K"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getCode_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getCode",
|
||||
"range": true,
|
||||
"refId": "L"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getFilterChanges_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getFilterChanges",
|
||||
"range": true,
|
||||
"refId": "M"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getFilterLogs_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getFilterLogs",
|
||||
"range": true,
|
||||
"refId": "N"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getLogs_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getLogs",
|
||||
"range": true,
|
||||
"refId": "O"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getStorageAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getStorageAt",
|
||||
"range": true,
|
||||
"refId": "P"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionByBlockHashAndIndex_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionByBlockHashAndIndex",
|
||||
"range": true,
|
||||
"refId": "Q"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionByBlockNumberAndIndex_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionByBlockNumberAndIndex",
|
||||
"range": true,
|
||||
"refId": "R"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionByHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionByHash",
|
||||
"range": true,
|
||||
"refId": "S"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionCount_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionCount",
|
||||
"range": true,
|
||||
"refId": "T"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getTransactionReceipt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getTransactionReceipt",
|
||||
"range": true,
|
||||
"refId": "U"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getUncleCountByBlockHash_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getUncleCountByBlockHash",
|
||||
"range": true,
|
||||
"refId": "V"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_getUncleCountByBlockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_getUncleCountByBlockNumber",
|
||||
"range": true,
|
||||
"refId": "W"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_mining_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_mining_success",
|
||||
"range": true,
|
||||
"refId": "X"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_newBlockFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_newBlockFilter",
|
||||
"range": true,
|
||||
"refId": "Y"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_newFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_newFilter",
|
||||
"range": true,
|
||||
"refId": "Z"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_newPendingTransactionFilter_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_newPendingTransactionFilter",
|
||||
"range": true,
|
||||
"refId": "AA"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_sendRawTransaction_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_sendRawTransaction",
|
||||
"range": true,
|
||||
"refId": "AB"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_signTransaction_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_signTransaction",
|
||||
"range": true,
|
||||
"refId": "AC"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_subscribe_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_subscribe",
|
||||
"range": true,
|
||||
"refId": "AD"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_syncing_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_syncing",
|
||||
"range": true,
|
||||
"refId": "AE"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_eth_unsubscribe_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "eth_unsubscribe",
|
||||
"range": true,
|
||||
"refId": "AF"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
@@ -401,7 +714,19 @@
|
||||
"hide": false,
|
||||
"legendFormat": "statediff_writeStateDiffFor",
|
||||
"range": true,
|
||||
"refId": "G"
|
||||
"refId": "AG"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "jZUuGao4k"
|
||||
},
|
||||
"editorMode": "code",
|
||||
"expr": "rate(rpc_duration_statediff_writeStateDiffAt_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
|
||||
"hide": false,
|
||||
"legendFormat": "statediff_writeStateDiffAt",
|
||||
"range": true,
|
||||
"refId": "AH"
|
||||
}
|
||||
],
|
||||
"title": "geth API Requests/sec",
|
||||
|
||||
@@ -19,3 +19,5 @@ CERC_STATEDIFF_DB_USER="vdbm"
|
||||
CERC_STATEDIFF_DB_PASSWORD="password"
|
||||
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
|
||||
CERC_STATEDIFF_DB_LOG_STATEMENTS="false"
|
||||
|
||||
CERC_GETH_VMODULE="statediff/*=5,rpc/*=5"
|
||||
|
||||
@@ -16,6 +16,12 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && export DEBCONF_NO
|
||||
RUN mkdir /scripts
|
||||
COPY install-dependencies.sh /scripts
|
||||
|
||||
# Override the definition of GERBIL_PATH in the base image, but
|
||||
# is safe because (at present) no gerbil packages are installed in the base image
|
||||
# We do this in order to allow a set of pre-installed packages from the container
|
||||
# to be used with an arbitrary, potentially different set of projects bind mounted
|
||||
# at /src
|
||||
ENV GERBIL_PATH=/.gerbil
|
||||
RUN bash /scripts/install-dependencies.sh
|
||||
|
||||
# Needed to prevent git from raging about /src
|
||||
|
||||
@@ -10,6 +10,7 @@ DEPS=(github.com/fare/gerbil-utils
|
||||
github.com/vyzo/gerbil-libp2p
|
||||
) ;
|
||||
for i in ${DEPS[@]} ; do
|
||||
echo "Installing gerbil package: $i"
|
||||
gxpkg install $i &&
|
||||
gxpkg build $i
|
||||
done
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
ETHERBASE=`cat /opt/testnet/build/el/accounts.csv | head -1 | cut -d',' -f2`
|
||||
NETWORK_ID=`cat /opt/testnet/el/el-config.yaml | grep 'chain_id' | awk '{ print $2 }'`
|
||||
NETRESTRICT=`ip addr | grep inet | grep -v '127.0' | awk '{print $2}'`
|
||||
@@ -28,7 +32,9 @@ else
|
||||
echo -n "$JWT" > /opt/testnet/build/el/jwtsecret
|
||||
|
||||
if [ "$CERC_RUN_STATEDIFF" == "detect" ] && [ -n "$CERC_STATEDIFF_DB_HOST" ]; then
|
||||
if [ -n "$(dig $CERC_STATEDIFF_DB_HOST +short)" ]; then
|
||||
dig_result=$(dig $CERC_STATEDIFF_DB_HOST +short)
|
||||
dig_status_code=$?
|
||||
if [[ $dig_status_code = 0 && -n $dig_result ]]; then
|
||||
echo "Statediff DB at $CERC_STATEDIFF_DB_HOST"
|
||||
CERC_RUN_STATEDIFF="true"
|
||||
else
|
||||
|
||||
@@ -27,4 +27,8 @@ RUN cd /opt/testnet && make genesis-cl
|
||||
# Work around some bugs in lcli where the default path is always used.
|
||||
RUN mkdir -p /root/.lighthouse && cd /root/.lighthouse && ln -s /opt/testnet/build/cl/testnet
|
||||
|
||||
RUN mkdir -p /scripts
|
||||
COPY scripts/status-internal.sh /scripts
|
||||
COPY scripts/status.sh /scripts
|
||||
|
||||
ENTRYPOINT ["/opt/testnet/run.sh"]
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
# Wrapper to facilitate using status.sh inside the container
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
export LIGHTHOUSE_BASE_URL="http://fixturenet-eth-lighthouse-1:8001"
|
||||
export GETH_BASE_URL="http://fixturenet-eth-geth-1:8545"
|
||||
# See: https://stackoverflow.com/a/246128/1701505
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
$SCRIPT_DIR/status.sh
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#!/usr/bin/env bash
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge")
|
||||
STATUS=0
|
||||
|
||||
@@ -7,6 +9,8 @@ STATUS=0
|
||||
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
|
||||
GETH_BASE_URL=${GETH_BASE_URL}
|
||||
|
||||
# TODO: Docker commands below should be replaced by some interface into stack orchestrator
|
||||
# or some execution environment-neutral mechanism.
|
||||
if [ -z "$LIGHTHOUSE_BASE_URL" ]; then
|
||||
LIGHTHOUSE_CONTAINER=`docker ps -q -f "name=fixturenet-eth-lighthouse-1-1"`
|
||||
LIGHTHOUSE_PORT=`docker port $LIGHTHOUSE_CONTAINER 8001 | cut -d':' -f2`
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# Use locally build foundry base image to work around there being
|
||||
# no aarm64 image published.
|
||||
FROM foundry-rs/foundry:local
|
||||
FROM ghcr.io/foundry-rs/foundry
|
||||
|
||||
RUN apk update ; apk add --no-cache --allow-untrusted ca-certificates curl bash git jq
|
||||
RUN apk add --no-cache --upgrade grep
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# fixturenet-eth
|
||||
|
||||
A "loaded" version of fixturenet-eth, with all the bells and whistles enabled.
|
||||
|
||||
TODO: write me
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
version: "1.0"
|
||||
name: fixturenet-eth-loaded
|
||||
decription: "Loaded Ethereum Fixturenet"
|
||||
repos:
|
||||
- cerc-io/go-ethereum
|
||||
- cerc-io/tx-spammer
|
||||
- cerc-io/ipld-eth-server
|
||||
- cerc-io/ipld-eth-db
|
||||
- cerc/go-ethereum
|
||||
containers:
|
||||
- cerc/lighthouse
|
||||
- cerc/fixturenet-eth-geth
|
||||
- cerc/fixturenet-eth-lighthouse
|
||||
- cerc/ipld-eth-server
|
||||
- cerc/ipld-eth-db
|
||||
- cerc/keycloak
|
||||
- cerc/tx-spammer
|
||||
pods:
|
||||
- fixturenet-eth
|
||||
- tx-spammer
|
||||
- fixturenet-eth-metrics
|
||||
- keycloak
|
||||
- ipld-eth-server
|
||||
- ipld-eth-db
|
||||
@@ -4,12 +4,12 @@ Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" f
|
||||
|
||||
## Clone required repositories
|
||||
```
|
||||
$ laconic-so setup-repositories --include cerc-io/go-ethereum
|
||||
$ laconic-so --stack fixturenet-eth setup-repositories
|
||||
```
|
||||
|
||||
## Build the fixturenet-eth containers
|
||||
```
|
||||
$ laconic-so build-containers --include cerc/go-ethereum,cerc/lighthouse,cerc/fixturenet-eth-geth,cerc/fixturenet-eth-lighthouse
|
||||
$ laconic-so --stack fixturenet-eth build-containers
|
||||
```
|
||||
This should create several container images in the local image registry:
|
||||
|
||||
@@ -20,7 +20,7 @@ This should create several container images in the local image registry:
|
||||
|
||||
## Deploy the stack
|
||||
```
|
||||
$ laconic-so deploy-system --include fixturenet-eth up
|
||||
$ laconic-so --stack fixturenet-eth deploy-system up
|
||||
```
|
||||
|
||||
## Check status
|
||||
|
||||
@@ -3,10 +3,11 @@ name: fixturenet-eth
|
||||
decription: "Ethereum Fixturenet"
|
||||
repos:
|
||||
- cerc-io/go-ethereum
|
||||
- cerc-io/tx-spammer
|
||||
containers:
|
||||
- cerc/go-ethereum
|
||||
- cerc/lighthouse
|
||||
- cerc/fixturenet-eth-geth
|
||||
- cerc/fixturenet-eth-lighthouse
|
||||
pods:
|
||||
- fixturenet-eth
|
||||
- fixturenet-eth
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# This file should be re-generated running: scripts/update-version-file.sh script
|
||||
v1.0.13-alpha-8b19e0f
|
||||
v1.0.18-3bd0c74
|
||||
|
||||
+16
-1
@@ -37,6 +37,7 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
|
||||
# TODO: implement option exclusion and command value constraint lost with the move from argparse to click
|
||||
|
||||
debug = ctx.obj.debug
|
||||
quiet = ctx.obj.quiet
|
||||
verbose = ctx.obj.verbose
|
||||
dry_run = ctx.obj.dry_run
|
||||
@@ -91,6 +92,8 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
|
||||
if not dry_run:
|
||||
if command == "up":
|
||||
if debug:
|
||||
os.environ["CERC_SCRIPT_DEBUG"] = "true"
|
||||
if verbose:
|
||||
print(f"Running compose up for extra_args: {extra_args_list}")
|
||||
docker.compose.up(detach=True, services=extra_args_list)
|
||||
@@ -98,6 +101,18 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
if verbose:
|
||||
print("Running compose down")
|
||||
docker.compose.down()
|
||||
elif command == "exec":
|
||||
if extra_args_list is None or len(extra_args_list) < 2:
|
||||
print("Usage: exec <service> <cmd>")
|
||||
sys.exit(1)
|
||||
service_name = extra_args_list[0]
|
||||
command_to_exec = extra_args_list[1:]
|
||||
container_exec_env = {
|
||||
"CERC_SCRIPT_DEBUG": "true"
|
||||
} if debug else {}
|
||||
if verbose:
|
||||
print(f"Running compose exec {service_name} {command_to_exec}")
|
||||
docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)
|
||||
elif command == "port":
|
||||
if extra_args_list is None or len(extra_args_list) < 2:
|
||||
print("Usage: port <service> <exposed-port>")
|
||||
@@ -105,7 +120,7 @@ def command(ctx, include, exclude, cluster, command, extra_args):
|
||||
service_name = extra_args_list[0]
|
||||
exposed_port = extra_args_list[1]
|
||||
if verbose:
|
||||
print("Running compose port")
|
||||
print(f"Running compose port {service_name} {exposed_port}")
|
||||
mapped_port_data = docker.compose.port(service_name, exposed_port)
|
||||
print(f"{mapped_port_data[0]}:{mapped_port_data[1]}")
|
||||
elif command == "ps":
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
# Release Process
|
||||
|
||||
## Manually publish to github releases
|
||||
|
||||
In order to build, the shiv and wheel packages must be installed:
|
||||
```
|
||||
$ pip install shiv
|
||||
$ pip install wheel
|
||||
```
|
||||
|
||||
Then:
|
||||
|
||||
1. Define `CERC_GH_RELEASE_SCRIPTS_DIR`
|
||||
1. Define `CERC_PACKAGE_RELEASE_GITHUB_TOKEN`
|
||||
1. Run `./scripts/tag_new_release.sh <major> <minor> <patch>`
|
||||
1. Run `./scripts/build_shiv_package.sh`
|
||||
1. Run `./scripts/publish_shiv_package_github.sh <major> <minor> <patch>`
|
||||
1. Commit the new version file.
|
||||
|
||||
e.g.
|
||||
|
||||
```
|
||||
$ export CERC_GH_RELEASE_SCRIPTS_DIR=~/projects/cerc/github-release-api/
|
||||
$ export CERC_PACKAGE_RELEASE_GITHUB_TOKEN=github_pat_xxxxxx
|
||||
$ ./scripts/tag_new_release.sh 1 0 17
|
||||
$ ./scripts/build_shiv_package.sh
|
||||
$ ./scripts/publish_shiv_package_github.sh 1 0 17
|
||||
```
|
||||
|
||||
@@ -12,19 +12,29 @@
|
||||
# ./scripts/publish_shiv_package_github.sh
|
||||
# In addition, a valid GitHub token must be defined in
|
||||
# CERC_PACKAGE_RELEASE_GITHUB_TOKEN
|
||||
if [[ -z "${CERC_PACKAGE_RELEASE_GITHUB_TOKEN}" ]]; then
|
||||
echo "CERC_PACKAGE_RELEASE_GITHUB_TOKEN is not set" >&2
|
||||
exit 1
|
||||
fi
|
||||
# TODO: check args and env vars
|
||||
major=$1
|
||||
minor=$2
|
||||
patch=$3
|
||||
export PATH=$CERC_GH_RELEASE_SCRIPTS_DIR:$PATH
|
||||
git_tag_manager.sh -M ${major} -m ${minor} -p ${patch} -t "Release ${major}.${minor}.${patch}"
|
||||
github_org="cerc-io"
|
||||
github_repository="stack-orchestrator"
|
||||
latest_package=$(ls -1t ./package/* | head -1)
|
||||
uploaded_package="./package/laconic-so"
|
||||
# Remove any old package
|
||||
rm ${uploaded_package}
|
||||
cp ${latest_package} ${uploaded_package}
|
||||
github_release_manager.sh \
|
||||
-l david@bozemanpass.com -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
|
||||
-o cerc-io -r stack-orchestrator \
|
||||
-l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
|
||||
-o ${github_org} -r ${github_repository} \
|
||||
-d v${major}.${minor}.${patch} \
|
||||
-c create
|
||||
-c create -m "Release v${major}.${minor}.${patch}"
|
||||
github_release_manager.sh \
|
||||
-l david@bozemanpass.com -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
|
||||
-o cerc-io -r stack-orchestrator \
|
||||
-l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
|
||||
-o ${github_org} -r ${github_repository} \
|
||||
-d v${major}.${minor}.${patch} \
|
||||
-c upload ./package/laconic-so
|
||||
-c upload ${uploaded_package}
|
||||
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: tag_new_release.sh <major> <minor> <patch>
|
||||
# Uses this script package to tag a new release:
|
||||
# User must define: CERC_GH_RELEASE_SCRIPTS_DIR
|
||||
# pointing to the location of that cloned repository
|
||||
# e.g.
|
||||
# cd ~/projects
|
||||
# git clone https://github.com/cerc-io/github-release-api
|
||||
# cd ./stack-orchestrator
|
||||
# export CERC_GH_RELEASE_SCRIPTS_DIR=~/projects/github-release-api
|
||||
# ./scripts/publish_shiv_package_github.sh
|
||||
# TODO: check args and env vars
|
||||
major=$1
|
||||
minor=$2
|
||||
patch=$3
|
||||
export PATH=$CERC_GH_RELEASE_SCRIPTS_DIR:$PATH
|
||||
git_tag_manager.sh -M ${major} -m ${minor} -p ${patch} -t "Release ${major}.${minor}.${patch}"
|
||||
Reference in New Issue
Block a user