Open coryschwartz opened 3 years ago
i think i'd probably be okay saying that we would prefer to do this by shutting down the current bot, and spinning up a new one with the newer version.
@coryschwartz just to confirm, if I gracefully shut down a dealbot today and restart it, will it automatically snap to the latest versions? If so, agree with Will and we can pursue this as a quality of life improvement / p3 in the future.
Do we need to be able to upgrade components of existing dealbot daemons? This would be, for example, to upgrade the lotus version, or the dealbot software of an already-running bot.
If we find ourselves wanting to upgrade bots and the only state we care about is the wallet, simply deleting the bot and recreating it is an easy enough thing to do. There are some benefits to treating the bot daemons this way -- for example log messages produced by the daemon would always be produced by the same software versions. So long as the lifespan of the dealbot daemons is sufficiently short, this might be the best way to go about it. We want the dealbots to be fairly short-lived anyway.
The downside of delete-and-recreate, of course, is that the deal data volumes are deleted and would not carry over to the next bot, and the drain process might be too long to live with the bug, so there might be times where upgrading versions is necessary.
Anyone with kubernetes can upgrade docker image versions at any time. But is this something that should be added to the self-serve UI also?
If we want to upgrade the lotus version out of band, using kubernetes tools, the process would be something like this:
or since we use helm, we could also upgrade it with the helm CLI also.
if we want self-serve users to be able to do this through the UI, I think we could use the same endpoint for daemon creation or upgrading, and this would be mostly a change to the web UI, and only a small change to the controller self-serve code. Helm can be made to install a new release or upgrade an existing release (as well as other features, such as rolling back to a previous release). We aren't exposing any of this throught he self-serve UI, but we could potentially add the ability to upgrade lotus and dealbot container versions if there is need for it in the UI.
What do you think?