Commit Graph
2259 Commits
Author SHA1 Message Date
raucao fb0c7b2b1c Add a build phase, make deployment revision-driven
Split the deployment into kosmos-mastodon::build (checkout + bundle/yarn/assets, no database) and kosmos-mastodon::deploy (migrations + services), dispatched by the new 'build' attribute. Both phases are idempotent per checked-out revision via stamps, and the migration/restart/search-index chain is now triggered by the deployed revision instead of the git resource, so it still runs when the build was pre-staged.
2026-10-07 18:08:22 +02:00
raucao 9dfdf6bc9b Remove the backup gem from Mastodon
The shared backup cookbook hardcodes postgresql-client-12, which does not exist on Ubuntu 24.04. Drop the Mastodon backup recipe and its role inclusion; the PostgreSQL standby is the safety net. The backup cookbook itself is still used by other services.
2026-10-07 17:53:57 +02:00
raucao ec2645c5da Install LibreTranslate in a virtualenv
Ubuntu 24.04's system Python is externally managed (PEP 668) and refuses pip installs. Also bump LibreTranslate from 1.3.8 to 1.9.6, since the former pulls ctranslate2 2.24.0 which has no Python 3.12 wheels.
2026-10-07 17:44:16 +02:00
raucao b09808b12e Drop the java cookbook dependency
The java cookbook's openjdk recipe unconditionally adds the dead openjdk-r PPA on Ubuntu and cannot be told not to, which breaks on Ubuntu 24.04. Elasticsearch 7.x ships a bundled JDK and no JAVA_HOME is configured, so no system Java is needed.
2026-10-07 17:26:40 +02:00
raucao 8a11cd88f7 Create search indices during deploy, import in background
Mastodon 4.4+ can create/upgrade the Elasticsearch indices and mappings without importing data. Do that synchronously during the deployment so search does not fail on a missing index, then populate the (potentially very long) import via a systemd unit started with --no-block so the maintenance window is not extended.
2026-10-07 17:17:27 +02:00
raucao 9fe5def5f9 Move Mastodon deploy flag to the mastodon role
Set kosmos-mastodon.deploy to false as a role default, making it overridable per node, and drop the node-level attribute.
2026-10-07 16:51:18 +02:00
raucao fef57f1ee1 Update mastodon-4 node to dependency-only deployment 2026-10-07 16:41:40 +02:00
raucao 591d6dc4ec Split Mastodon runtime deps from deployment, use Redis cluster
Add a kosmos-mastodon::dependencies recipe with everything needed to run Mastodon (Node, Ruby, libvips, Elasticsearch, packages) but without the app deployment. The default recipe includes it and only runs the deployment when node['kosmos-mastodon']['deploy'] is true, so a VM can be prepared ahead of a maintenance window.

Stop using the local redisio instance and connect to the external Redis cluster (redis_server role, db 2, password from the credentials data bag) instead. Remove the redisio service dependencies from the systemd units and drop the redisio cookbook dependency.
2026-10-07 16:41:28 +02:00
raucao 735145f5a9 Add mastodon-4 node and client config 2026-10-07 16:13:53 +02:00
raucao b60ca687ec Upgrade Mastodon to 4.7
Bump the production branch to 4.7 and adjust for the changes between 4.3 and 4.7:

- Node 24.21.0 and Ruby 4.0.7 (via ruby-build v20260924)
- Redis 7.4.11 (Mastodon 4.5 requires >= 7.0)
- Replace ImageMagick with libvips (required since 4.6) and libidn11 with libidn
- Split database migrations into pre-/post-deployment phases and rebuild
  the Elasticsearch accounts index mappings (required since 4.4)
- Remove the OTP_SECRET environment variable (removed in 4.4)
- Disable email subscriptions (new optional feature in 4.6) and force the
  default locale (DEFAULT_LOCALE no longer overrides it since 4.4)
