This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Automatic upgrade #3197
Comments
This sounds like a lovely feature to have, now there is the ability to detect available updates (as shown by the notification), it would seem the next step would be to create the mechanism by which Portainer can "recreate" itself. I chime in here because I noted in #1649 that there was mention that due to the HTTP API not being available during upgrade that a potential solution could be to spin up a new portainer_self_updater image. I have fallen into a similar trap of trying to recreate a container and not being able to access the HTTP API during this time, however for my use-case I was recreating the proxy container via which Portainer was being accessed, namely jwilder/nginx-proxy. So it strikes me that if done mindfully there could be the opportunity to kill two birds with one stone here. My suggestion is that rather than creating a highly specialised/specific portainer_self_updater image, it could be done with a more generic image that allows any container to enable enhanced/remote recreation, force enabled for Portainer, but optionally enabled for any other container. This would solve both the self upgrade and proxy update use-cases, both of which encounter a disappearing HTTP API during the normal recreation process. Granted the proxy use-case could alternatively make use of the recreate happening purely server side within the the Portainer container, which a self upgrade could not, but rather than having three different ways to do a recreate for complexity sake it probably makes sense to stick with just two. I assume there is a good reason recreates rely on a client-server communication, and refactoring it to be completely server side just for the proxy use-case seems like a lot of effort, but tacking it onto a potentially new recreate image could be an easy win. Please let me know your thoughts. |
From a DevOps point of view: make sure this is opt out. I love software that updates itself, but I like to make that choice for when I'm ready. |
Thanks for the input guys. We started the research about this but we rebalanced our resources on other topics. Here is a summary of this past research though:
Ultimately, this feature could also be enabled when Portainer is deployed as a container (by updating the images to include a specific file inside the container like
All thoughts and ideas welcome ! |
Comment from @STaRDoGG on related container updating feature request It would be great if Portainer basically included the WatchTower functions right within it (auto-check for any container updates, and if found, update using the same arguments as the original), and also include the ability to manually check for/update a container just by clicking an "update check" icon in the "Quick Actions" list of icons. Also, a button near the top that does the same if you want to put a check in the checkboxes for several individual containers. |
For the record, this is the WatchTower container's repo: https://github.com/containrrr/watchtower |
On a related note, if you're also looking for how to self-update Portainer itself, the Organizr container does it very well. https://github.com/causefx/Organizr I haven't looked but the code might be right in the repo to make things a lot easier to add. Also, the dev, CauseFX is super cool and easy to work with, so he might be willing to help ya along if ya run into any speedbumps. =) Personally speaking, I do like containers that keep themselves updated, but I also understand wanting the option to opt-out as well. |
I'm thinking perhaps have portainer create a second container that it uses to update itself? mind, https://github.com/containrrr/watchtower does it.. For example,
|
This actually applies to more than just the Portainer instance:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Related to #1649
Now that a notification is available in app to notify the user that an update is available we should figure out a way to automate the upgrade of Portainer.
The text was updated successfully, but these errors were encountered: