Configure/deploy HTTP upload service for Kosmos Chat/XMPP #245
Labels
Clear labels
monitoring
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
security
ui/ux
wontfix
service
discourse
Kosmos Community Forums
Infrastructure metrics, alerts, notifications, etc.
service
accounts
Kosmos Accounts
service
drone-ci
Kosmos Drone CI
service
email
mail.kosmos.org
service
garage
S3-compatible object storage
service
gitea
Kosmos Gitea
service
ipfs
Kosmos IPFS
service
mastodon
kosmos.social
service
nostr
Relays, Blossom server, etc.
service
postgres
Database cluster
service
remotestorage
Portable data storage for the Web
service
wiki
Kosmos Wiki
service
xmpp
Kosmos Chat
Something is not working
Graphic/visual design
Config, builds, CI, deployment, etc.
Documentation
This issue or pull request already exists
Improving existing functionality
New functionality
Dive in, and start contributing
Something to consider
Not a bug
Small contribution
Medium contribution
Large contribution
Currently not actionable
Manual IT ops activities
Looking for an answer
release
major
release
minor
release
patch
All your base are belong to us
User interface, process design, etc.
This won't be fixed
No labels
kredits-2
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#245
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In order to be able to run multiple ejabberd nodes, we need to have user uploads go to a central external service, instead of each node directly. This configures/deploys a compatible upload service on https://uploads.kosmos.chat.
It is based on a Perl module for Nginx, which implements XEP 0363.
It contains an additional nginx install recipe for a setup with the HTTP Perl Module, and removes the dependency on the default recipe from the certbot recipe. This may break certbot resource usage in one or more unrelated cookbooks, in which case you can just include
kosmos-nginxright before the certbot resource is used.I tried it with the new cluster node (after fixing iptables being weird on draco after the recent reboot), and when I got it working I manually added the config on andromeda, which we cannot provision with chef anymore.
All uploads now go to
uploads-1on draco! Here's my first production test:https://uploads.kosmos.chat/791c7ed148e453f934ef56e1a4acb79a30845f0f/8SBtwY2eToAhPIaAy0IKaWUTNVH0oBwNh38k8crs/chilis.jpeg
Ugh, that's dumb: ejabberd accepted my config with
reload_configand then just failed when I removed the second cluster node, as well as when actually restarting it. Saying it cannot configure http uploads without@hostvariable when using multiple vhosts. :/There's an option to configure subdirectory levels in
upload.pm, but that'll have to wait until tomorrow.I have solved the last remaining issue, by moving the upload config to the respective vhosts config files and configuring a subdirectory (just hash of respective user address domain).
Here's my successful production test: https://uploads.kosmos.chat/8af2c77/791c7ed148e453f934ef56e1a4acb79a30845f0f/iMNpkgBBCLOpmQoHX5TqhQKUbZG4gHHDlPm0cva2/japan-map-in-english.jpeg
LGTM!