From 77e1ddcefc04c9fc17dc9b197a792b61a08eee15 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 05:40:39 -0400 Subject: [PATCH 1/8] docker-compose.yaml.template: image: ghcr.io/plebnet-playground/plebnet-playground-docker/bitcoind-${TRIPLET}/root:v0.5.12 --- docker-compose.yaml.template | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml.template b/docker-compose.yaml.template index 4aeae6930..0e4d8b98f 100644 --- a/docker-compose.yaml.template +++ b/docker-compose.yaml.template @@ -3,6 +3,7 @@ version: "3.4" networks: {} services: bitcoind: + image: ghcr.io/plebnet-playground/plebnet-playground-docker/bitcoind-${TRIPLET}/root:v0.5.12 build: context: ./bitcoin-signet dockerfile: Dockerfile From 1ad8ccf8d24da652d61a486a0a716c19f8580f31 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 05:41:49 -0400 Subject: [PATCH 2/8] docker-compose.yaml.template: image: ghcr.io/plebnet-playground/plebnet-playground-docker/lnd-${TRIPLET}/root:v0.5.12 --- docker-compose.yaml.template | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml.template b/docker-compose.yaml.template index 0e4d8b98f..fd3f3afd1 100644 --- a/docker-compose.yaml.template +++ b/docker-compose.yaml.template @@ -49,6 +49,7 @@ services: rpchost: 'playground-bitcoind' restart: unless-stopped container_name: playground-lnd + image: ghcr.io/plebnet-playground/plebnet-playground-docker/lnd-${TRIPLET}/root:v0.5.12 build: context: ./lnd-signet dockerfile: Dockerfile From 5ba261492f0f22c60fb03f975a0c2337b101ec88 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 05:43:35 -0400 Subject: [PATCH 3/8] docker-compose.yaml.template: image: ghcr.io/plebnet-playground/plebnet-playground-docker/tor-${TRIPLET}/root:v0.5.12 --- docker-compose.yaml.template | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml.template b/docker-compose.yaml.template index fd3f3afd1..e8b1201c2 100644 --- a/docker-compose.yaml.template +++ b/docker-compose.yaml.template @@ -96,6 +96,7 @@ services: tor: restart: unless-stopped container_name: playground-tor + image: ghcr.io/plebnet-playground/plebnet-playground-docker/tor-${TRIPLET}/root:v0.5.12 build: context: ./tor dockerfile: Dockerfile From f8acfca152b5d419a202a8e80e7f4d526676de83 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 05:44:32 -0400 Subject: [PATCH 4/8] docker-compose.yaml.template: image: ghcr.io/plebnet-playground/plebnet-playground-docker/thunderhub-${TRIPLET}/root:v0.5.12 --- docker-compose.yaml.template | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml.template b/docker-compose.yaml.template index e8b1201c2..676432fc6 100644 --- a/docker-compose.yaml.template +++ b/docker-compose.yaml.template @@ -121,6 +121,7 @@ services: links: - bitcoind - lnd + image: ghcr.io/plebnet-playground/plebnet-playground-docker/thunderhub-${TRIPLET}/root:v0.5.12 build: context: ./thub dockerfile: Dockerfile From d6ba76aae9d7fbfbb7118c67afc6395dd6f44e10 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 05:45:13 -0400 Subject: [PATCH 5/8] docker-compose.yaml.template: image: ghcr.io/plebnet-playground/plebnet-playground-docker/docs-${TRIPLET}/root:v0.5.12 --- docker-compose.yaml.template | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yaml.template b/docker-compose.yaml.template index 676432fc6..a6c0b3c51 100644 --- a/docker-compose.yaml.template +++ b/docker-compose.yaml.template @@ -267,6 +267,7 @@ services: container_name: playground-docs environment: - TRIPLET=${TRIPLET} + image: ghcr.io/plebnet-playground/plebnet-playground-docker/docs-${TRIPLET}/root:v0.5.12 build: context: ${oc.env:PWD}/docs dockerfile: Dockerfile From 0a3d218a40cbfa2c08af4fc7a5f3ef142af3da1d Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 05:57:29 -0400 Subject: [PATCH 6/8] docker-compose.yaml: add file --- docker-compose.yaml | 201 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 000000000..dec5e46a2 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,201 @@ +version: '3.4' +networks: {} +services: + bitcoind: + image: ghcr.io/plebnet-playground/plebnet-playground-docker/bitcoind-x86_64-linux-gnu/root:v0.5.12 + build: + context: ./bitcoin-signet + dockerfile: Dockerfile + args: + - TRIPLET=x86_64-linux-gnu + links: + - tor + depends_on: + - tor + restart: unless-stopped + container_name: playground-bitcoind + environment: + TRIPLET: x86_64-linux-gnu + GET_COINS_ON_STARTUP: 'true' + expose: + - '38332' + - '38333' + - '38334' + ports: + - 38333:38333 + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/bitcoin_datadir + target: /root/.bitcoin/ + lnd: + links: + - bitcoind + - tor + depends_on: + - bitcoind + - tor + environment: + TRIPLET: x86_64-linux-gnu + LND_ALIAS: LNDNode + LND_LISTEN: playground-lnd:9735 + LND_RPCLISTEN: playground-lnd:10009 + LND_RESTLISTEN: playground-lnd:8080 + zmqpubrawblock: tcp://playground-bitcoind:28332 + zmqpubrawtx: tcp://playground-bitcoind:28333 + torsocks: playground-tor:9050 + torcontrol: playground-tor:9051 + tlsextradomain: playground-lnd + rpchost: playground-bitcoind + restart: unless-stopped + container_name: playground-lnd + image: ghcr.io/plebnet-playground/plebnet-playground-docker/lnd-x86_64-linux-gnu/root:v0.5.12 + build: + context: ./lnd-signet + dockerfile: Dockerfile + expose: + - '8080' + - '9735' + - '9911' + - '10009' + ports: + - 8080:8080 + - 9735:9735 + - 9911:9911 + - 10009:10009 + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/lnd_datadir + target: /root/.lnd/ + cln: + links: + - bitcoind + - tor + depends_on: + - bitcoind + - tor + environment: + CLN_ALIAS: CLNNode + BITCOIN_RPC_HOST: playground-bitcoind + TOR_PROXY: playground-tor:9050 + TOR_ADDR: playground-tor:9051 + LIGHTNINGD_PORT: '9736' + restart: unless-stopped + container_name: playground-cln + build: + context: ./cln-signet + dockerfile: Dockerfile + expose: + - '9736' + ports: + - 9736:9736 + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/cln_datadir + target: /root/.lightning/ + tor: + restart: unless-stopped + container_name: playground-tor + image: ghcr.io/plebnet-playground/plebnet-playground-docker/tor-x86_64-linux-gnu/root:v0.5.12 + build: + context: ./tor + dockerfile: Dockerfile + expose: + - 9050 + - 9051 + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/tor_datadir + target: /home/tor/.tor + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/tor_torrcdir + target: /usr/local/etc/tor + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/tor_servicesdir + target: /var/lib/tor/hidden_services + thunderhub: + container_name: playground-thub + depends_on: + - lnd + - bitcoind + links: + - bitcoind + - lnd + image: ghcr.io/plebnet-playground/plebnet-playground-docker/thunderhub-x86_64-linux-gnu/root:v0.5.12 + build: + context: ./thub + dockerfile: Dockerfile + restart: unless-stopped + stop_signal: SIGKILL + environment: + NO_VERSION_CHECK: 'true' + ACCOUNT_CONFIG_PATH: /data/thubConfig.yaml + LOG_LEVEL: debug + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/lnd_datadir + target: /etc/lnd + read_only: true + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/thub_datadir + target: /data + ports: + - 3001:3000 + rtl: + container_name: playground-rtl + links: + - lnd + - bitcoind + depends_on: + - lnd + - bitcoind + restart: unless-stopped + environment: + LND_SERVER_URL: https://playground-lnd:8080/v1 + MACAROON_PATH: /root/.lnd/data/chain/bitcoin/signet + RTL_CONFIG_PATH: /data/ + LND_CONFIG_PATH: /root/.lnd/lnd.conf + BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf + RTL_SSO: 0 + RTL_COOKIE_PATH: '' + LOGOUT_REDIRECT_LINK: '' + CONFIG_PATH: '' + LN_IMPLEMENTATION: LND + ports: + - 3000:3000 + image: shahanafarooqui/rtl:0.13.6 + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/lnd_datadir + target: /root/.lnd/ + read_only: true + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/bitcoin_datadir + target: /etc/bitcoin/ + read_only: true + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/volumes/rtl_datadir + target: /data + docs: + links: + - tor + depends_on: + - tor + restart: unless-stopped + container_name: playground-docs + environment: + - TRIPLET=x86_64-linux-gnu + image: ghcr.io/plebnet-playground/plebnet-playground-docker/docs-x86_64-linux-gnu/root:v0.5.12 + build: + context: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/docs + dockerfile: Dockerfile + args: + - TRIPLET=x86_64-linux-gnu + expose: + - '8000' + - '8008' + ports: + - 8008:8000 + volumes: + - type: bind + source: /Users/Shared/PLEBNET-PLAYGROUND/plebnet-playground-docker/docs + target: /docs From bc2b9200bab7f657a38f1c246a06be983846a8d2 Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 06:39:38 -0400 Subject: [PATCH 7/8] .github/workflows/plebnet-playground.yml: --- .github/workflows/plebnet-playground.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plebnet-playground.yml b/.github/workflows/plebnet-playground.yml index 4c06e054e..53526fbd2 100644 --- a/.github/workflows/plebnet-playground.yml +++ b/.github/workflows/plebnet-playground.yml @@ -135,10 +135,10 @@ jobs: # play defaults to the lnd container play lnd config - - name: play lnd "lncli -h" - if: ${{ !env.ACT }} - run: | - play lnd "lncli -h" + #- name: play lnd "lncli -h" + # if: ${{ !env.ACT }} + # run: | + # play lnd "lncli -h" - name: play-lnd config if: ${{ !env.ACT }} From 970b55d14a13d50654bb4a4dc5dbcfccdfb7aecb Mon Sep 17 00:00:00 2001 From: randymcmillan Date: Tue, 11 Jul 2023 11:01:32 -0400 Subject: [PATCH 8/8] make: cluster: use make run --- GNUmakefile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 82d618b41..6813a6e04 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -441,21 +441,23 @@ endif ####################### .ONESHELL: -docker-start:## start docker - test -d .venv || $(PYTHON3) -m virtualenv .venv - ( \ - source .venv/bin/activate; pip install -q -r requirements.txt; \ - python3 -m pip install -q omegaconf \ - pip install -q --upgrade pip; \ +docker-start: +## docker-start + @touch requirements.txt && $(PYTHON3) -m pip install -q -r requirements.txt + @test -d .venv || $(PYTHON3) -m virtualenv .venv + @( \ + source .venv/bin/activate; $(PYTHON3) -m pip install -q -r requirements.txt; \ + $(PYTHON3) -m pip install -q --upgrade pip; \ ); ( \ while ! docker system info > /dev/null 2>&1; do\ echo 'Waiting for docker to start...';\ if [[ '$(OS)' == 'Linux' ]]; then\ - systemctl restart docker.service;\ + type -P apt && apt install docker*;\ + type -P systemctl && systemctl restart docker.service || type -P service && service docker.service restart || type -P apk && apk add openrc docker && rc-service docker restart || echo "try installing docker manually...";\ fi;\ if [[ '$(OS)' == 'Darwin' ]]; then\ - open --background -a /./Applications/Docker.app/Contents/MacOS/Docker;\ + open --background -a /Applications/Docker.app/Contents/MacOS/Docker;\ fi;\ sleep 1;\ done\ @@ -548,12 +550,11 @@ cluster:venv## create playground-cluster ifeq ($(cluster),remove) $(MAKE) prune-cluster else - ln -sF .venv $(PWD)/cluster/.venv test -d .venv || $(PYTHON3) -m virtualenv .venv ( \ source .venv/bin/activate; pip install -q -r requirements.txt; \ - python3 -m pip install -q omegaconf; \ - pushd cluster && ./up-generic.sh bitcoind=5 lnd=0 && popd; \ + $(PYTHON#) -m pip install -q omegaconf; \ + pushd cluster && make run && popd; \ ); endif @docker ps | grep cluster || echo