nomad icon indicating copy to clipboard operation
nomad copied to clipboard

[agent] Serve API over Unix domain sockets

Open angrycub opened this issue 2 years ago • 1 comments

This PR pairs with #16872 to provide the server side configuration and implementation for serving the Nomad API over unix domain sockets.

For local testing, you can use socat to provide a suitable proxy

nomad agent -dev -api-socket-path /tmp/run/nomad.sock &
socat -d -d TCP4-LISTEN:14646,reuseaddr,fork UNIX:/tmp/run/nomad.sock

In another terminal

export NOMAD_ADDR=http://127.0.0.1:14646
nomad namespace list

Contents:

  • Add api_socket config
  • Update tests for new config
  • Enable socket listener
  • Add flags to agent for socket config

Fixes: https://github.com/hashicorp/nomad/issues/1639

angrycub avatar Apr 13 '23 20:04 angrycub

Ref: https://hashicorp.atlassian.net/browse/NET-10375

tgross avatar Jul 08 '24 15:07 tgross