Compare commits

..
17 Commits
Author SHA1 Message Date
dboreham ce7e5f2d82 Merge pull request #169 from cerc-io/dboreham/fix-gerbil-package-install
Install gerbil packages globally not locally in the project directory

Former-commit-id: db5775621d
2023-01-28 11:35:44 -07:00
dboreham 4dda8e2a87 Install gerbil packages globally not locally in the project directory
Former-commit-id: 5928e40721
2023-01-28 18:56:43 +01:00
dboreham 24ab259741 Merge pull request #167 from cerc-io/dboreham/release-doc
Add release process doc

Former-commit-id: 605a9aeda1
2023-01-27 22:25:53 -07:00
David Boreham 607575e4f4 Add release process doc
Former-commit-id: 1b3a14d86f
2023-01-27 21:22:43 -07:00
dboreham 86e245e272 Merge pull request #166 from cerc-io/dboreham/fix-fixturenet-status
Fix status script

Former-commit-id: fc31b44b5a
2023-01-27 08:10:32 -07:00
dboreham d677e5f369 Fix status script
Former-commit-id: 5a3bdd269d
2023-01-27 08:10:04 -07:00
dboreham 9991baa8d6 Update version
Former-commit-id: 04f61293b5
2023-01-27 07:30:14 -07:00
dboreham d033d4ff93 Merge pull request #164 from cerc-io/dboreham/fixturenet-eth-fixes
Fixes to fixturenet-eth

