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

Add watchtower service to automatically upgrade the shard and proxy. #3057

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christos-h
Copy link
Contributor

@christos-h christos-h commented Dec 18, 2024

Motivation

During testnet we would like validators to be updated automatically.

Proposal

Add watch-tower to docker-compose.yml monitoring only the proxy and shards.

Caveats

  1. Kubernetes is going to require a different approach and is in general going to require more work + refactoring.
  2. The validators must use the external image tagged with the network name, for example:
./deploy-validator.sh my-domain.com --remote-image  us-docker.pkg.dev/linera-io-dev/linera-public-registry/linera:testnet-archimedes

If a local image is used, automatic updating won't work since provenance is not shared with remote images.

This is a feature not a bug, if validators want they can build everything from scratch and opt-out from "forced" updates. However I see no reason why they might choose to.

Test Plan

Manual testing. CI will catch functional regressions.

Release Plan

  • These changes should be backported to the latest testnet branch, then
    • be released in a validator hotfix.

Links

https://containrrr.dev/watchtower/

@christos-h christos-h force-pushed the add-watchtower-docker-compose branch from 57ebebe to ee548ee Compare December 18, 2024 19:33
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: [ "--interval", "30", "proxy", "shard" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are those minutes or seconds?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's seconds https://containrrr.dev/watchtower/arguments/#poll_interval
Seems like the default is 24h

Copy link
Contributor

@ndr-ds ndr-ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: [ "--interval", "30", "proxy", "shard" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's seconds https://containrrr.dev/watchtower/arguments/#poll_interval
Seems like the default is 24h

container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: [ "--interval", "30", "proxy", "shard" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also pass --cleanup? To avoid old images accumulating

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

Successfully merging this pull request may close these issues.

3 participants