talkingpumpkin

joined 1 year ago
 

I want to have a local mirror/proxy for some repos I'm using.

The idea is having something I can point my reads to so that I'm free to migrate my upstream repositories whenever I want and also so that my stuff doesn't stop working if some of the jankiest third-party repos I use disappears.

I know the various forjego/gitea/gitlab/... (well, at least some of them - I didn't check the specifics) have pull mirroring, but I'm looking for something simpler... ideally something with a single config file where I list what to mirror and how often to update and which then allows anonymous read access over the network.

Does anything come to mind?

[–] [email protected] 0 points 4 months ago (2 children)

IMHO Ansible isn't much different than a bash script... it has the advantage of being "declarative" (in quotes because it's not actually declarative at all: it just has higher-level abstractions that aggregate common sysadmin CLI operations/patterns in "declarative-sounding" tasks), but it also has the disadvantage of becoming extremely convoluted the moment you need any custom logic whatsoever (yes, you can write a python extension, but you can do the same starting with a bash script too).

Also, you basically can't use ansible unless your target system has python (technically you can, but in practice all the useful stuff needs python), meaning that if you use a distro that doesn't come with python per default (eg. alpine) you'll have to manually install it or write some sort of pythonless prelude to your ansible script that does that for you, and that if your target can't run python (eg. openwrt on your very much resource-constrained wifi APs) ansible is out of the question (technically you can use it, but it's much more complex than not using it).

My two cents about configuration management for the homelab:

  • whatever you use, make sure it's something you re-read often: it will become complex and you will forget everything about it
  • keep in mind that you'll have to re-test/update your scripts at least everytime your distro version changes (eg. if you upgrade from ubuntu 22.04 to 24.04) and ideally every time one of your configured services changes (because the format of their config files may in theory change too)
  • if you can cope with a rolling-style distro, take a look at nix instead of "traditional" configuration management: nixos configuration is declarative and (in theory) guarantees that you won't ever need to recheck or update your config when updating (in reality, you'll occasionally have to edit your config, but the OS will tell you so it's not like you can unknowingly break stuff).

BTW, nixos is also not beginner-friendly in the least and all in all badly documented (documentation is extensive but unfriendly and somewhat disorganized)... good luck with that :)

[–] [email protected] 4 points 6 months ago

With the very limited number of drives one may use at home, just get the cheapest ones (*), use RAID and assume some drive may fail.

(*) whose performances meet your needs and from reputable enough sources

You can look at the backblaze stats if you like stats, but if you have ten drives 3% failure rate is exactly the same as 1% or .5% (they all just mean "use RAID and assume some drive may fail").

Also, IDK how good a reliabiliy predictor the manufacturer would be (as in every sector, reliabiliy varies from model to model), plus you would basically go by price even if you need a quantity of drives so great that stats make sense on them (wouldn't backblaze use 100% one manufacturer otherwise?)

[–] [email protected] 2 points 9 months ago

IIUC you can flash LineageOS on the shield (if you try, let us know how it goes)