100 Commits
Author SHA1 Message Date
raucao dc4771fd6b Merge pull request 'Upgrade Sockethub to 5.0.0-beta.0, serve info page' (#685) from chore/upgrade_sockethub into master
Reviewed-on: #685
2026-10-12 20:35:18 +00:00
raucao dea89ea2c0 Upgrade Sockethub to 5.0.0-beta.0, serve info page 2026-10-12 22:33:22 +02:00
raucao 2df9e00ab0 Merge pull request 'Ignore Chef config, provide example file' (#684) from dev/ignore_chef-config into master
Reviewed-on: #684
2026-10-11 10:28:03 +00:00
raucao 9bc9245583 Ignore Chef config, provide example file
This allows admins to adjust the config to their needs, e.g. using an
absolute path for `encrypted_data_bag_secret`.
2026-10-11 12:21:29 +02:00
raucao 8b1e6458d9 Merge pull request 'Upgrade Gitea Runner to 5.0.0' (#683) from chore/upgrade_gitea-runner into master
Reviewed-on: #683
2026-10-11 10:15:28 +00:00
raucao c1ccaf482a Upgrade Gitea Runner to 5.0.0 2026-10-11 12:12:52 +02:00
raucao 17285bc2c0 Merge pull request 'Upgrade Mastodon from 4.3 to 4.7, deploy on new Ubuntu 24.04 VM' (#681) from chore/upgrade_mastodon into master
Reviewed-on: #681
Reviewed-by: Greg <greg@kosmos.org>
2026-10-08 13:02:46 +00:00
raucao 63e4401715 Update Mastodon data bag, nodes 2026-10-08 14:28:16 +02:00
raucao 2bb5b582ec Deploy Mastodon from now on
The mastodon role now always deploys (deploy=true), so a plain converge rebuilds and restarts on new production-4.7 commits.
2026-10-08 12:43:35 +02:00
raucao 8ac0b965b2 Declare the search deploy unit before the migration chain
The migration chain starts mastodon-search-deploy.service immediately, but the systemd_unit resource was declared later in the recipe, so the unit did not exist yet and systemctl failed with 'Unit not found'.
2026-10-08 12:21:24 +02:00
raucao af4983d747 Record revision stamps as the mastodon user
The stamp files' lazy git call ran as root, which git rejects on the mastodon-owned repository (dubious ownership), silently writing an empty stamp. Use execute resources with the mastodon user instead so git works and the revision is recorded.
2026-10-08 11:51:23 +02:00
raucao 1b564c285d Give the mastodon user a /home/mastodon home
The mastodon user's home was /opt/mastodon, i.e. the clone destination, so writing the SSH deploy key into ~/.ssh made the directory non-empty and Chef's git resource silently skipped cloning (it only clones into an empty directory). Use a dedicated /home/mastodon home for the user and keep the clone destination separate. Also clear a non-git (partial) clone destination before cloning.
2026-10-08 11:43:47 +02:00
raucao 0696d03374 Replace the removed bundler --deployment flag
Bundler 4 (shipped with Ruby 4) removed --deployment. Use 'bundle config set --local deployment true' (frozen + vendor/bundle) and the 'without' setting instead, in the Mastodon, akkounts and liquor-cabinet cookbooks.
2026-10-08 11:34:46 +02:00
raucao b0718a5dac Ensure the SSH deploy key ends with a newline
OpenSSH's PEM parser rejects a private key file without a trailing newline ('error in libcrypto').
2026-10-08 11:30:09 +02:00
raucao aeeb900f14 Add repo deploy key 2026-10-08 10:53:51 +02:00
raucao a3877e620e Create the mastodon home directory in the dependencies recipe
The user resource does not manage the home directory, so removing /opt/mastodon broke the build phase when it tried to create /opt/mastodon/.ssh.
2026-10-07 19:49:52 +02:00
raucao abfd654ae5 Clone the private Mastodon repo with an SSH deploy key
The repository is private, so use git@gitea.kosmos.org with a read-only deploy key stored in credentials/mastodon (repo_deploy_key). The pinned gitea host key is an attribute.
2026-10-07 19:41:43 +02:00
raucao d05f00dae2 Pre-stage the Mastodon 4.7 build on mastodon-4 2026-10-07 18:08:30 +02:00
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
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
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
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
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
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
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
raucao 451903f663 Enable Sieve and ManageSieve for Dovecot
Enables both sieve and managesieved, and adds a global rule that moves
detected spam to a user's Junk folder automatically
2026-08-15 17:29:41 -06:00
raucao 7345eaceb1 Update VM base image 2026-08-15 15:44:05 -06:00
raucao 098dcd4e32 Auto-configure swap
Create a swapfile and configure it to be used for swap, immediately and
on boot; defaults to half the size of RAM. See attribute for overriding
configs to tune size or swappiness.
2026-08-14 12:10:37 -06:00
raucao bd0e0dc810 Update nodes 2026-08-14 09:42:10 -06:00
raucao 4971bbfd1a Update nodes 2026-08-10 21:04:49 -06:00
raucao 7e55a1f1d1 Tweak timeoutsec for akkounts service 2026-08-10 17:22:21 -06:00
raucao 2abd33aba7 Add privacy policy URL to strfry config 2026-08-10 10:21:11 -06:00
raucao 67877f1880 Merge pull request 'Akkounts: Set up Bun properly, upgrade Ruby' (#660) from chore/akkounts_bun_ruby into master
Reviewed-on: #660
2026-08-10 01:06:33 +00:00
raucao d0804bd7dc akkounts: Set up Bun properly, upgrade Ruby 2026-08-09 19:04:19 -06:00
raucao 71a27eb3ca Add caching for Gitea Actions, improve performance 2026-08-08 10:11:28 -06:00
raucao 63d6b1eb9c Update nodes 2026-08-07 20:21:22 -06:00
raucao de2c4f27fe Merge pull request 'Upgrade BTCPay Server, NBXplorer, Node.js' (#658) from chore/upgrade_btcpay into master
Reviewed-on: #658
2026-08-08 02:20:06 +00:00
raucao 956a58a310 Upgrade Node.js to LTS 2026-08-07 20:12:01 -06:00
raucao f453a3004d Fix implicit conversion of integer to string 2026-08-07 20:11:32 -06:00
raucao da969e7709 Upgrade NBXplorer and BTCPay Server 2026-08-07 20:11:05 -06:00
raucao 4fe2f34557 Update nodes 2026-08-07 08:27:56 -06:00
raucao 4b74dcdf07 Scrape strfry metrics 2026-08-07 08:26:51 -06:00
raucao 777efbca4c Disallow public access to strfry metrics endpoint 2026-08-07 08:26:31 -06:00
raucao a8294f25ab Upgrade strfry to 1.1.1
kosmos/strfry-cookbook#1
2026-08-07 08:26:08 -06:00
raucao 8d0c6bc301 Update backup ignorelist 2026-07-24 19:16:41 +02:00
raucao 80766f2473 Update nodes 2026-07-24 19:16:41 +02:00
raucao d9a59e064e Merge pull request 'Make create_vm work on all OS versions in use' (#653) from bugfix/create_vm into master
Reviewed-on: #653
Reviewed-by: Greg <greg@kosmos.org>
2026-07-24 17:14:44 +00:00
raucao 16cb333991 Merge branch 'master' into bugfix/create_vm 2026-07-24 15:27:28 +02:00
raucao 7386de86d7 Make create_vm work on all OS versions in use
Makes it work with the same cloudinit code on Ubuntu 20.04 by mounting
it from a custom ISO as CD-ROM
2026-07-24 15:19:59 +02:00
raucao 5ff6046169 Add new Redis node 2026-07-24 15:19:43 +02:00
raucao 093a98b753 Add new Redis node 2026-07-23 17:48:15 +02:00
raucao 7b76fc1579 Merge pull request 'Split user creation into separate base recipe; add script for mass-converging nodes' (#652) from chore/split_users_recipe into master
Reviewed-on: #652
2026-07-23 15:47:52 +00:00
raucao 527603bd63 Add script for mass-converging
E.g. just the new users recipe
2026-07-23 17:43:36 +02:00
raucao bd3e8d8c26 Merge pull request 'Replace my SSH key' (#651) from chore/greg_ssh_key into master
Reviewed-on: #651
2026-07-20 11:24:37 +00:00
raucao 3c740a0b92 Merge pull request 'Move node configs to submodule from private repo' (#650) from chore/nodes_submodule into master
Reviewed-on: #650
2026-07-13 15:24:26 +00:00
raucao 4e0131597f Re-add nodes as submodule from private repo 2026-07-13 17:20:16 +02:00
raucao 742ca590f2 Remove node configs 2026-07-13 17:19:07 +02:00
raucao 4ecfb8fc7f Merge pull request 'Add default tmux config with plugins, plus custom user configs' (#648) from feature/tmux into master
Reviewed-on: #648
Reviewed-by: Greg <greg@kosmos.org>
2026-07-13 15:14:04 +00:00
raucao 66481aa4c4 Merge pull request 'Upgrade Sentry to 26.6.0' (#649) from chore/upgrade_sentry into master
Reviewed-on: #649
Reviewed-by: Greg <greg@kosmos.org>
2026-07-13 15:08:14 +00:00
raucao 626662a7ff Merge pull request 'Add a recipe to install the zerotier ohai plugin' (#647) from feature/ohai_zerotier into master
Reviewed-on: #647
Reviewed-by: Râu Cao <raucao@kosmos.org>
2026-07-13 15:00:47 +00:00
raucao 875b23c746 Upgrade Sentry to 26.6.0 2026-07-13 16:00:05 +02:00
raucao b34c3ad20b Add default tmux config and plugins 2026-07-13 15:39:47 +02:00
raucao 736d4effa4 Upgrade RS discourse, increase service timeouts 2026-07-10 11:30:11 +02:00
raucao 1ebe0e4074 Merge pull request 'Update akkounts cookbook, deploy new akkounts VM' (#645) from chore/akkounts into master
Reviewed-on: #645
2026-07-10 09:29:44 +00:00
raucao 9250b2c726 Deploy new akkounts node, remove old one 2026-07-10 11:27:01 +02:00
raucao 6807b8f5bc Update akkounts cookbook, deploy new akkounts VM
* Fix: add missing directory resource
* New nodejs cookbook usage
* Remove Redis entirely (not using local Redis anymore)
2026-07-10 11:24:42 +02:00
raucao 0338e56d4c Merge pull request 'Upgrade nodejs cookbook from 7.3 to 11.0' (#644) from chore/upgrade_nodejs_cookbook into master
Reviewed-on: #644
2026-07-10 09:23:02 +00:00