20 Commits

Author SHA1 Message Date
Zuul
d1ac0aee2d Merge "etherpad: fix robots.txt" 2021-02-24 00:02:04 +00:00
Ian Wienand
51733e5623 borg-backup: implement saving a stream, use for database backups
Add facility to borg-backup role to run a command and save the output
of it to a separate archive file during the backup process.

This is mostly useful for database backups.  Compressed on-disk logs
are terrible for differential backups because revisions have
essentially no common data.  By saving the uncompressed stream
directly from mysqldump, we allow borg the chance to de-duplicate,
saving considerable space on the backup servers.

This is implemented for our ansible-managed servers currently doing
dumps.  We also add it to the testinfra.

This also separates the archive names for the filesystem and stream
backup with unique prefixes so they can be pruned separately.
Otherwise we end up keeping only one of the stream or filesystem
backups which isn't the intention.  However, due to issues with
--append-only mode we are not issuing prune commands at this time.

Note the updated dump commands are updated slightly, particularly with
"--skip-extended-insert" which was suggested by mordred and
significantly improves incremental diff-ability by being slightly more
verbose but keeping much more of the output stable across dumps.

Change-Id: I500062c1c52c74a567621df9aaa716de804ffae7
2021-02-03 11:43:12 +11:00
Ian Wienand
90106e917a etherpad: fix robots.txt
Fix the path to robots.txt and ensure it exists with testinfra

Change-Id: Iacf9db38ee61cb8f17f261b422c0f2ac1d0b5e45
2020-11-20 19:13:37 +11:00
Ian Wienand
1006f478c1 etherpad: reduce backup rotations
The database dumps are ~3gb each, so are starting to fill up the disk.
Reduce on-disk rotations to 2 and rely on remote backups more.

Change-Id: Ie8fc8fd7c4c36ca37e6813104f4c711ea55186ab
2020-11-10 09:24:34 +11:00
Clark Boylan
6e368cd61e Don't recompress db backups
We're using logrotate to keep a small number of db backups locally. We
write these backups to disk compressed. We don't want logrotate to
recompress them. This is unnecessary extra work.

Change-Id: Iafe1628ff421f47cf3e5cbee14998eeceb60be4c
2020-10-19 07:06:47 -07:00
Jeremy Stanley
78781ecfa0 Upgrade Etherpad to 1.8.4
Release notes for 1.8.3 and 1.8.4 mention a number of useful fixes
(there was no 1.8.1 nor 1.8.2). In particular, a workaround was
included for a known source of client-side hangs (some of our broken
"loading..." pads appear to exhibit similar log entries suggesting
this could address that long-standing problem). Unfortunately, in
the breaking changes, it's noted that plugin compatibility may be
impacted so we should test the one plugin we're using to make sure
it's still okay.

We force the skinName setting to no-skin as the default has changed
to colibris in 1.8.3. We don't want colibris, at least not yet, as it
breaks our existing headings plugin.

We also make a small change to the css in the editor so that each line
has its text fully rendered. See https://github.com/ether/etherpad-lite/issues/4106
for more details.

Change-Id: Ieae29a1d0fe28f879abd35b191291357bb5d3f2c
2020-06-11 10:26:45 -07:00
Clark Boylan
2e2ee170f8 Fix rooted path to docker-compose
In places like crontab entries we use full paths to executables because
PATH is different under cron. Unfortunately, this meant we broke
docker-compose commands using /usr/bin/docker-compose when we installed
it under /usr/local/bin/docker-compose. In particular this impacted
database backups on gitea nodes and etherpad.

Update these paths so that everything is happy again.

Change-Id: Ib001baab419325ef1a43ac8e3364e755a6655617
2020-04-22 14:09:46 -07:00
Zuul
5e4901b7c6 Merge "Install docker-compose from pypi" 2020-04-17 19:11:19 +00:00
Clark Boylan
8eb981b47f Install docker-compose from pypi
We want to use stop_grace_period to manage gerrit service stops. This
feature was added in docker-compose 1.10 but the distro provides 1.5.
Work around this by installing docker-compose from pypi.

This seems like a useful feature and we want to manage docker-compose
the same way globally so move docker-compose installation into the
install-docker role.

New docker-compose has slightly different output that we must check for
in the gitea start/stop machinery. We also need to check for different
container name formatting in our test cases. We should pause here and
consider if this has any upgrade implications for our existing services.

Change-Id: Ia8249a2b84a2ef167ee4ffd66d7a7e7cff8e21fb
2020-04-16 12:08:00 -07:00
Monty Taylor
d231d6177e Grant access to robots.txt
Apache doesn't like serving files it hasn't been allowed to.

Change-Id: I1113c44f9621229074804d60eba7549ae1236583
2020-04-16 12:28:12 -05:00
Monty Taylor
3469673a11 Add apache connection tuning back to apache
This was missed in the migration.

Change-Id: I09ac1f117b62b659f93ce01b73a4270378d2e25d
2020-04-16 12:14:08 -05:00
Clark Boylan
c042a52ee4 Fix etherpad port 80 logging
This was copy pasted from the gerrit config and we didn't
s/gerrit/etherpad/ on the log file path for port 80 vhost.

Change-Id: Ie5494c239360a6de3042f34cc3dc050867b92b39
2020-04-15 10:07:50 -07:00
Monty Taylor
7657b69387 Build and use our own etherpad image
We need to install the ep_headings plugin. We've got a hack in place
to do it in prod, but it seems like every time we npm install the
plugin in ansible, we need to restart the etherpad container
for $reasons.

It's cleaner to just build an image based on upstream with ep_headings
installed.

Change-Id: Id3b31bbabbbc5f6dcfe56486e48916384292f693
2020-04-13 08:07:09 -05:00
Zuul
48fd1460a9 Merge "Install ep_headings module" 2020-04-11 16:59:35 +00:00
Monty Taylor
3620ae5886 Install ep_headings module
We need to install the ep_headings plugin, which we were doing
before. We could also do this by building a custom image, but for
now just bind-mount it in.

Change-Id: I95f7c0dff4f1de8709a1e5e32eb818ef2852a654
2020-04-11 08:39:54 -05:00
Zuul
9579d7ce40 Merge "Change Etherpad default intro text" 2020-04-10 18:37:49 +00:00
Monty Taylor
f7300215c7 Change Etherpad default intro text
The existing text has an out of date link. Update that. Also, mention
opendev.

Change-Id: Id57113fd5543e5c3639f6684da27275893e55bc8
2020-04-09 13:12:24 -05:00
Monty Taylor
9e6e57838f Set production NODE_ENV
Without this we run in development mode. The logs indicate this is
less good and production mode is faster/better.

Change-Id: Idc19bdcb84375f29cb973f5271e8c090465c7f5b
2020-04-08 14:04:39 -05:00
Monty Taylor
81a1e235d0 Configure etherpad to use utf8mb4
We need to set this in the settings.json.

While we're there, set the defaults in my.cnf. I don't think that
actually matters, but it also shouldn't hurt.

Change-Id: I52e65136383f6c06d1693dd3d396f527c7e0b377
2020-04-08 14:02:17 -05:00
Monty Taylor
b23515c623 Make a new dockerized etherpad.opendev.org
Upstream likes building the settings file into the image, but that's
less exciting, let's bind-mount ours in.

Depends-On: https://review.opendev.org/717491/
Change-Id: Ia1894d884ef2a84e1282345b77fe07bf8898f367
2020-04-07 11:10:57 -05:00