Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make: package-all docker-start #184

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export THIS_FILE
TIME := $(shell date +%s)
export TIME

OS :=$(shell uname -s)
export OS
ARCH :=$(shell uname -m)
export ARCH
ifeq ($(ARCH),x86_64)
Expand Down Expand Up @@ -381,7 +383,7 @@ test-venv:## test virutalenv .venv
.PHONY: init setup
.SILENT:
setup: init venv## basic setup
init:submodules
init:submodules venv docker-pull

ifneq ($(shell id -u),0)
@echo
Expand All @@ -408,6 +410,33 @@ endif


#######################
.ONESHELL:
docker:## docker
test -d .venv || $(PYTHON3) -m virtualenv .venv
( \
source .venv/bin/activate; pip install -r requirements.txt; \
python3 -m pip install omegaconf \
pip install --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;\
fi;\
if [[ '$(OS)' == 'Darwin' ]]; then\
open --background -a /./Applications/Docker.app/Contents/MacOS/Docker;\
fi;\
sleep 1;\
done\
)
mytarget:
( \
set -e ;\
echo 'msg=$$msg' ;\
)
docker-pull:## docker-pull
docker pull ghcr.io/randymcmillan/plebnet-playground-docker/cln-$(TRIPLET)/root:1653883165
.PHONY: blocknotify
blocknotify:
bash -c 'install -v $(PWD)/bitcoin-signet/blocknotify /usr/local/bin/blocknotify'
Expand Down Expand Up @@ -450,6 +479,7 @@ else
pushd cluster && ./up-generic.sh bitcoind=5 lnd=0 && popd; \
);
endif
@docker ps | grep cluster || echo
#######################
.PHONY: uninstall
uninstall: run uninstall.sh script
Expand Down Expand Up @@ -662,4 +692,3 @@ package-all: init package-plebnet## package-plebnet
#INSERT other scripting here
bash -c "echo insert more scripting here..."
########################

4 changes: 2 additions & 2 deletions docker-compose.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ services:
- tor
environment:
TRIPLET: '${TRIPLET}'
LND_ALIAS: 'NewNode'
LND_ALIAS: 'LNDNode'
LND_LISTEN: 'playground-lnd:9735'
LND_RPCLISTEN: 'playground-lnd:10009'
LND_RESTLISTEN: 'playground-lnd:8080'
Expand Down Expand Up @@ -73,7 +73,7 @@ services:
- bitcoind
- tor
environment:
CLN_ALIAS: 'NewNode'
CLN_ALIAS: 'CLNNode'
BITCOIN_RPC_HOST: 'playground-bitcoind'
TOR_PROXY: 'playground-tor:9050'
TOR_ADDR: 'playground-tor:9051'
Expand Down
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -z "$services" ]; then
echo "services="$services
fi

docker compose down || docker-compose down
type -P docker-compose && docker-compose down || docker compose down

$(which python3) plebnet_generate.py TRIPLET=$TRIPLET services=$services

Expand Down Expand Up @@ -64,6 +64,6 @@ while ! docker system info > /dev/null 2>&1; do

done

docker compose build --build-arg TRIPLET=$TRIPLET || docker-compose build --build-arg TRIPLET=$TRIPLET
docker compose up --remove-orphans -d || docker-compose up --remove-orphans -d
type -P docker-compose && docker-compose build --build-arg TRIPLET=$TRIPLET || docker compose build --build-arg TRIPLET=$TRIPLET
type -P docker-compose && docker-compose up --remove-orphans -d || docker compose up --remove-orphans -d