Bulk Updating Alpine Linux

Hey all, this might be a simple one but I have around 8 LXC Alpine Linux containers running various services. I like to keep my servers up to date but as you can imagine, sshing into 8 servers and running the update and upgrade commands can be cumbersome as well as each machine has to redownload the same packages again and again over and over.

So I guess my questions are:

  1. What is the best way to update and upgrade all 8 servers at the same time?

  2. Is there any way I can run a package cache server so I can point all 8 servers to a single server so I only need to download the packages once?

4 points · 4 comments · view on lemmy.world

4 Comments

jlh@lemmy.jlh.name · 2 pts · 3y
  1. Yes, Ansible would work for this. See the apk module. https://docs.ansible.com/ansible/latest/collections/community/general/apk_module.html

  2. Yes, you could run a caching HTTP proxy, or your own mirror and set your VMs to use it.

I would recommend looking into docker and/or Kubernetes, though. It would solve these problems in a much more automated way.

homex9@sh.itjust.works · 2 pts · 3y

You can create a local repository to host your package: https://wiki.alpinelinux.org/wiki/How_to_setup_a_Alpine_Linux_mirror

As said you can use Ansible to automate your upgrade process

pixelblut@feddit.de · 1 pts · 3y

For the updating procedure you can use Ansible. https://docs.ansible.com/ansible/latest/collections/community/general/apk_module.html And for caching packages you could set up a local mirror, cache the via squid, etc.