diff --git a/docker-compose.debug.yml b/docker-compose.debug.yml index 3008f547a..f860d2998 100644 --- a/docker-compose.debug.yml +++ b/docker-compose.debug.yml @@ -60,6 +60,46 @@ services: networks: d-voting: ipv4_address: 172.19.44.252 + dela-worker-3: # DELA worker node + image: dela:latest + build: + dockerfile: ./Dockerfiles/Dockerfile.dela.debug + environment: + PROXYKEY: ${PUBLIC_KEY} + PROXYPORT: ${PROXYPORT} + LLVL: debug + volumes: + - dela-worker-3-data:/data + hostname: dela-worker-3 + ports: + - 127.0.0.1:40002:40000 + security_opt: + - apparmor:unconfined + cap_add: + - SYS_PTRACE + networks: + d-voting: + ipv4_address: 172.19.44.251 + dela-worker-4: # DELA worker node + image: dela:latest + build: + dockerfile: ./Dockerfiles/Dockerfile.dela.debug + environment: + PROXYKEY: ${PUBLIC_KEY} + PROXYPORT: ${PROXYPORT} + LLVL: debug + volumes: + - dela-worker-4-data:/data + hostname: dela-worker-4 + ports: + - 127.0.0.1:40002:40000 + security_opt: + - apparmor:unconfined + cap_add: + - SYS_PTRACE + networks: + d-voting: + ipv4_address: 172.19.44.250 frontend: # web service frontend image: frontend:latest @@ -121,6 +161,8 @@ volumes: dela-worker-0-data: dela-worker-1-data: dela-worker-2-data: + dela-worker-3-data: + dela-worker-4-data: backend-data: networks: diff --git a/docker-compose.yml b/docker-compose.yml index d5ceeb2d6..91098a2d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -42,6 +42,34 @@ services: networks: d-voting: ipv4_address: 172.19.44.252 + dela-worker-3: # DELA worker node + image: dela:latest + build: + dockerfile: ./Dockerfiles/Dockerfile.dela + environment: + PROXYKEY: ${PUBLIC_KEY} + PROXYPORT: ${PROXYPORT} + LLVL: info + volumes: + - dela-worker-3-data:/data + hostname: dela-worker-3 + networks: + d-voting: + ipv4_address: 172.19.44.251 + dela-worker-4: # DELA worker node + image: dela:latest + build: + dockerfile: ./Dockerfiles/Dockerfile.dela + environment: + PROXYKEY: ${PUBLIC_KEY} + PROXYPORT: ${PROXYPORT} + LLVL: info + volumes: + - dela-worker-4-data:/data + hostname: dela-worker-4 + networks: + d-voting: + ipv4_address: 172.19.44.250 frontend: # web service frontend image: frontend:latest @@ -99,6 +127,8 @@ volumes: dela-worker-0-data: dela-worker-1-data: dela-worker-2-data: + dela-worker-3-data: + dela-worker-4-data: backend-data: networks: diff --git a/init_dela.sh b/init_dela.sh index 1acfd1aa2..a40d93b02 100755 --- a/init_dela.sh +++ b/init_dela.sh @@ -4,28 +4,28 @@ MEMBERS=""; # share the certificate -for container in dela-worker-1 dela-worker-2; do +for container in dela-worker-1 dela-worker-2 dela-worker-3 dela-worker-4; do TOKEN_ARGS=$(docker compose exec dela-worker-0 /bin/bash -c 'LLVL=error memcoin --config /data/node minogrpc token'); docker compose exec "$container" memcoin --config /data/node minogrpc join --address //dela-worker-0:2000 $TOKEN_ARGS; done # create a new chain with the nodes -for container in dela-worker-0 dela-worker-1 dela-worker-2; do +for container in dela-worker-0 dela-worker-1 dela-worker-2 dela-worker-3 dela-worker-4; do # add node to the chain MEMBERS="$MEMBERS --member $(docker compose exec $container /bin/bash -c 'LLVL=error memcoin --config /data/node ordering export')"; done docker compose exec dela-worker-0 memcoin --config /data/node ordering setup $MEMBERS; # authorize the signer to handle the access contract on each node -for signer in dela-worker-0 dela-worker-1 dela-worker-2; do +for signer in dela-worker-0 dela-worker-1 dela-worker-2 dela-worker-3 dela-worker-4; do IDENTITY=$(docker compose exec "$signer" crypto bls signer read --path /data/node/private.key --format BASE64_PUBKEY); - for node in dela-worker-0 dela-worker-1 dela-worker-2; do + for node in dela-worker-0 dela-worker-1 dela-worker-2 dela-worker-3 dela-worker-4; do docker compose exec "$node" memcoin --config /data/node access add --identity "$IDENTITY"; done done # update the access contract -for container in dela-worker-0 dela-worker-1 dela-worker-2; do +for container in dela-worker-0 dela-worker-1 dela-worker-2 dela-worker-3 dela-worker-4; do IDENTITY=$(docker compose exec "$container" crypto bls signer read --path /data/node/private.key --format BASE64_PUBKEY); docker compose exec dela-worker-0 memcoin --config /data/node pool add\ --key /data/node/private.key\