Page MenuHomeSoftware Heritage

Allow upgrades in hedgedoc manifests
ClosedPublic

Authored by olasd on Feb 2 2021, 8:44 PM.

Details

Summary

This pile of commits reworks the hedgedoc setup to:

  • make the hedgedoc a system user with no login or home directory
  • use a defined cache for yarn operations
  • install hedgedoc to a version-specific directory
  • dump database contents before upgrading to allow for version rollbacks
  • create a flag file when running bin/setup
  • don't run yarn build (the release tarball ships the relevant assets, so far as I can tell)

After reviewing it, the hedgedoc bin/setup script doesn't look very robust and
I'm tempted to just run yarn install manually instead, because that's all it's
really doing. But that means having to review the contents of the script at each
upgrade, so... meh.

Related to T2941

Test Plan

tested in vagrant from:

  • an install using the old layout
  • an install using the new layout

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd requested review of this revision.Feb 2 2021, 8:44 PM
olasd created this revision.

don't run yarn build (the release tarball ships the relevant assets, so far as I can tell)

yes, it's fine, i also read that's not necessary (no longer maybe) in their documentation.

That step was there because i recall the initial 1.7.0-rc2 i started with needed it.

Add explicit path for uploads

lgtm

And i like the new split you did for dedicated concern (apt-config, user, etc...).
I did not really know how to do that initially (well without repeating stuff), so great.

This revision is now accepted and ready to land.Feb 3 2021, 10:30 AM