forked from ethereum/consensus-deployment-ansible
-
Notifications
You must be signed in to change notification settings - Fork 23
Use variables for execution explorer deployment #54
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
dapplion
wants to merge
2
commits into
parithosh:master
Choose a base branch
from
gnosischain:explorer-vars
base: master
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 1 commit
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
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,64 @@ | ||
explorer_docker_network_name: explorernet | ||
|
||
beacon_explorer_container_name: explorer | ||
execution_explorer_container_name: blockscout | ||
|
||
explorer_memory: 9000m | ||
beacon_explorer_image_name: "parithoshj/beacon-explorer:print-chain-id" | ||
execution_explorer_image_name: "skylenet/blockscout:v4.0.0-beta" | ||
|
||
explorer_first_block: 1 | ||
explorer_eth1_source_hostname: "merge-devnet-0-ethx-explorer-lighthouse-nethermind-1" | ||
explorer_eth1_source_ip_address: "{{hostvars[explorer_eth1_source_hostname].ansible_host}}" | ||
explorer_eth2_source_ip_address: "{{explorer_eth1_source_ip_address}}" | ||
|
||
explorer_postgres_container_name: postgres | ||
explorer_postgres_image_name: "postgres:12.0" | ||
explorer_postgres_memory: 9000m | ||
explorer_postgres_port: "5432" | ||
explorer_postgres_ip: "172.1.1.100" | ||
explorer_postgres_user: postgres | ||
|
||
# Set in secrets.yaml | ||
# explorer_postgres_password: "{{ lookup('pipe', 'keybase fs read /keybase/team/ethereum.devops/eth2/merge-devnets/merge-devnet-3/explorer-postgres') }}" | ||
|
||
explorer_postgres_host_dir: "{{home_dir}}/explorer_postgres_data" | ||
explorer_postgres_volumes: | ||
- "{{explorer_postgres_host_dir}}:/postgresql/data" | ||
explorer_postgres_start_args: "-i -h {{explorer_postgres_ip}}" | ||
|
||
explorer_postgres_init_volumes: | ||
- "{{explorer_host_dir}}:/src" | ||
|
||
explorer_postgres_init_args: > | ||
psql | ||
-f /src/tables.sql | ||
-d db | ||
-h {{explorer_postgres_ip}} | ||
-p {{explorer_postgres_port}} | ||
-U {{explorer_postgres_user}} | ||
explorer_host_dir: "{{home_dir}}/explorer_data" | ||
execution_explorer_genesis_host_path: "{{explorer_host_dir}}/genesis.json" | ||
execution_explorer_genesis_cont_path: /data/genesis.json | ||
execution_explorer_volumes: | ||
- "{{explorer_host_dir}}:/data" | ||
|
||
beacon_explorer_config_host_path: "{{explorer_host_dir}}/eth2_config.yaml" | ||
beacon_explorer_config_cont_path: /data/eth2_config.yaml | ||
beacon_explorer_volumes: | ||
- "{{explorer_host_dir}}:/data" | ||
|
||
beacon_explorer_start_args: "./explorer --config=/data/config.yaml" | ||
|
||
execution_explorer_start_args: 'sh -c "echo $DATABASE_URL && | ||
mix do ecto.create, ecto.migrate && | ||
exec mix phx.server" ' | ||
|
||
explorer_stats_container_name: explorerstats | ||
|
||
explorer_stats_volumes: | ||
- "{{explorer_host_dir}}:/data" | ||
|
||
explorer_stats_start_args: "./statistics --config=/data/config.yaml" | ||
|
||
explorer_beacon_extra_args: "--slots-per-archive-point=64" |
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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
--- | ||
#- import_playbook: tasks/setup_machine.yml | ||
- import_playbook: tasks/upload_beacon_explorer_data.yml | ||
# - import_playbook: tasks/upload_execution_explorer_data.yml | ||
- import_playbook: tasks/start_explorer_net.yml | ||
- import_playbook: tasks/start_explorer_postgres.yml | ||
- import_playbook: tasks/init_explorer_sql_tables.yml | ||
- import_playbook: tasks/start_beacon_explorer.yml | ||
- import_playbook: tasks/start_explorer_statistics.yml | ||
# - import_playbook: tasks/start_execution_explorer.yml | ||
|
||
# Execution | ||
- import_playbook: tasks/upload_execution_explorer_data.yml | ||
- import_playbook: tasks/start_execution_explorer.yml |
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
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.
This is the value present inside the docker container after the volume mapping , so the original value of
/custom_config_data/genesis.json
would be correct since the volume mapping is- "{{testnet_dir}}:/custom_config_data"
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.
Right, I used execution_explorer_genesis_cont_path as container path, so it's defined next to where you do the volume mapping. Both work but using execution_explorer_genesis_cont_path feels less error prone long term
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.
So your idea is that you can modify the
execution_explorer_genesis_cont_path
to rep some other file path, whereas in the current approach you'd have to search for the hardcoded paths?