-
Notifications
You must be signed in to change notification settings - Fork 204
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
Docker local-testnet scripts #5998
Merged
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
41d8908
added script to create local-testnet with docker.
cristure 29367f3
remove CI to build local testnet.
cristure d13ca14
cosmetic changes.
cristure 42d2b78
added build.sh
cristure a77aef7
fixed typo.
cristure b8cf372
added execution permissions on build.sh
cristure 4f53303
changed containers name for better visibility.
cristure c6caf6c
Merge branch 'master' into local-testnet-docker
cristure 092ef55
removed hardcoded ips and added dedicated network for docker local-te…
cristure 01e02fd
Removed executable permissions for variables.sh
cristure 24c1ac4
fixes after review.
cristure ecd2a34
Added README.md
cristure 9bf2d7c
cosmetic changes.
cristure 96adb1f
Added publish ports argument and formatting changes.
cristure e3cd364
Added start/stop mechanism along with comsetic changes.
cristure d3cf4f8
Fixed paths.
cristure 71d48d4
fixed ports for nodes.
cristure File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eux | ||
|
||
export DOCKERTESTNETDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
MULTIVERSXTESTNETSCRIPTSDIR="$(dirname "$DOCKERTESTNETDIR")/testnet" | ||
|
||
source "$DOCKERTESTNETDIR/variables.sh" | ||
source "$DOCKERTESTNETDIR/functions.sh" | ||
source "$MULTIVERSXTESTNETSCRIPTSDIR/include/config.sh" | ||
source "$MULTIVERSXTESTNETSCRIPTSDIR/include/build.sh" | ||
|
||
cloneRepositories | ||
|
||
prepareFolders | ||
|
||
buildConfigGenerator | ||
|
||
generateConfig | ||
|
||
copyConfig | ||
|
||
copySeednodeConfig | ||
updateSeednodeConfig | ||
|
||
copyNodeConfig | ||
updateNodeConfig | ||
|
||
createDockerNetwork | ||
|
||
startSeedNode | ||
startObservers | ||
startValidators | ||
|
||
if [ $USE_PROXY -eq 1 ]; then | ||
buildProxyImage | ||
prepareFolders_Proxy | ||
copyProxyConfig | ||
updateProxyConfigDocker | ||
startProxyDocker | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eux | ||
|
||
# Delete the entire testnet folder, which includes configuration, executables and logs. | ||
|
||
export MULTIVERSXTESTNETSCRIPTSDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
source "$MULTIVERSXTESTNETSCRIPTSDIR/variables.sh" | ||
|
||
# Get the IDs of containers attached to the network | ||
export CONTAINER_IDS=$(docker network inspect -f '{{range $k, $v := .Containers}}{{printf "%s\n" $k}}{{end}}' "$DOCKER_NETWORK_NAME") | ||
|
||
mkdir -p ./tmp | ||
|
||
# Stop each container | ||
echo "Stopping containers..." | ||
for CONTAINER_ID in $CONTAINER_IDS; do | ||
docker stop "$CONTAINER_ID" | ||
echo "$CONTAINER_ID" >> ./tmp/stopped_containers | ||
done | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add empty line? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add empty line?