Initial kosmos_gitea cookbook #168
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
lightning
Lightning address, lndhub, etc.
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
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#168
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.
The default recipe deploys the gitea binary, generates a config file and our custom Kosmos label set. The service runs as a Systemd unit.
The pg_db recipe needs to run on the primary PostgreSQL (currently andromeda).
The backup recipe is empty for now
TODO:
Update the '.ssh/authorized_keys' file with Gitea SSH keys. (Not needed for the built-in SSH server.)task on the admin screen is needed (answer: yes, this is needed, I have found a way to run it from the command line:sudo su - git -c "/usr/local/bin/gitea admin regenerate keys --config /etc/gitea/app.ini")Refs #147
Nice!
I thought we said we'd build it from source, however, so that we can easily deploy our own fixes and customizations?
I think building from source is out of scope for this PR, but since this is simply deploying a binary it wouldn't be a big task like building a Docker image. I am already moving the URL of the binary to a cookbook attribute so it's easier to override
I think we can finally migrate away Gitea to Centaurus (with the DB on Andromeda as the master). Tomorrow I will check everything on Andromeda and Centaurus, then we can pick a time and date to do the switch. It will involve a DNS switch, in preparation for this I have just lowered the TTL on gitea.kosmos.org down to 300s, the lowest Gandi supports. It was previously set to 1800s.
Here are my notes for the dump/import:
Perform a dump
From https://discourse.gitea.io/t/migrate-gitea-db-from-mariadb-to-postgresql/2072/3
Import the dump
on Andromeda:
on Centaurus:
SCP and unzip gitea-dump.zip
Log in, run
Update the '.ssh/authorized_keys' file with Gitea SSH keysonhttp://gitea.kosmos.org/admin so the users' public keys are copied to the
/home/git/.ssh/authorized_keyfile, allowing them to access git@gitea.kosmos.orgSounds good!
I think the only thing that is not clear to me is:
Also, are you sure the deployment should be part of the cookbook PR? We agreed that only master is being deployed to production, and I also don't see how the cookbook PR should include an entire production migration to begin with. The work done for that is different than for the cookbook code.
As we're importing a database dump, the
/home/git/.ssh/authorized_keysfile on centaurus will be empty at first, this admin task generates the content of the file with users' public key. It is then managed by Gitea, so new keys are automatically added, deleted keys deleted, etcThat's right, I will move this checklist to the issue instead
Yes, that's obvious from the original post. But what is this task? It is just English text in your post, but is it a script somewhere? How is it run?
Maybe should have moved the response to my question there as well. ;)
I copied your question to #147 and answered it there. Is this PR good to merge?
@raucao ^
Great work. 👍