Skip to content
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

Use variables for execution explorer deployment #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dapplion
Copy link

@dapplion dapplion commented Jun 27, 2022

  • Generalize explorer deployment with variable.
  • Add explorer.yml to hold those variables.

Includes the variables used in #49

@parithosh we can generalize the handling of secrets in a following PR

@parithosh I've committed a proposed explorer.yml here but please feel free to update the actual one used for mainnet-shadow-fork-7

NETWORK=Ethereum
SUBNETWORK=Testnet
BLOCK_TRANSFORMER=base
POOL_SIZE=15
CHAIN_SPEC_PATH=/custom_config_data/genesis.json
CHAIN_SPEC_PATH={{execution_explorer_genesis_cont_path}}
Copy link
Owner

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"

Copy link
Author

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

Copy link
Owner

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?

@parithosh
Copy link
Owner

Our manner of secret handling involves keybase. I'm open to ansible vault secrets as an alternative, but that might need to be a deeper discussion including some others on the team.

@dapplion
Copy link
Author

Our manner of secret handling involves keybase. I'm open to ansible vault secrets as an alternative, but that might need to be a deeper discussion including some others on the team.

What about having variables that depend on secrets documented in each group like

explorer.yml

# Set in secrets.yaml
# explorer_postgres_password: "{{ lookup('pipe', 'keybase fs read /keybase/team/ethereum.devops/eth2/merge-devnets/merge-devnet-3/explorer-postgres') }}"

Then in a gitignored secrets.yaml you have

explorer_postgres_password: "{{ lookup('pipe', 'keybase fs read /keybase/team/ethereum.devops/eth2/merge-devnets/merge-

And in my gitignored secrets.yaml I have the secret specified in some other way

@parithosh
Copy link
Owner

The issue with a generic secrets.yaml file is that every role needs to have access to all the secrets. It isn't an issue per-se, but it isn't really best practice. We can try it out if you think its a big QoL improvement, the secrets only exist in local disk anyway.

@dapplion
Copy link
Author

The issue with a generic secrets.yaml file is that every role needs to have access to all the secrets. It isn't an issue per-se, but it isn't really best practice. We can try it out if you think its a big QoL improvement, the secrets only exist in local disk anyway.

Good point, getting this right and generic is tricky. Would make sense to commit something at least and them each one can customize it's local file while we figure out the best solution? You can commit your version of the file with keybase key loading

@parithosh
Copy link
Owner

Sure. One nice thing about the secrets.yaml approach is that its easier to switch secret management systems, you can use ansible vault, keybase or a number of other approaches without it hurting anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants