docker-netbootxyz icon indicating copy to clipboard operation
docker-netbootxyz copied to clipboard

local assets aren't used - correct / default path missing from README

Open danboid opened this issue 3 years ago • 16 comments

I have set up a local instance of netboot.xyz 2.0.59 under Ubuntu 22.04.

I have used its web interface to download all of the assets for a couple of distros. They seemed to download fine but netboot doesn't utilise them, it still downloads them from the internet every time.

I presume this is because I haven't configured the assets path correctly when I was setting up the container. What is the correct default assets path to use when setting up the container? We should add this path to the netboot.xyz docker container docs.

danboid avatar Jun 13 '22 18:06 danboid

I looks like the default asset path should be set to /assets/asset-mirror/releases/download or maybe it should be just /assets?

danboid avatar Jun 13 '22 22:06 danboid

I don't know how local assets are supposed to work. When I originally set up the container, I used this command:

docker run -d --name=netbootxyz -p 3000:3000 -p 69:69/udp -p 8080:80 -v /etc/netbootxyz/config:/config -v /etc/netbootxyz/assets:/assets --restart unless-stopped ghcr.io/netbootxyz/netbootxyz

I used that because I was wanting to mount a local dir ( /etc/netbootxyz/assets) in my container. It didn't seem to do that but the netboot webapp is accessible after running it. If I don't pass any -v options, I cannot access the containers web app but supposedly the -v arguments for setting asset and config dir mappings are optional?

danboid avatar Jun 14 '22 07:06 danboid

Here's how my netboot web app asset management page looks:

netboot-assets

I'm a bit confused by the layout of the right column. At the top it says 'Untracked assets' then immediately below that it lists the assets I downloaded. I would've expected that if I could see the assets in that list then my netboot server would use those instead of downloading them right? That's not happening but are these actually still 'untracked assets' or not? The untracked assets column heading is confusing because it looks like it is an empty list followed by another separate list of tracked assets but squashed into the same column. Is that what is being displayed here?

If those local assets are downloaded but untracked, how do I make them tracked? Conversely, it it possible to make tracked assets untracked? I'm not even sure what tracked means in this case? Is it just a synonym for 'downloaded and locally hosted'?

danboid avatar Jun 14 '22 07:06 danboid

Have you had time to look at fixing this yet @antonym ?

danboid avatar Oct 20 '22 15:10 danboid

I know this is old, but by chance if found the key point to getting local assets working.

On dashboard, edit boot.cfg, and set live_endpoint to your docker server address. Then netboot will look there for files.

https://netboot.xyz/docs/docker#local-mirror-access

DarkAxi0m avatar Nov 18 '23 14:11 DarkAxi0m

I know this is old, but by chance if found the key point to getting local assets working.

On dashboard, edit boot.cfg, and set live_endpoint to your docker server address. Then netboot will look there for files.

https://netboot.xyz/docs/docker#local-mirror-access

image

image

styxadmin avatar May 24 '24 10:05 styxadmin

Thanks @DarkAxi0m! I've not tried this yet but will have to give it a go soon.

It would seem that the netboot maintainer had forgot how this was supposed to work. This should be added to the netboot docs.

danboid avatar May 28 '24 09:05 danboid

I've made the adjustment and I'm still not seeing PXE clients request from local live_endpoint. I'm running netboot.xyz from Docker Compose and I'm wondering if perhaps its not picking up the new setting?

nrvale0 avatar Aug 19 '24 01:08 nrvale0

I've not tried this myself yet but did you reboot the netboot.xyz server after changing the config? Maybe you just need to restart one of its services after changing the config?

danboid avatar Aug 19 '24 06:08 danboid

I've not tried this myself yet but did you reboot the netboot.xyz server after changing the config? Maybe you just need to restart one of its services after changing the config?

I've tried to restart the Compose stack including rm -rf'ing the contents of the config directory and same result. I'll loop back on it after I find a work-around for the outstanding issues with IPv6 in iPXE.

nrvale0 avatar Aug 19 '24 15:08 nrvale0

I was able to work around the iPXE IPv6 oddities. I'm still not getting bootstrap from the cached Local Assets (ex: Debian 12*) even when live_endpoint is set and Docker Compose stack has been restarted. I'll see if I can find a log file somewhere just in case I have not specified the URL correctly and it is then falling back to the list in the GH repo.

nrvale0 avatar Aug 19 '24 16:08 nrvale0