Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more examples and detailed documentation #105

Open
joshuaboniface opened this issue Aug 2, 2020 · 5 comments
Open

Provide more examples and detailed documentation #105

joshuaboniface opened this issue Aug 2, 2020 · 5 comments

Comments

@joshuaboniface
Copy link

I'm trying to use Mirrorbits to set up a mirror system for our project (https://github.com/jellyfin/jellyfin), but I'm finding the lack of documentation difficult to work around. Hopefully my questions provide a starting point - I'm willing to help out here, but ultimately I think a detailed explanation of a full, production-grade setup would be very helpful here. I'm willing to document mine when I get it working. Now for the questions:

Is mirrorbits pushing data to the mirrors via rsync? It seems like it from the code, so I set up a write only = yes rsync on the target mirror, but when I scan I get no files:

 $ mirrorbits scan -enable -rsync tor1
Scanning tor1... 0 files indexed, 0 known and 0 removed
  ∟ Enabled

What do I need to do to force the initial sync? Is this a manual step?

Do I need an rsync config on the source server?

Can I use the source server as a mirror too? It seems like no, but want to be sure.

Thanks!

@joshuaboniface
Copy link
Author

I think I've been able to answer most of the questions my self by testing it out.

  1. Mirrors must always pull and initial sync is a manual step. Despite several issues referencing a "push" or "sync" command, I can't find it in the code. Mirrorbits then "scan"s the mirror via a read-only rsync command which verifies the files.

  2. Since it's pull, I did need an rsync config on the source server, though I could use push rsync manually too.

  3. I was able to use the source server as a mirror via some nginx trickery, basically making a second alias for my "repo" directory that did not forward proxy towards mirrorbits, and setting this as a fallback.

https://gist.github.com/PalinuroSec/f0bfb815240573ab1b0b58f3c76620d4 was also immensely helpful in setting up the NGiNX configuration.

@joshuaboniface
Copy link
Author

I ended up writing a blog post on the Jellyfin experience with Mirrorbits, meant partially as a guide. For anyone who comes looking: https://jellyfin.org/posts/mirrorbits-cdn/

@fauust
Copy link
Contributor

fauust commented Nov 19, 2021

@joshuaboniface your blog post was extremely helpful, first because I could quickly implement mirrorbits for my organization and also because while searching for mirroring tools I found a very nice replacement for plex and I am super happy with jellyfin so far...Thanks!

Would you consider adding it to the wiki? I would like to contribute to your guide (some stuff are missing and I am not sure about the systemd unit that you proposed). So, having it here would help improvements and contributions IMO.

What do you think?

@joshuaboniface
Copy link
Author

joshuaboniface commented Feb 27, 2022

@fauust Sorry I missed this - yes, I'd be interested in getting it added to the Wiki here with any generalizations/enhancements as needed! Feel free to proceed, the blog post is under CC-BY-ND-4.0 but I hereby grant an exception to the "no derivatives" clause for use within the Mirrorbits GitHub repo.

@fauust
Copy link
Contributor

fauust commented Mar 1, 2022

Hi @joshuaboniface thanks a lot for sharing.
I'll try to work on adding this in the next weeks, not sure when though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants