prysm-docker-compose icon indicating copy to clipboard operation
prysm-docker-compose copied to clipboard

Keep local configuration separate from upstream

Open PandaWhisperer opened this issue 5 years ago • 3 comments

Summary

As mentioned in https://github.com/stefa2k/prysm-docker-compose/issues/20#issuecomment-646804586, if one uses this repo to manage a Prysm installation, it is somewhat cumbersome to keep up to date with changes to the repo while also maintaining local configuration changes, some of which (like passwords) are mandatory.

For instance, I should pick my own validator key password and set it in .env and validator/keystore.json, but if one of these files is updated in the repository, my local changes will prevent me from pulling these updates.

We should devise a method to keep local changes to any configuration files separate from the repository, similar to how a local docker-compose.override.yaml can be used to make changes to the docker-compose configuration without having to edit docker-compose.yml.

Details

So far, I have identified the following files to be likely to contain local changes that should survive an upstream update:

Definitely have local changes (password)

  • .env (likely to change upstream)
  • validator/keystore.json (unlikely to change upstream)

Possibly have local changes (external IP, graffiti)

  • config/*.yaml

PandaWhisperer avatar Jun 19 '20 18:06 PandaWhisperer

There are a couple of things in here:

Password in .env will be replaced by using prysm-ansible and its vars/vars.yaml settings to manage passwords/settings.

Local changes in the git repository are managed usually by using either git worktree or git stash. I do it this way:

git stash
git pull
git stash pop

And then review the merge conflicts if any appear, resolve them and work from there. This also reflects the approach I use to make a high-availability os and prysm-docker-compose (pdc) upgrade in my ansible scripts, which is now working too.

There will be some easy-to-follow wiki soon for prysm-ansible.

Feedback welcome as always!

stefa2k avatar Jun 19 '20 18:06 stefa2k

It's been an while and there are some changes to this setup as well as prysm-ansible. Playbook os-pdc-upgrade should do exactly what you looking for. It's still lacking documentation though.

stefa2k avatar Jul 16 '20 08:07 stefa2k

closed by accident

stefa2k avatar Jul 16 '20 08:07 stefa2k