3 ms·
I wrote some open source code to automatically mirror all my commits to Keybase. </shameless plug> I think read replica mirrors are good practice for fault-to
by gargarplex 7y ago
I wrote some open source code to automatically mirror all my commits to Keybase. </shameless plug>
I think read replica mirrors are good practice for fault-tolerant systems
- ahnick 7y agolink?
- fezzez 7y agoit's probably on github
- rad_gruchalski 7y agoHopefully does not depend on github webhooks for replication!
- gargarplex 7y agoIt does, but it would've mirrored your latest commit before it went down. Anyway, here's how you connect Keybase to GitHub: https://blog.codefor.cash/2019/08/30/free-automatic-github-backups-with-keybase/ https://blog.codefor.cash/2019/08/30/free-automatic-github-b... https://github.com/codeforcash/github-to-keybase-mirror https://github.com/codeforcash/github-to-keybase-mirror Note: this was a v1, and I'm sure there are more resilient ways to do this. Critical feedback strongly encouraged (ideally along with suggestions).
- rad_gruchalski 7y agoHooks (https://git-scm.com/docs/githooks https://git-scm.com/docs/githooks) together with templates (https://coderwall.com/p/jp7d5q/create-a-global-git-commit-hook https://coderwall.com/p/jp7d5q/create-a-global-git-commit-ho...) sound like a good alternative. Edit: I can see where your solution has an advantage. When one accepts contributions, all of that can be automated with web hooks via github. Still, having to run lambda/similar for this is a bit heavy weight. Edit 2: Considering that for a release, I would opt in for release from a tag or explicit commit, that would be a non issue. Pull when needed, for redundancy, use another, self hosted bare repo. Push there in case of github down.
- gargarplex 7y agoWouldn't replacing the github hook with a git-hooks script incrementally improve the solution as it currently exists? Then, combine that with a git-hook script that designate all non-release branches push to team's Keybase repo as well? Maybe including a custom prefix in the branch name to avoid need for conflict resolution?
- gargarplex 7y agoI'm also thinking that it would be easier to use git-hooks to push to AWS CodeCommit (in a random region that GitHub is unlikely to use) paired with CloudWatch events to invoke service backup to Keybase
- gargarplex 7y agoOf course, ideally it would be a Terraform (or similar open source stack) script so it's not dependent on AWS as a vendor... I have experienced the real pains of vendor lock-in, even with cross-region there is opportunity to improve robustness
- deleted 7y ago[deleted]