Hi i run a few different linux distributions and architectures and have some from server so slow that they update in KB/s for example with ubuntu on ARM. I'm learning up automation, how would i go about
- creating a local only linux mirror/cache
- updating that mirror/cache regularly automatically
- automating the router to wake up the file server to update that cache and shutting it down when finished
- additionally if possible, update other VMs/devices after the file server updates.
I have access to my router to create static DNS entries as well and i have a file server that consumes a lot of power when turned on but it is very fast (does gzip close to 1GB/s which is the raid's peak performance). It takes more than 200W just keeping it on and no matter what i do cant reduce the wattage to under 100W so i decided to just have it at max performance and only turn it on when i need it.
I bricked one of the ARM boards OS and cant open it up to access the SD card, as one of the ubuntu upgrades went too slow that it timed out and messed up the firmware update as an example. I figured since i use a few distros very often that i might as well have the update process done from a local cache as an exercise to learning ansible.
I would like help in learning how to do this be it here or links to resources in how to do what i'd like.
For Debian and Ubuntu based systems is it more benefit able when you use
apt-cacher-ng
instad of apt mirror imhothe reason for this decision is that you only and really only only hold requested packages without taking the time to jeep anything up2date
Myself using this for around 10+ years to reduce the cost and traffic. It supports any kind of proxy supporting distribution which should be mostly all.
Ok one point is that you need to catch onwtimes a package but if its required one times more it will be delivered by the cache.
This is potentially a bit off topic due to the recommendation rule, but anyways...
There's a fair amount to unpack here, but I'd start with looking at:
reposync
tool, Ubuntu -apt-mirror
tool.cron
for the schedulingMore generally, you may want to look at things like Bash scripting or Python scripting to automate small tasks. I tend to use Bash for stuff initially, then Python if it's getting too complex, then Golang if it really needs static types or I'll be distributing the tool.