Skip to content

Commit

Permalink
added mx-deploy-go checkout step and preparation script for docker te…
Browse files Browse the repository at this point in the history
…stnet.
  • Loading branch information
cristure committed Feb 28, 2024
1 parent f884f02 commit 36176aa
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 16 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build_local_tesnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@ jobs:
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Get dependencies
- name: Check out mx-deploy-go
uses: action/checkout@v4
with:
repository: multiversx/mx-deploy-go
path: ../mx-deploy-go

- name: Generate config
run: |
cd ${GITHUB_WORKSPACE}/scripts/testnet
./prerequisites.sh
./config.sh
cd ${GITHUB_WORKSPACE}/scripts/docker-testnet
export TESTNETDIR=${GITHUB_WORKSPACE}/docker-testnet
./prepare.sh
22 changes: 11 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.2
volumes:
- /home/cristu/MultiversX/testnet/seednode/config:/go/mx-chain-go/cmd/seednode/config
- ${DOCKER_CONFIG_PATH}/seednode/config:/go/mx-chain-go/cmd/seednode/config

validator00:
image: node:dev
Expand All @@ -24,7 +24,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.3
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [seednode]

validator01:
Expand All @@ -38,7 +38,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.4
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [seednode]

validator02:
Expand All @@ -52,7 +52,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.5
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- /${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [seednode]

validator03:
Expand All @@ -66,7 +66,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.6
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [ seednode ]

validator04:
Expand All @@ -80,7 +80,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.7
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [ seednode ]

validator05:
Expand All @@ -94,7 +94,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.8
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [ seednode ]


Expand All @@ -109,7 +109,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.9
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [ seednode ]

validator07:
Expand All @@ -123,7 +123,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.10
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [ seednode ]

validator08:
Expand All @@ -137,7 +137,7 @@ services:
local-testnet:
ipv4_address: 172.18.0.11
volumes:
- /home/cristu/MultiversX/testnet/node/config:/go/mx-chain-go/cmd/node/config
- ${DOCKER_CONFIG_PATH}/node/config:/go/mx-chain-go/cmd/node/config
depends_on: [ seednode ]


Expand All @@ -150,7 +150,7 @@ services:
networks:
local-testnet:
volumes:
- ./test-config/proxy/config:/mx-chain-proxy-go/cmd/proxy/config
- ${DOCKER_CONFIG_PATH}/proxy/config:/mx-chain-proxy-go/cmd/proxy/config

networks:
local-testnet:
Expand Down
25 changes: 25 additions & 0 deletions scripts/docker-testnet/prepare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

set -e

export DOCKERTESTNETDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

MULTIVERSXTESTNETSCRIPTSDIR="$(dirname "$DOCKERTESTNETDIR")/testnet"

source "$MULTIVERSXTESTNETSCRIPTSDIR/variables.sh"
source "$MULTIVERSXTESTNETSCRIPTSDIR/include/config.sh"
source "$MULTIVERSXTESTNETSCRIPTSDIR/include/build.sh"

prepareFolders

buildConfigGenerator

generateConfig

copyConfig

copySeednodeConfig
updateSeednodeConfig

copyNodeConfig
updateNodeConfig

0 comments on commit 36176aa

Please sign in to comment.