-
Notifications
You must be signed in to change notification settings - Fork 228
*: multi cluster setup #294
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
Open
KaloyanTanev
wants to merge
40
commits into
main
Choose a base branch
from
kalo/multi-cluster-setup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
20ab3fb
Add profiles and container names; compose file consistency
KaloyanTanev 1ed4235
Enable by default MEVBOOST_RELAYS in holesky
KaloyanTanev 9b901f6
Add customisable validator API port and monitoring port
KaloyanTanev 1e089b1
Remove custom container names
KaloyanTanev 508f64b
Add base profile to docker compose
KaloyanTanev 95cd398
gitignore clusters dir
KaloyanTanev 43436bc
Add setup.sh script for setting up multi cluster directory
KaloyanTanev 9dc22ea
Add and delete cluster scripts
KaloyanTanev 7cfce2a
Start and stop cluster scripts
KaloyanTanev 35af5ed
Start and stop base containers scripts
KaloyanTanev 1c50f8b
Sum up scripts into 3, instead of 7
KaloyanTanev 37c90c6
Improve setup.sh comments and give more feedback to user
KaloyanTanev 6db85b5
Add multi cluster support doc to readme
KaloyanTanev d866aa8
Fix function name typo
KaloyanTanev bf1133a
Check if cluster was already existing and base feedback to user based…
KaloyanTanev ad9241e
Decomission old cluster files
KaloyanTanev 5fc39aa
Check if Docker daemon is runing
KaloyanTanev a53e070
Remove whitespace
KaloyanTanev a20a01a
gitignore decomissioned .charon
KaloyanTanev 2619b06
Revert "Add customisable validator API port and monitoring port"
KaloyanTanev d79c38d
Remove validator and monitoring ports from add cluster script
KaloyanTanev 3aa6975
Simplify port find function
KaloyanTanev 0755f80
Check ports from base network
KaloyanTanev 8c9b56c
Revert "Enable by default MEVBOOST_RELAYS in holesky"
KaloyanTanev 2212cf4
Update readme with longer intro
KaloyanTanev 2678c07
Check for file ownership
KaloyanTanev 95558dd
Add ss alongside netstat and option for skipping port check
KaloyanTanev ac53693
Add options to each command in cluster.sh; add skip port check and de…
KaloyanTanev 9dafe28
Add examples in the usage
KaloyanTanev 623158a
Add more help messages in base.sh
KaloyanTanev 0edb579
Formatting
KaloyanTanev 722dcba
Linting fixes
KaloyanTanev 8506561
Shellcheck disable one liner
KaloyanTanev 45f3730
Remove 'my' from examples
KaloyanTanev 19fadd4
Remove 'your' from docs; make cluster name mandatory for setup
KaloyanTanev 975380f
Fix typos
KaloyanTanev 51308c6
Add -f flag to testing file existance
KaloyanTanev b8676b7
grep port as a word
KaloyanTanev 08408e6
Add makefile
KaloyanTanev ad4044f
Merge branch 'main' into kalo/multi-cluster-setup
bussyjd 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 hidden or 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 |
---|---|---|
|
@@ -10,5 +10,6 @@ cluster-lock.json | |
.DS_Store | ||
data/ | ||
.idea | ||
.charon | ||
.charon* | ||
prometheus/prometheus.yml | ||
clusters/ |
This file contains hidden or 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,34 @@ | ||
.PHONY: multi-cluster-setup multi-cluster-add-cluster multi-cluster-delete-cluster multi-cluster-start-cluster multi-cluster-stop-cluster multi-cluster-start-base multi-cluster-stop-base | ||
|
||
check_defined = \ | ||
$(strip $(foreach 1,$1, \ | ||
$(call __check_defined,$1,$(strip $(value 2))))) | ||
__check_defined = \ | ||
$(if $(value $1),, \ | ||
$(error $1$(if $2, ($2)) is not set. Set it by running `make $1$(if $2, ($2))=<value>`)) | ||
|
||
multi-cluster-setup: | ||
$(call check_defined, name) | ||
./multi_cluster/setup.sh $(name) | ||
|
||
multi-cluster-add-cluster: | ||
$(call check_defined, name) | ||
./multi_cluster/cluster.sh add $(name) | ||
|
||
multi-cluster-delete-cluster: | ||
$(call check_defined, name) | ||
./multi_cluster/cluster.sh delete $(name) | ||
|
||
multi-cluster-start-cluster: | ||
$(call check_defined, name) | ||
./multi_cluster/cluster.sh start $(name) | ||
|
||
multi-cluster-stop-cluster: | ||
$(call check_defined, name) | ||
./multi_cluster/cluster.sh stop $(name) | ||
|
||
multi-cluster-start-base: | ||
./multi_cluster/base.sh start | ||
|
||
multi-cluster-stop-base: | ||
./multi_cluster/base.sh stop |
This file contains hidden or 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 hidden or 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 hidden or 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,108 @@ | ||
#!/bin/bash | ||
|
||
usage() { | ||
echo "Usage: $0 [OPTIONS] COMMAND" | ||
echo "" | ||
echo " Manage the base ethereum node (EL, CL, MEV boost, Grafana), without interfering with any validator." | ||
echo "" | ||
echo "Commands:" | ||
echo " start Start an ethereum node, MEV-boost and Grafana." | ||
echo " stop Stop an ethereum node, MEV-boost and Grafana." | ||
echo "" | ||
echo "Options:" | ||
echo " -h Display this help message." | ||
} | ||
|
||
usage_start() { | ||
echo "Usage: $0 start [OPTIONS]" | ||
echo "" | ||
echo " Start the base ethereum node." | ||
echo "" | ||
echo "Options:" | ||
echo " -h Display this help message." | ||
echo "" | ||
echo "Example:" | ||
echo " $0 start" | ||
} | ||
|
||
usage_stop() { | ||
echo "Usage: $0 stop [OPTIONS]" | ||
echo "" | ||
echo " Stop the base ethereum node." | ||
echo "" | ||
echo "Options:" | ||
echo " -h Display this help message." | ||
echo "" | ||
echo "Example:" | ||
echo " $0 stop" | ||
} | ||
|
||
start() { | ||
docker compose --profile base up -d | ||
} | ||
|
||
stop() { | ||
docker compose --profile base stop | ||
} | ||
|
||
while getopts ":h" opt; do | ||
case $opt in | ||
h) | ||
usage | ||
exit 0 | ||
;; | ||
\?) | ||
usage | ||
exit 1 | ||
;; | ||
:) | ||
usage | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
shift $((OPTIND - 1)) | ||
|
||
subcommand=$1 | ||
shift | ||
case "$subcommand" in | ||
# Parse options to the install sub command | ||
start) | ||
while getopts ":h" opt; do | ||
case $opt in | ||
h) | ||
usage_start | ||
exit 0 | ||
;; | ||
?) # Invalid option | ||
usage_start | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
shift $((OPTIND - 1)) | ||
start | ||
;; | ||
stop) | ||
while getopts ":h" opt; do | ||
case $opt in | ||
h) | ||
usage_stop | ||
exit 0 | ||
;; | ||
?) # Invalid option | ||
usage_stop | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
shift $((OPTIND - 1)) | ||
stop | ||
;; | ||
*) | ||
usage | ||
exit 1 | ||
;; | ||
|
||
esac |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.