Page MenuHomewrite.as

Automated upgrades
Closed, ResolvedPublic

Description

Overview

Enable admins to run an upgrade command to automatically upgrade their WriteFreely installation.

Provide an automated way to upgrade WriteFreely.

Background

Users

Instance admins.

Implementation

  • Download the latest version from an authoritative source
  • Extract and replace only application files (not *.ini or keys)
  • Restart the server (built-in?)

Related Objects

Event Timeline

matt created this task.Dec 11 2018, 4:13 PM
matt moved this task from Soon / v1.0 to Far Future on the WriteFreely board.Feb 4 2019, 10:26 PM
matt moved this task from Far Future to v1.0 on the WriteFreely board.Feb 24 2019, 9:57 PM
matt edited projects, added WriteFreely (v1.0); removed WriteFreely.
matt added a comment.Feb 27 2019, 10:17 AM

One potential library to help with this: go-update

matt added a comment.Mar 7 2019, 3:10 PM

Another option: overseer

@robjloranger What do you think would be the best way to do this to help with T600? A single Go-based utility? A simple bash script?

matt added a parent task: Restricted Maniphest Task.Jun 13 2019, 10:07 PM

I guess initially just a script would work. I haven't looked yet but the a go utillity would be nice, the admin could then just have a check for updates button which could then ask to download and confirm upgrade/restart.

matt added a comment.Jun 13 2019, 10:14 PM

Yeah, a button like that would be the end-goal. And maybe pair that with T579: WriteFreely daemon to make it all seamless.

But for now, I agree a bash script would do the trick. Especially since we control the whole droplet setup. So if you're comfortable with that, feel free to take this task.

quick ascii cast demo, running on my local machine so the restart fails as it's not running.
https://asciinema.org/a/8IaQxRBjRA955cm8Jjy86XtPi

matt added a comment.Jun 14 2019, 4:47 PM

Nice, this looks great!

I don't think we'll need to handle too many error cases right now, especially for T600, but maybe we could do exit 1 if the service fails to start?

Also, let me know if we should create a repo for things like this.

sure, I'll add that in.

I don't think we need a repo just yet, we may have other scripts in the future for things like db migrations that are only for writefreely. Once we start the one click image and other related tasks I think we should have a repo for all that. We can have our docker files there too.

matt added a comment.Jun 14 2019, 5:09 PM

Perfect 👍

matt updated the task description. (Show Details)Jun 15 2019, 12:42 AM