Hi!
Excuse the cryptic title. I have a basic scenario to test with nixos tests: one node runs a server, second node calls the server. How do I refer to the server node from within the client node? Anything like an ip address or sth dns resolves could work.
I’ve seen examples of tests with endpoints like:
http://machine1/
and I’ve seen sometimes some use of nginx like:
services.nginx = {
enable = true;
virtualHosts."machine1" = {};
};
BUT
- my communication is not via http but some custom protocol
- I couldn’t get anything blindly similar to the examples to work for me.
- I don’t get the whole setup, I’m moving blind. What does this nginx line do? Is it crucially needed? Is there some networking/dns setup created by default in the nixos tests? Are there docs?
Here’s my need reiterated in a form of a pseudocode:
nodes = { # in nixos test
block_producer = {
networking.firewall = {
enable = true;
allowedTCPPorts = [ 3001 ];
};
services.server = {
port = 3001;
};
};
relay_node = {
services.client = {
serverAddr = {
address = "< ??? >";
port = 3001;
};
};
};
};
Thanks!