View previous topic :: View next topic |
Author |
Message |
carboxamide n00b
Joined: 19 Apr 2022 Posts: 10
|
Posted: Sat Jun 01, 2024 9:53 pm Post subject: binhost remote server for mutliple contributors? |
|
|
I have 2 (and more in the future) machines that I want to host a binhost for. Both machines are moderately capable. I want the following setup:
- the binary host lives on a separate machine from the 2. a NAS-like raspberry pi server that is always online and serves the files statically.
- When running emerge on any of the machines, the binhost server is checked if it has the needed packages (using `--getbinpkg` maybe).
- if the binhost has the package, then it is used when emerging
- if the binhost does not have the package, the package will be compiled on the machine and a binary package will be created using `--buildpkg`. The created binpkg should then be uploaded to the server hosting the binhost, so that if another machine needs it in the future, it will not have to be compiled again
Here is what I tried, but did not work:
- have a regular `rsync` job that runs after every emerge, which syncs the current machine's `/var/cache/binpkgs` to the remote server
- have an nginx static file server running on the directory that all the machines are rsync'ing their binary packages to
- point to this binary host using `/etc/portage/binrepos.conf`
- run emerge with `getbinpkg` and `buildpkg`
This unfortunately does not seem to work, and I am guessing it is because the `Packages` file is not being accurate (it is different for every machine). When I run emerge, no binary packages get pulled, and I get the non-stopping error: Code: | binhost package index is not supported: 'None' |
I am aware of the possibility to use NFS, but this setup is more manual. I will often not be on the same local network as the raspberry pi, so I have to always make sure to connect it before I run emerge. My local wifi connection is not that good anyways. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Sat Jun 01, 2024 10:41 pm Post subject: |
|
|
carboxamide,
if NFS cannot work for you. have you consider using sshfs? |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3432
|
Posted: Sat Jun 01, 2024 11:18 pm Post subject: |
|
|
AFAIR emerge also supports hooks, so you could attempt to mount your nfs with distfiles and binpkgs from there, possibly testing your network with ping first. This way it should work good on your home network and still work as usual in the wild, and not require manual setup every time.
No, I haven't used them, but this might be a good starting point for research https://wiki.gentoo.org/wiki/Handbook:X86/Portage/Advanced#Hooking_into_the_emerge_process
https://wiki.gentoo.org/wiki/Gentoo_Binary_Host_Quickstart#binrepos.conf this might be worth a shot too, though you still need some way to build packages for your clients, which will probably get us back to hooks or netmounts... With only 2 clients the buildhost itself might be good enough for getting stuff ready, but then again, this would probably require some maintenance, like updating the list of packages the clients will need. _________________ Make Computing Fun Again |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|