Initial kosmos_gitea cookbook #168
No reviewers
Labels
No Label
service
accounts
service
discourse
service
drone-ci
service
email
service
garage
service
gitea
service
ipfs
service
mastodon
service
postgres
service
remotestorage
service
wiki
service
xmpp
bug
design
dev environment
docs
duplicate
enhancement
feature
good first issue
idea
invalid
kredits-1
kredits-2
kredits-3
on hold
ops
question
release
major
release
minor
release
patch
security
ui/ux
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: kosmos/chef#168
Loading…
Reference in New Issue
No description provided.
Delete Branch "feature/147-gitea_cookbook"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
WIP: Initial kosmos_gitea cookbookto Initial kosmos_gitea cookbookI 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 keys
onhttp://gitea.kosmos.org/admin so the users' public keys are copied to the
/home/git/.ssh/authorized_key
file, 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_keys
file 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. 👍