Completely automatic updates


(Dan Mills) #1

Hi guys,

Just wanted to put this out there: I’d like for Discourse to automatically update itself when a new version is avaialble.

The current two-click upgrade is impressive, but I really just blindly click the buttons, tab away to something else, and close it later without inspecting the output. I would benefit more from a completely automated process that emails me to report success or failure of the upgrade.

Bonus points if updates can be scheduled to happen within certain windows (so I can pick a time with low traffic and when I’d be awake to fix a failure). Extra bonus points if it can attempt rollback on failure to prevent downtime. For my purposes, though, these would be gravy and not necessary.

Dan


(Jeff Atwood) #2

That is the long term goal, but it may take a while to get there. In the meantime, hopefully clicking one button in a browser every month is not too onerous of an ask :wink:


(Dan Mills) #3

Indeed it is not :smile:

Glad to know it’s on the roadmap!


(Joe Seyfried) #4

Here’s the big

but:

please, please, pretty please make this configurable. Sites with a considerable number of plugins are very prone of being offline if an update changes some interfacing logics. I need to test updates on my staging site before they go live. I’m totally happy with the easy updating, plus you get a nice email notifying you of new releases.


(omfg) #5

I was going to say something like that, but slightly different, so I’ll still say it:

but:
please, please, pretty please disable this by default

I can see why some people might want to enable it, but for me it’s either “Disabled” or chmod 600 on appropriate update scripts…


(Sam Saffron) #6

we do not plan to add support for completely automatic updates in the foreseeable future, the process is too risky, you need to be around to troubleshoot if stuff goes wrong.

We may eventually get there, but not using current mechanism


(Dan Mills) #7

Completely understand that this would be the case for many. But in my case, I’d likely just shut it down temporarily until I can spend some time to figure it out. I don’t care about uptime.

As for risk, you have complete control over the Docker environment, no? Seems like way more control than any desktop app gets :smile:

Anyway - the click to upgrade process is fine. Just wanted to throw my $.02 out there.


(João Pimentel Ferreira) #8

if someone wants to be really up-to-date I’d say that it’s more like every week :blush:


#9

Hi Sam,

Our discourse was running a version or two behind and I could see the message saying it is out of date in the Dashboard. For some reason, today I noticed that it is up to date

I am very certain that I have not clicked the upgrade button in the Dashboard however I did a ./launcher rebuild app because I had installed new SSL certificates and changed the hostname to use a CNAME. Not sure if the rebuild triggered the update. Just curious.

If the upgrade is not done by rebuild then is there anyway in the logs that I can find out how was the discourse upgraded?


(Sam Saffron) #10

This upgrade is absolutely 100% done by rebuild, that is what it does, get latest launcher from git, nukes old version, upgrades, spins up new versions


(Andrew Byrne) #11

Wow, so is there a way to rebuild with out upgrade?
I have added a plugin to a production and restarted and was a bit surprised to see a version update after.

Or can we add a plugin with out a rebuild app?


(Brian Lockwood) #12

@Andrew_Byrne You can update or add a plugin by getting into your docker container by using the docker exec -it {containerid} /bin/bash once you in cd to the plugins dir and you can do git commands here to update or add a new plugin. once you have done this you just need to restart the rails process that is running the app. Hope this helps you out.


(Sam Saffron) #13

If I needed 100% automatic updates I would

  1. split to a web + database containers
  2. put web containers behind a load balancer
  3. build a new web image, cycle it in once I am sure it is responding properly to 200s

This is very complicated to do in a safe way, hence it is not automatic .

Definately don’t be entering containers and changing config inside outside of our supported docker manager that works on a single host, single container setup.