Hello,

I wonder if it’s possible to download in artifact stanza binary from windows shared drive on Nomad windows client.

artifact {
source      = "\\path\to\binary"


}

When I try to use it I have an error:
failed to download artifact “path” relative paths require a module with pwd

Hi,

Artefacts uses go-getter library GitHub - hashicorp/go-getter: Package for downloading things from a string URL using a variety of protocols.

Have you tried?

artifact {
source = "file::\\path\to\binary"
}


I tried and now I have this error:

As @resmo mentioned, Nomad uses go-getter to fetch artifacts, but we disable the file getter for a few reasons:

1. to prevent task from being able to fetch arbitrary files from the system for security reasons.
2. Nomad can’t tell if the file exists in the client, and the allocation will fail if scheduled in the wrong client.

To access files from the client you will need a host volume.

Thanks for the explanation

Is possible to use host volume without root privileges though?

I managed to setup node.js http server as a workaround but like to know if there is better way.

Hum…good question. In general we recommend running the Nomad client agents as root, but I think that, if the agent user has access to the entire path of the host volume, it it would work

Let me know how it goes if you give it try.

Yes, it works

1. Create directory