-
Notifications
You must be signed in to change notification settings - Fork 2
Remove validator for enterprise blobber deployment #172
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
Jayashsatolia403
wants to merge
2
commits into
main
Choose a base branch
from
fix/remove-validator
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
2 commits
Select commit
Hold shift + click to select a range
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 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -163,9 +163,12 @@ pushd ${PROJECT_ROOT} > /dev/null; | |||||||||||||||||
| fi | ||||||||||||||||||
| fi | ||||||||||||||||||
| ./bin/zwallet create-wallet --wallet blob_op_wallet.json --configDir . --config config.yaml --silent | ||||||||||||||||||
| ./bin/zwallet create-wallet --wallet vald_op_wallet.json --configDir . --config config.yaml --silent | ||||||||||||||||||
| if [ "$IS_ENTERPRISE" != true ]; then | ||||||||||||||||||
| ./bin/zwallet create-wallet --wallet vald_op_wallet.json --configDir . --config config.yaml --silent | ||||||||||||||||||
| fi | ||||||||||||||||||
| popd > /dev/null; | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| #### ---- Start Blobber Setup ----- #### | ||||||||||||||||||
|
|
||||||||||||||||||
| FOLDERS_TO_CREATE="config sql bin monitoringconfig keys_config" | ||||||||||||||||||
|
|
@@ -288,13 +291,19 @@ ${BLOBBER_HOST} { | |||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| route { | ||||||||||||||||||
| reverse_proxy blobber:5051 | ||||||||||||||||||
| } | ||||||||||||||||||
| reverse_proxy blobber:5051 | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| # Add validator routes only for non-enterprise deployments | ||||||||||||||||||
| if [ "$IS_ENTERPRISE" != true ]; then | ||||||||||||||||||
| cat <<EOF >>${PROJECT_ROOT}/Caddyfile | ||||||||||||||||||
| route /validator* { | ||||||||||||||||||
| uri strip_prefix /validator | ||||||||||||||||||
| reverse_proxy validator:5061 | ||||||||||||||||||
| } | ||||||||||||||||||
| EOF | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| route /validator* { | ||||||||||||||||||
| uri strip_prefix /validator | ||||||||||||||||||
| reverse_proxy validator:5061 | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| route /portainer* { | ||||||||||||||||||
| uri strip_prefix /portainer | ||||||||||||||||||
|
|
@@ -347,19 +356,24 @@ services: | |||||||||||||||||
| default: | ||||||||||||||||||
| restart: "always" | ||||||||||||||||||
|
|
||||||||||||||||||
| validator: | ||||||||||||||||||
| image: 0chaindev/validator:${DOCKER_IMAGE} | ||||||||||||||||||
| environment: | ||||||||||||||||||
| - DOCKER= true | ||||||||||||||||||
| volumes: | ||||||||||||||||||
| - ${PROJECT_ROOT}/config:/validator/config | ||||||||||||||||||
| - ${PROJECT_ROOT_HDD}/data:/validator/data | ||||||||||||||||||
| - ${PROJECT_ROOT_HDD}/log:/validator/log | ||||||||||||||||||
| - ${PROJECT_ROOT}/keys_config:/validator/keysconfig | ||||||||||||||||||
| command: ./bin/validator --port 5061 --hostname ${BLOBBER_HOST} --deployment_mode 0 --keys_file keysconfig/b0vnode01_keys.txt --log_dir /validator/log --hosturl https://${BLOBBER_HOST}/validator | ||||||||||||||||||
| networks: | ||||||||||||||||||
| default: | ||||||||||||||||||
| restart: "always" | ||||||||||||||||||
| # Add validator service only for non-enterprise deployments | ||||||||||||||||||
| if [ "$IS_ENTERPRISE" != true ]; then | ||||||||||||||||||
| cat <<EOF >>${PROJECT_ROOT}/docker-compose.yml | ||||||||||||||||||
| validator: | ||||||||||||||||||
| image: 0chaindev/validator:${DOCKER_IMAGE} | ||||||||||||||||||
| environment: | ||||||||||||||||||
| - DOCKER= true | ||||||||||||||||||
| volumes: | ||||||||||||||||||
| - ${PROJECT_ROOT}/config:/validator/config | ||||||||||||||||||
| - ${PROJECT_ROOT_HDD}/data:/validator/data | ||||||||||||||||||
| - ${PROJECT_ROOT_HDD}/log:/validator/log | ||||||||||||||||||
| - ${PROJECT_ROOT}/keys_config:/validator/keysconfig | ||||||||||||||||||
| command: ./bin/validator --port 5061 --hostname ${BLOBBER_HOST} --deployment_mode 0 --keys_file keysconfig/b0vnode01_keys.txt --log_dir /validator/log --hosturl https://${BLOBBER_HOST}/validator | ||||||||||||||||||
| networks: | ||||||||||||||||||
| default: | ||||||||||||||||||
| restart: "always" | ||||||||||||||||||
| EOF | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| blobber: | ||||||||||||||||||
| image: 0chaindev/blobber:${DOCKER_IMAGE} | ||||||||||||||||||
|
|
@@ -371,7 +385,7 @@ services: | |||||||||||||||||
| DB_PORT: "5432" | ||||||||||||||||||
| DB_HOST: postgres | ||||||||||||||||||
| depends_on: | ||||||||||||||||||
| - validator | ||||||||||||||||||
| - postgres | ||||||||||||||||||
| links: | ||||||||||||||||||
| - validator:validator | ||||||||||||||||||
| volumes: | ||||||||||||||||||
|
|
@@ -502,19 +516,26 @@ volumes: | |||||||||||||||||
| EOF | ||||||||||||||||||
|
|
||||||||||||||||||
| if [ "$IS_ENTERPRISE" = true ]; then | ||||||||||||||||||
| sed -i "s/validator:${DOCKER_IMAGE}/evalidator:${DOCKER_IMAGE_EBLOBBER}/g" ${PROJECT_ROOT}/docker-compose.yml | ||||||||||||||||||
| sed -i "s/blobber:${DOCKER_IMAGE}/eblobber:${DOCKER_IMAGE_EBLOBBER}/g" ${PROJECT_ROOT}/docker-compose.yml | ||||||||||||||||||
| else | ||||||||||||||||||
| # Add validator dependency and link for non-enterprise deployments if USE_VALIDATOR is true | ||||||||||||||||||
| if [ "$USE_VALIDATOR" = true ]; then | ||||||||||||||||||
| sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml | ||||||||||||||||||
| sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml | ||||||||||||||||||
|
Comment on lines
+523
to
+524
|
||||||||||||||||||
| sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml | |
| sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml | |
| if ! grep -q ' - validator' ${PROJECT_ROOT}/docker-compose.yml; then | |
| sed -i '/depends_on:/a\ - validator' ${PROJECT_ROOT}/docker-compose.yml | |
| fi | |
| if ! grep -q ' - validator:validator' ${PROJECT_ROOT}/docker-compose.yml; then | |
| sed -i '/links:/a\ - validator:validator' ${PROJECT_ROOT}/docker-compose.yml | |
| fi |
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.
[nitpick] The repeated check for 'if [ "$IS_ENTERPRISE" != true ]' across multiple diff sections suggests an opportunity to refactor this condition into a variable or function to enhance consistency and maintainability.