- Add the new fasp Sidekiq queue
- Enable corepack for yarn instead of the removed no-arg 'corepack prepare'
2026-10-07 16:12:48 +02:00
raucao c72fe46e3e Merge pull request 'Update Gitea to 28.1.0' (#680) from chore/upgrade_gitea into master
Reviewed-on: #680
2026-10-06 21:09:13 +00:00
raucao 3d733e6980 Update Gitea to 28.1.0 2026-10-06 23:08:19 +02:00
greg d48b9fc9dc Merge pull request 'Migrate to new Redis cluster' (#679) from chore/migrate_redis into master
Reviewed-on: #679
Reviewed-by: Greg <greg@kosmos.org>
2026-10-06 15:33:12 +00:00
raucao 103ce389de Updated nodes (Redis migration) 2026-10-06 17:26:54 +02:00
raucao 9c7f5cee21 Add Redis password to akkounts, liquor cabinet 2026-10-06 17:22:09 +02:00
raucao df36aff732 Merge pull request 'Upgrade ejabberd, fix its cookbook test suite' (#677) from chore/upgrade_ejabberd into master
Reviewed-on: #677
Reviewed-by: Greg <greg@kosmos.org>
2026-10-05 14:30:35 +00:00
raucao c64f3c064b ejabberd config changes for upgrade 2026-10-05 16:05:32 +02:00
raucao 2de2a3ef18 Fix/refactor test suite for our ejabberd cookbook 2026-10-04 14:54:06 +02:00
raucao d632389cb2 Fix Erlang cookie needing a restart instead of reload 2026-10-04 14:53:44 +02:00
raucao 6c2cf9af41 Upgrade ejabberd to 26.09 2026-10-04 14:53:10 +02:00
raucao 663d10d322 Merge pull request 'Upgrade Gitea to 28.0.0, Gitea Runner to 4.0.0' (#676) from chore/upgrade_gitea into master
Reviewed-on: #676
2026-10-04 10:46:10 +00:00
raucao 2488631eb6 Upgrade Gitea Runner to 4.0.0 2026-10-04 12:44:17 +02:00
raucao af35f70a5e Upgrade Gitea to 28.0.0
closes #675
2026-10-04 12:33:54 +02:00
greg 7d9ba8aa03 Merge pull request 'Update/refactor Sockethub cookbook for 5.0, deploy new Sockethub VM behind OpenResty' (#673) from feature/sockethub_5.0 into master
Reviewed-on: #673
Reviewed-by: Greg <greg@kosmos.org>
2026-09-23 09:48:03 +00:00
greg 78d5d262d5 Merge branch 'master' into feature/sockethub_5.0 2026-09-23 11:47:32 +02:00
greg 2ba84c45a9 Merge pull request 'Automatically apply changed Redis server configs' (#674) from bugfix/redis_config into master
Reviewed-on: #674
Reviewed-by: Greg <greg@kosmos.org>
2026-09-23 09:41:29 +00:00
raucao c44bb365ce Automatically apply changed Redis configs 2026-09-22 16:53:12 +02:00
raucao 455dc47916 Update nodes/clients 2026-09-22 16:47:33 +02:00
raucao 911080ae81 Update/refactor Sockethub cookbook for 5.0
See CHANGELOG.md for the important changes
2026-09-22 16:45:16 +02:00
raucao edd7cc44de Make Redis password optional 2026-09-22 15:33:52 +02:00
greg 671ee2eae0 Fix nodes submodule 2026-09-22 11:52:39 +02:00
greg 9e78939f1e Update nodes submodule 2026-09-22 11:47:33 +02:00
raucao d4ff2a42db Merge pull request 'Update Redis cookbook, Redis major version' (#672) from feature/redis_8 into master
Reviewed-on: #672
Reviewed-by: Râu Cao <raucao@kosmos.org>
2026-09-21 18:26:36 +00:00
greg 0310f08d14 Switch to redisio cookbook version 8.0.0
It switched to modern resources, see https://github.com/sous-chefs/redisio
2026-09-21 19:26:50 +02:00
greg aa5bebe52a Update redisio cookbook to version 8.0.0 2026-09-21 19:21:57 +02:00
raucao 26a5d92239 Merge pull request 'Allow browser/CORS access to Gitea repos' (#671) from feature/gitea_cors into master
Reviewed-on: #671
2026-09-20 08:34:28 +00:00
raucao aa8e550406 Allow browser/CORS access to Gitea repos 2026-09-20 10:32:51 +02:00
raucao 7a9d114d9f Update nodes 2026-08-27 16:42:45 -06:00
raucao eff0edf247 Upgrade BTCPay 2026-08-24 15:12:05 -06:00
raucao 3e80a4ec64 Remove node 2026-08-20 07:49:54 -06:00
raucao 744dce7b46 Merge pull request 'Add script for manually crediting lndhub.go accounts' (#669) from dev/lndhub_credit_account into master
Reviewed-on: #669
2026-08-18 17:01:29 +00:00
raucao b34ee24490 Add script for manually crediting lndhub.go accounts 2026-08-18 10:58:21 -06:00
greg eb444f1191 Merge pull request 'Improve SpamAssassin config, add custom rules' (#668) from email/spamassassin_rules into master
Reviewed-on: #668
Reviewed-by: Greg <greg@kosmos.org>
2026-08-17 21:16:44 +00:00
raucao eae40fd55b Add custom spam rules
Targeting known campaigns
2026-08-17 14:58:42 -06:00
raucao 413f02d9c1 Fix commercial validity lists poisoning Bayes db, harden Bayes learning 2026-08-17 14:57:10 -06:00
raucao 2bd6da0064 Auto-update spamassassin rules 2026-08-17 14:56:29 -06:00
greg 2042339174 Merge pull request 'Cache successful Blossom responses' (#666) from feature/blossom_cache into master
Reviewed-on: #666
Reviewed-by: Greg <greg@kosmos.org>
2026-08-16 18:52:30 +00:00
raucao 6b967c9ac1 Update nodes 2026-08-16 12:19:19 -06:00
raucao 0224a99fdb Add upstream_cache_status to Nginx JSON log format 2026-08-16 12:17:34 -06:00
raucao f6f0d5b22d Cache successful Blossom responses
Cache returned files from Blossom on the Nginx hosts, until either
deleted by the user or hitting the global cache size limit (1 GB)
2026-08-16 12:17:09 -06:00