Releases/v0.2.4 (#131)

* v0.2.4-rc.1

* OTS patch (npm) for it to compile on aarch64

* Healthchecker was sometimes restarting bitcoin container

* v0.2.4-rc.2

* v0.2.4
This commit is contained in:
kexkey
2019-09-30 08:46:17 -04:00
committed by GitHub
parent 08289c9e1a
commit 9a16f888ba
8 changed files with 218 additions and 87 deletions

View File

@@ -2,17 +2,17 @@
TRACING=1
# CYPHERNODE VERSION "v0.2.3"
CONF_VERSION="v0.2.3-local"
GATEKEEPER_VERSION="v0.2.3-local"
PROXY_VERSION="v0.2.3-local"
NOTIFIER_VERSION="v0.2.3-local"
PROXYCRON_VERSION="v0.2.3-local"
OTSCLIENT_VERSION="v0.2.3-local"
PYCOIN_VERSION="v0.2.3-local"
# CYPHERNODE VERSION "v0.2.4"
CONF_VERSION="v0.2.4-local"
GATEKEEPER_VERSION="v0.2.4-local"
PROXY_VERSION="v0.2.4-local"
NOTIFIER_VERSION="v0.2.4-local"
PROXYCRON_VERSION="v0.2.4-local"
OTSCLIENT_VERSION="v0.2.4-local"
PYCOIN_VERSION="v0.2.4-local"
BITCOIN_VERSION="v0.18.0"
LIGHTNING_VERSION="v0.7.1"
GRAFANA_VERSION="v0.2.3-local"
GRAFANA_VERSION="v0.2.4-local"
trace()
{

View File

@@ -1,5 +1,5 @@
#!/bin/sh
VERSION=v0.2.3
VERSION=v0.2.4
docker build . -t cyphernode/cyphernodeconf:${VERSION}
docker build . -t cyphernode/cyphernodeconf:${VERSION}

View File

@@ -3,16 +3,16 @@
export SETUP_DIR=$(pwd)/../dist
export DEFAULT_USER=$USER
export DEFAULT_CERT_HOSTNAME=disk0book.local
export PROXYCRON_VERSION=v0.2.3
export PYCOIN_VERSION=v0.2.3
export SETUP_VERSION=v0.2.3
export PROXYCRON_VERSION=v0.2.4
export PYCOIN_VERSION=v0.2.4
export SETUP_VERSION=v0.2.4
export BITCOIN_VERSION=v0.18.0
export LIGHTNING_VERSION=v0.7.1
export DEFAULT_DATADIR_BASE=$HOME
export GATEKEEPER_VERSION=v0.2.3
export PROXY_VERSION=v0.2.3
export OTSCLIENT_VERSION=v0.2.3
export NOTIFIER_VERSION=v0.2.3
export GATEKEEPER_VERSION=v0.2.4
export PROXY_VERSION=v0.2.4
export OTSCLIENT_VERSION=v0.2.4
export NOTIFIER_VERSION=v0.2.4
export EDITOR=/usr/bin/nano
user=$(id -u):$(id -g)
@@ -40,4 +40,3 @@ if [ "${MODE}" = 'docker' ]; then
else
/usr/local/bin/node index.js $@
fi

View File

@@ -20,9 +20,9 @@ services:
- bitcoin_monitor:/bitcoin_monitor
healthcheck:
test: bitcoin-cli echo && touch /bitcoin_monitor/up || rm -f /bitcoin_monitor/up
interval: 10s
interval: 20s
timeout: 5s
retries: 1
retries: 10
networks:
- cyphernodenet
restart: always

18
dist/setup.sh vendored
View File

@@ -720,15 +720,15 @@ ALWAYSYES=0
SUDO_REQUIRED=0
AUTOSTART=0
# CYPHERNODE VERSION "v0.2.3"
SETUP_VERSION="v0.2.3"
CONF_VERSION="v0.2.3"
GATEKEEPER_VERSION="v0.2.3"
PROXY_VERSION="v0.2.3"
NOTIFIER_VERSION="v0.2.3"
PROXYCRON_VERSION="v0.2.3"
OTSCLIENT_VERSION="v0.2.3"
PYCOIN_VERSION="v0.2.3"
# CYPHERNODE VERSION "v0.2.4"
SETUP_VERSION="v0.2.4"
CONF_VERSION="v0.2.4"
GATEKEEPER_VERSION="v0.2.4"
PROXY_VERSION="v0.2.4"
NOTIFIER_VERSION="v0.2.4"
PROXYCRON_VERSION="v0.2.4"
OTSCLIENT_VERSION="v0.2.4"
PYCOIN_VERSION="v0.2.4"
CYPHERAPPS_VERSION="v0.2.2"
BITCOIN_VERSION="v0.18.0"
LIGHTNING_VERSION="v0.7.1"

View File

@@ -67,7 +67,7 @@ arch_docker=${x86_docker}
v1="v0"
v2="v0.2"
v3="v0.2.3"
v3="v0.2.4"
echo "\nBuilding Cyphernode Core containers\n"
echo "arch_docker=$arch_docker\n"
@@ -95,4 +95,3 @@ manifest "gatekeeper" \
&& manifest "cyphernodeconf"
[ $? -ne 0 ] && echo "Error" && exit 1

View File

@@ -2,29 +2,38 @@ version: "3"
services:
gatekeeper:
# HTTP authentication API gate
environment:
- "TRACING=1"
image: cyphernode/gatekeeper:latest
ports:
- "443:443"
##########################
# BITCOIN #
##########################
bitcoin:
image: cyphernode/bitcoin:v0.18.0
command: $USER bitcoind
volumes:
- "~/cn-files/cn-gatekeeper/certs:/etc/ssl/certs"
- "~/cn-files/cn-gatekeeper/private:/etc/ssl/private"
- "~/cn-files/cn-gatekeeper/keys.properties:/etc/nginx/conf.d/keys.properties"
- "~/cn-files/cn-gatekeeper/api.properties:/etc/nginx/conf.d/api.properties"
command: $USER
# deploy:
# placement:
# constraints: [node.hostname==dev]
- "~/btcdata:/.bitcoin"
- bitcoin_monitor:/bitcoin_monitor
healthcheck:
test: bitcoin-cli echo && touch /bitcoin_monitor/up || rm -f /bitcoin_monitor/up
interval: 10s
timeout: 5s
retries: 1
networks:
- cyphernodenet
restart: always
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# PROXY #
##########################
proxy:
image: cyphernode/proxy:v0.2.4-local
command: $USER ./startproxy.sh
# Bitcoin Mini Proxy
environment:
- "TRACING=1"
- "WATCHER_BTC_NODE_RPC_URL=bitcoin:18332/wallet"
@@ -40,86 +49,207 @@ services:
- "DB_PATH=/proxy/db"
- "DB_FILE=/proxy/db/proxydb"
- "PYCOIN_CONTAINER=pycoin:7777"
- "WATCHER_BTC_NODE_PRUNED=false"
- "OTSCLIENT_CONTAINER=otsclient:6666"
- "OTS_FILES=/proxy/otsfiles"
- "XPUB_DERIVATION_GAP=100"
image: cyphernode/proxy:latest
volumes:
- "~/cn-files/cn-proxydb:/proxy/db"
- "~/cn-files/cn-lndata:/.lightning"
- "~/cn-files/cn-otsfiles:/proxy/otsfiles"
# deploy:
# placement:
# constraints: [node.hostname==dev]
- "~/cn-dev/dist/cyphernode/proxy:/proxy/db"
- "~/cn-dev/dist/cyphernode/lightning:/.lightning"
- "~/cn-dev/dist/cyphernode/otsclient:/proxy/otsfiles"
networks:
- cyphernodenet
restart: always
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# PROXYCRON #
##########################
proxycron:
image: cyphernode/proxycron:v0.2.4-local
environment:
- "PROXY_URL=proxy:8888/executecallbacks"
image: cyphernode/proxycron:latest
# deploy:
# placement:
# constraints: [node.hostname==dev]
- "TX_CONF_URL=proxy:8888/executecallbacks"
- "OTS_URL=proxy:8888/ots_backoffice"
networks:
- cyphernodenet
restart: always
depends_on:
- proxy
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# BROKER #
##########################
broker:
image: eclipse-mosquitto:1.6
networks:
- cyphernodenet
restart: always
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# NOTIFIER #
##########################
notifier:
image: cyphernode/notifier:v0.2.4-local
command: $USER ./startnotifier.sh
networks:
- cyphernodenet
- cyphernodeappsnet
restart: always
depends_on:
- broker
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# PYCOIN #
##########################
pycoin:
# Pycoin
image: cyphernode/pycoin:v0.2.4-local
command: $USER ./startpycoin.sh
image: cyphernode/pycoin:latest
environment:
- "TRACING=1"
- "PYCOIN_LISTENING_PORT=7777"
# deploy:
# placement:
# constraints: [node.hostname==dev]
networks:
- cyphernodenet
restart: always
lightning:
command: $USER lightningd
image: cyphernode/clightning:latest
volumes:
- "~/cn-files/cn-lndata:/.lightning"
- "~/cn-files/cn-lndata/bitcoin.conf:/.bitcoin/bitcoin.conf"
# deploy:
# placement:
# constraints: [node.hostname==dev]
networks:
- cyphernodenet
restart: always
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# OTSCLIENT #
##########################
otsclient:
image: cyphernode/otsclient:v0.2.4-local
command: $USER /script/startotsclient.sh
environment:
- "TRACING=1"
- "OTSCLIENT_LISTENING_PORT=6666"
image: cyphernode/otsclient:latest
# deploy:
# placement:
# constraints: [node.hostname==dev]
- "TESTNET=1"
volumes:
- "~/cn-files/cn-otsfiles:/otsfiles"
- "~/cn-files/cn-otsfiles/bitcoin.conf:/.bitcoin/bitcoin.conf"
- "~/cn-dev/dist/cyphernode/otsclient:/otsfiles"
- "~/btcdata/bitcoin-client.conf:/.bitcoin/bitcoin.conf"
command: $USER /script/startotsclient.sh
networks:
- cyphernodenet
restart: always
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# GATEKEEPER #
##########################
gatekeeper:
# HTTP authentication API gate
image: cyphernode/gatekeeper:v0.2.4-local
command: $USER
environment:
- "TRACING=1"
ports:
- "2009:2009"
bitcoin:
command: $USER bitcoind
image: cyphernode/bitcoin:latest
volumes:
- "~/cn-files/cn-btcdata:/.bitcoin"
- "~/cn-dev/dist/cyphernode/gatekeeper/certs:/etc/ssl/certs"
- "~/cn-dev/dist/cyphernode/gatekeeper/private:/etc/ssl/private"
- "~/cn-dev/dist/cyphernode/gatekeeper/keys.properties:/etc/nginx/conf.d/keys.properties"
- "~/cn-dev/dist/cyphernode/gatekeeper/api.properties:/etc/nginx/conf.d/api.properties"
- "~/cn-dev/dist/cyphernode/gatekeeper/default.conf:/etc/nginx/conf.d/default.conf"
- "~/cn-dev/dist/cyphernode/gatekeeper/htpasswd:/etc/nginx/conf.d/status/htpasswd"
- "~/cn-dev/dist/cyphernode/gatekeeper/installation.json:/etc/nginx/conf.d/s/stats/installation.json"
- "~/cn-dev/dist/cyphernode/gatekeeper/client.7z:/etc/nginx/conf.d/s/stats/client.7z"
- "~/cn-dev/dist/cyphernode/gatekeeper/config.7z:/etc/nginx/conf.d/s/stats/config.7z"
networks:
- cyphernodenet
- cyphernodeappsnet
restart: always
depends_on:
- proxy
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# TRAEFIK #
##########################
traefik:
image: traefik:v1.7.9-alpine
ports:
- 80:80
- 443:443
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "~/cn-dev/dist/cyphernode/traefik/traefik.toml:/traefik.toml"
- "~/cn-dev/dist/cyphernode/traefik/acme.json:/acme.json"
- "~/cn-dev/dist/cyphernode/traefik/htpasswd:/htpasswd/htpasswd"
networks:
- cyphernodeappsnet
restart: always
depends_on:
- gatekeeper
# deploy:
# placement:
# constraints: [node.hostname==dev]
##########################
# LIGHTNING #
##########################
lightning:
image: cyphernode/clightning:v0.7.1
command: $USER sh -c 'while [ ! -f "/bitcoin_monitor/up" ]; do echo "bitcoin not ready" ; sleep 10 ; done ; echo "bitcoin ready!" ; lightningd'
ports:
- "9735:9735"
volumes:
- "~/cn-dev/dist/cyphernode/lightning:/.lightning"
- "~/btcdata/bitcoin-client.conf:/.bitcoin/bitcoin.conf"
- bitcoin_monitor:/bitcoin_monitor:ro
networks:
- cyphernodenet
restart: always
depends_on:
- bitcoin
# deploy:
# placement:
# constraints: [node.hostname==dev]
volumes:
bitcoin_monitor:
networks:
cyphernodenet:
external: true
cyphernodeappsnet:
external: true

View File

@@ -6,6 +6,9 @@ RUN apk add --update --no-cache \
su-exec \
&& git clone https://github.com/opentimestamps/javascript-opentimestamps.git \
&& cd javascript-opentimestamps \
# Handle 'Error: could not get uid/gid'
# See: https://github.com/npm/uid-number/issues/3
&& npm config set unsafe-perm true \
&& npm install -g
WORKDIR /script