Former-commit-id: ecf943b593
2023-01-26 21:36:23 -07:00
dboreham f02bbee3bf Fixes to fixturenet-eth
Former-commit-id: e4229e4ceb
2023-01-26 16:47:06 -07:00
telackey bdde1b2c9e Include all eth API operation metrics. (#162)
Former-commit-id: ce0c7ee9ba
2023-01-26 13:53:02 -06:00
dboreham 96a83422e7 Merge pull request #161 from cerc-io/dboreham/run-command-in-container
Exec command inside container

Former-commit-id: 6770f7af6e
2023-01-25 23:22:57 -07:00
dboreham af03208da7 Exec command inside container
Former-commit-id: ade20fb2f5
2023-01-25 23:22:05 -07:00
dboreham 86e2407800 Update version
Former-commit-id: bf91048dbb
2023-01-25 22:47:08 -07:00
dboreham c01ff28b4f Add release description
Former-commit-id: a520cce17c
2023-01-25 22:46:37 -07:00
dboreham ec54258285 Merge pull request #159 from cerc-io/dboreham/enhanced-publish-script
Better publish scripts

Former-commit-id: e1421045eb
2023-01-25 22:40:24 -07:00
dboreham 1f2ee33b42 Update version
Former-commit-id: 0b08d7ba65
2023-01-25 22:38:25 -07:00
dboreham a2b700727c Better publish scripts
Former-commit-id: 7fdf9bc4db
2023-01-25 22:37:43 -07:00
16 changed files with 488 additions and 57 deletions
@@ -20,6 +20,7 @@ services:
CERC_REMOTE_DEBUG: "true" CERC_REMOTE_DEBUG: "true"
CERC_RUN_STATEDIFF: "detect" CERC_RUN_STATEDIFF: "detect"
CERC_STATEDIFF_DB_NODE_ID: 1 CERC_STATEDIFF_DB_NODE_ID: 1
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
env_file: env_file:
- ../config/fixturenet-eth/fixturenet-eth.env - ../config/fixturenet-eth/fixturenet-eth.env
image: cerc/fixturenet-eth-geth:local image: cerc/fixturenet-eth-geth:local
@@ -326,8 +326,9 @@
"uid": "jZUuGao4k" "uid": "jZUuGao4k"
}, },
"editorMode": "code", "editorMode": "code",
"expr": "rate(rpc_duration_eth_call_success_count{instance=\"${node}:6060\"}[$__rate_interval])", "expr": "rate(rpc_duration_eth_blockNumber_success_count{instance=\"${node}:6060\"}[$__rate_interval])",
"legendFormat": "eth_call", "hide": false,
"legendFormat": "eth_blockNumber",
"range": true, "range": true,
"refId": "A" "refId": "A"
}, },
@@ -337,48 +338,12 @@
"uid": "jZUuGao4k" "uid": "jZUuGao4k"
}, },
"editorMode": "code", "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, "hide": false,
"legendFormat": "eth_getBlocksByHash", "legendFormat": "eth_call",
"range": true, "range": true,
"refId": "B" "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": { "datasource": {
"type": "prometheus", "type": "prometheus",
@@ -389,8 +354,356 @@
"hide": false, "hide": false,
"legendFormat": "eth_chainId", "legendFormat": "eth_chainId",
"range": true, "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" "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": { "datasource": {
"type": "prometheus", "type": "prometheus",
@@ -401,7 +714,19 @@
"hide": false, "hide": false,
"legendFormat": "statediff_writeStateDiffFor", "legendFormat": "statediff_writeStateDiffFor",
"range": true, "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", "title": "geth API Requests/sec",
@@ -19,3 +19,5 @@ CERC_STATEDIFF_DB_USER="vdbm"
CERC_STATEDIFF_DB_PASSWORD="password" CERC_STATEDIFF_DB_PASSWORD="password"
CERC_STATEDIFF_DB_GOOSE_MIN_VER=23 CERC_STATEDIFF_DB_GOOSE_MIN_VER=23
CERC_STATEDIFF_DB_LOG_STATEMENTS="false" 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 RUN mkdir /scripts
COPY install-dependencies.sh /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 RUN bash /scripts/install-dependencies.sh
# Needed to prevent git from raging about /src # Needed to prevent git from raging about /src
@@ -10,6 +10,7 @@ DEPS=(github.com/fare/gerbil-utils
github.com/vyzo/gerbil-libp2p github.com/vyzo/gerbil-libp2p
) ; ) ;
for i in ${DEPS[@]} ; do for i in ${DEPS[@]} ; do
echo "Installing gerbil package: $i"
gxpkg install $i && gxpkg install $i &&
gxpkg build $i gxpkg build $i
done done
@@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
ETHERBASE=`cat /opt/testnet/build/el/accounts.csv | head -1 | cut -d',' -f2` 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 }'` 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}'` 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 echo -n "$JWT" > /opt/testnet/build/el/jwtsecret
if [ "$CERC_RUN_STATEDIFF" == "detect" ] && [ -n "$CERC_STATEDIFF_DB_HOST" ]; then 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" echo "Statediff DB at $CERC_STATEDIFF_DB_HOST"
CERC_RUN_STATEDIFF="true" CERC_RUN_STATEDIFF="true"
else 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. # 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 /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"] ENTRYPOINT ["/opt/testnet/run.sh"]
@@ -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") STATUSES=("geth to generate DAG" "beacon phase0" "beacon altair" "beacon bellatrix pre-merge" "beacon bellatrix merge")
STATUS=0 STATUS=0
@@ -7,6 +9,8 @@ STATUS=0
LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL} LIGHTHOUSE_BASE_URL=${LIGHTHOUSE_BASE_URL}
GETH_BASE_URL=${GETH_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 if [ -z "$LIGHTHOUSE_BASE_URL" ]; then
LIGHTHOUSE_CONTAINER=`docker ps -q -f "name=fixturenet-eth-lighthouse-1-1"` LIGHTHOUSE_CONTAINER=`docker ps -q -f "name=fixturenet-eth-lighthouse-1-1"`
LIGHTHOUSE_PORT=`docker port $LIGHTHOUSE_CONTAINER 8001 | cut -d':' -f2` LIGHTHOUSE_PORT=`docker port $LIGHTHOUSE_CONTAINER 8001 | cut -d':' -f2`
+3 -3
View File
@@ -4,12 +4,12 @@ Instructions for deploying a local a geth + lighthouse blockchain "fixturenet" f
## Clone required repositories ## Clone required repositories
``` ```
$ laconic-so setup-repositories --include cerc-io/go-ethereum $ laconic-so --stack fixturenet-eth setup-repositories
``` ```
## Build the fixturenet-eth containers ## 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: 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 ## Deploy the stack
``` ```
$ laconic-so deploy-system --include fixturenet-eth up $ laconic-so --stack fixturenet-eth deploy-system up
``` ```
## Check status ## Check status
+1
View File
@@ -3,6 +3,7 @@ name: fixturenet-eth
decription: "Ethereum Fixturenet" decription: "Ethereum Fixturenet"
repos: repos:
- cerc-io/go-ethereum - cerc-io/go-ethereum
- cerc-io/tx-spammer
containers: containers:
- cerc/go-ethereum - cerc/go-ethereum
- cerc/lighthouse - cerc/lighthouse
+1 -1
View File
@@ -1,2 +1,2 @@
# This file should be re-generated running: scripts/update-version-file.sh script # This file should be re-generated running: scripts/update-version-file.sh script
v1.0.13-alpha-8b19e0f v1.0.16-ecf943b
+16 -1
View File
@@ -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 # TODO: implement option exclusion and command value constraint lost with the move from argparse to click
debug = ctx.obj.debug
quiet = ctx.obj.quiet quiet = ctx.obj.quiet
verbose = ctx.obj.verbose verbose = ctx.obj.verbose
dry_run = ctx.obj.dry_run dry_run = ctx.obj.dry_run
@@ -91,6 +92,8 @@ def command(ctx, include, exclude, cluster, command, extra_args):
if not dry_run: if not dry_run:
if command == "up": if command == "up":
if debug:
os.environ["CERC_SCRIPT_DEBUG"] = "true"
if verbose: if verbose:
print(f"Running compose up for extra_args: {extra_args_list}") print(f"Running compose up for extra_args: {extra_args_list}")
docker.compose.up(detach=True, services=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: if verbose:
print("Running compose down") print("Running compose down")
docker.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": elif command == "port":
if extra_args_list is None or len(extra_args_list) < 2: if extra_args_list is None or len(extra_args_list) < 2:
print("Usage: port <service> <exposed-port>") 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] service_name = extra_args_list[0]
exposed_port = extra_args_list[1] exposed_port = extra_args_list[1]
if verbose: 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) mapped_port_data = docker.compose.port(service_name, exposed_port)
print(f"{mapped_port_data[0]}:{mapped_port_data[1]}") print(f"{mapped_port_data[0]}:{mapped_port_data[1]}")
elif command == "ps": elif command == "ps":
+29
View File
@@ -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
```
+17 -7
View File
@@ -12,19 +12,29 @@
# ./scripts/publish_shiv_package_github.sh # ./scripts/publish_shiv_package_github.sh
# In addition, a valid GitHub token must be defined in # In addition, a valid GitHub token must be defined in
# CERC_PACKAGE_RELEASE_GITHUB_TOKEN # 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 # TODO: check args and env vars
major=$1 major=$1
minor=$2 minor=$2
patch=$3 patch=$3
export PATH=$CERC_GH_RELEASE_SCRIPTS_DIR:$PATH 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 \ github_release_manager.sh \
-l david@bozemanpass.com -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \ -l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
-o cerc-io -r stack-orchestrator \ -o ${github_org} -r ${github_repository} \
-d v${major}.${minor}.${patch} \ -d v${major}.${minor}.${patch} \
-c create -c create -m "Release v${major}.${minor}.${patch}"
github_release_manager.sh \ github_release_manager.sh \
-l david@bozemanpass.com -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \ -l notused -t ${CERC_PACKAGE_RELEASE_GITHUB_TOKEN} \
-o cerc-io -r stack-orchestrator \ -o ${github_org} -r ${github_repository} \
-d v${major}.${minor}.${patch} \ -d v${major}.${minor}.${patch} \
-c upload ./package/laconic-so -c upload ${uploaded_package}
+17
View File
@@ -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}"