From f63563f2300bb4d802210ec6da5400ffe1b999f2 Mon Sep 17 00:00:00 2001 From: kexkey Date: Sun, 16 Aug 2020 13:08:29 -0400 Subject: [PATCH 1/4] Upgraded Spark Wallet to v0.2.16 --- sparkwallet/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparkwallet/docker-compose.yaml b/sparkwallet/docker-compose.yaml index f80709a..834bfe1 100644 --- a/sparkwallet/docker-compose.yaml +++ b/sparkwallet/docker-compose.yaml @@ -3,7 +3,7 @@ version: "3" services: cyphernode_sparkwallet: command: --no-tls ${TOR_PARAMS} - image: cyphernode/sparkwallet:v0.2.12 + image: cyphernode/sparkwallet:v0.2.16 environment: - "NETWORK=${NETWORK}" volumes: From e1cbb43565a7d45baef6e17f9af6ce74dffe1741 Mon Sep 17 00:00:00 2001 From: kexkey Date: Tue, 25 Aug 2020 18:22:10 -0400 Subject: [PATCH 2/4] Batcher cypherapp --- batcher/data/config.json | 18 +++++++++++++++++ batcher/docker-compose.yaml | 25 +++++++++++++++++++++++ batcher/isCoreApp | 0 batcher/test.sh | 40 +++++++++++++++++++++++++++++++++++++ 4 files changed, 83 insertions(+) create mode 100644 batcher/data/config.json create mode 100644 batcher/docker-compose.yaml create mode 100644 batcher/isCoreApp create mode 100644 batcher/test.sh diff --git a/batcher/data/config.json b/batcher/data/config.json new file mode 100644 index 0000000..e9f1394 --- /dev/null +++ b/batcher/data/config.json @@ -0,0 +1,18 @@ +{ + "LOG": "DEBUG", + "BASE_DIR": "/batcher", + "DATA_DIR": "data", + "DB_NAME": "batcher.sqlite", + "URL_SERVER": "http://batcher", + "URL_PORT": 8000, + "URL_CTX_WEBHOOKS": "webhooks", + "SESSION_TIMEOUT": 600, + "CN_URL": "https://gatekeeper:2009/v0", + "CN_API_ID": "003", + "CN_API_KEY": "39b83c35972aeb81a242bfe189dc0a22da5ac6cbb64072b492f2d46519a97618", + "DEFAULT_BATCHER_ID": 1, + "BATCH_TIMEOUT_MINUTES": 60, + "CHECK_THRESHOLD_MINUTES": 10, + "BATCH_THRESHOLD_AMOUNT": 0.5, + "BATCH_CONF_TARGET": 6 +} diff --git a/batcher/docker-compose.yaml b/batcher/docker-compose.yaml new file mode 100644 index 0000000..5b6d943 --- /dev/null +++ b/batcher/docker-compose.yaml @@ -0,0 +1,25 @@ +version: "3" + +services: + batcher: + environment: + - "TRACING=1" + - "CYPHERNODE_URL=https://gatekeeper:${GATEKEEPER_PORT}" + image: cyphernode/batcher:v0.1.0 + entrypoint: ["npm", "run", "start:dev"] + volumes: + - "$APP_SCRIPT_PATH/data:/batcher/data" + - "$GATEKEEPER_DATAPATH/certs/cert.pem:/batcher/cert.pem:ro" + networks: + - cyphernodeappsnet + restart: always + labels: + - "traefik.docker.network=cyphernodeappsnet" + - "traefik.frontend.rule=PathPrefixStrip:/batcher" + - "traefik.frontend.passHostHeader=true" + - "traefik.enable=true" + - "traefik.port=8000" + - "traefik.frontend.auth.basic.users=" +networks: + cyphernodeappsnet: + external: true diff --git a/batcher/isCoreApp b/batcher/isCoreApp new file mode 100644 index 0000000..e69de29 diff --git a/batcher/test.sh b/batcher/test.sh new file mode 100644 index 0000000..e001df3 --- /dev/null +++ b/batcher/test.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +timeout_feature() { + local interval=10 + local totaltime=60 + local testwhat=${1} + local returncode + local endtime=$(($(date +%s) + ${totaltime})) + + while : + do + eval ${testwhat} + returncode=$? + + # If no error or 2 minutes passed, we get out of this loop + ([ "${returncode}" -eq "0" ] || [ $(date +%s) -gt ${endtime} ]) && break + + printf "\e[1;31mMaybe it's too early, I'll retry every ${interval} seconds for $((${totaltime} / 60)) minutes ($((${endtime} - $(date +%s))) seconds left).\e[1;0m\r\n" + + sleep ${interval} + done + + return ${returncode} +} + +do_test() { + local rc + rc=$(curl -k -s -o /dev/null -w "%{http_code}" https://127.0.0.1:${TRAEFIK_HTTPS_PORT}/batcher) + [ "${rc}" -ne "401" ] && return 400 + return 0 +} + +export TRAEFIK_HTTPS_PORT + +timeout_feature do_test +returncode=$? + +# return 0: tests cool +# return 1: tests failed +return $returncode From f57832d305b181dcfb79b3c09cf90d0fbb751c4d Mon Sep 17 00:00:00 2001 From: kexkey Date: Fri, 2 Oct 2020 12:25:26 -0400 Subject: [PATCH 3/4] v0.5.0-rc.1 --- batcher/docker-compose.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/batcher/docker-compose.yaml b/batcher/docker-compose.yaml index 5b6d943..fed9bba 100644 --- a/batcher/docker-compose.yaml +++ b/batcher/docker-compose.yaml @@ -5,11 +5,12 @@ services: environment: - "TRACING=1" - "CYPHERNODE_URL=https://gatekeeper:${GATEKEEPER_PORT}" - image: cyphernode/batcher:v0.1.0 + image: cyphernode/batcher:v0.1.0-rc.1 entrypoint: ["npm", "run", "start:dev"] volumes: - "$APP_SCRIPT_PATH/data:/batcher/data" - "$GATEKEEPER_DATAPATH/certs/cert.pem:/batcher/cert.pem:ro" + - "$LOGS_DATAPATH:/batcher/logs" networks: - cyphernodeappsnet restart: always From 0e70ad71649b444e945946e16c2e86863062a4b7 Mon Sep 17 00:00:00 2001 From: kexkey Date: Fri, 16 Oct 2020 11:32:02 -0400 Subject: [PATCH 4/4] v0.5.0 final --- batcher/docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batcher/docker-compose.yaml b/batcher/docker-compose.yaml index fed9bba..4f82fa6 100644 --- a/batcher/docker-compose.yaml +++ b/batcher/docker-compose.yaml @@ -5,7 +5,7 @@ services: environment: - "TRACING=1" - "CYPHERNODE_URL=https://gatekeeper:${GATEKEEPER_PORT}" - image: cyphernode/batcher:v0.1.0-rc.1 + image: cyphernode/batcher:v0.1.0 entrypoint: ["npm", "run", "start:dev"] volumes: - "$APP_SCRIPT_PATH/data:/batcher/data"