How to not use IPC socket files
I want to run constellation and Quorum in two different Docker containers. How can I connect to the private constellation API but not use a socket file but rather a full endpoint?
https://github.com/jpmorganchase/quorum-examples/blob/master/examples/7nodes/tm2.conf#L8
How can I set this to something like http://hostname:9000?
Listening on HTTP instead of socket is something that hasn't been added yet, mainly for security reasons (anything on localhost can access a localhost HTTP service.)
I'm marking this as a feature request, but in the meantime this may work for you: https://serverfault.com/questions/517906/how-to-expose-a-unix-domain-socket-directly-over-tcp
Do note that if you expose the private socket this way you are potentially allowing everyone to read and send Constellation payloads.
Hi! Thanks. I think that feature would be great for running Constellation and Quorum in two separate containers, which is more suitable in production for various reasons. It should probably be an opt-in feature, similar so people don't enable it by accident. One could also use the Ethereum node key as an authentication mechanism with constellation to make it more secure.
Although we are fine at the moment using sockets and therefore run everything inside of the same container, I looked into your recommendation a little further. Using socat, it seems like I can expose a Unix socket as a TCP socket.
However, I'm not sure how I can connect Geth to that TCP socket since it seems to only support Unix socket connections.
After some research, I found out that the same could also be achieved using SSH, by tunneling a Unix socket:
ssh -L /qdata/tm.ipc:/qdata/tm.ipc constellation_host
That's even better! That could potentially be the best general solution since it preserves the POSIX permission model.
Actually, it seemed to work fine using a shared Docker volume.
@MitchK I also used a shared Docker volume at last. But I'm not sure if there are some potential issues.
I guess you need to make sure that access to that volume is restricted. I'm not sure though if it has any performance implications. Would be interesting to test.
quorum-cloud provisions Quorum Network from scratch in AWS using ECS Fargate which, in a nutshell, has quorum and constellation/tessera in separate containers with shared volume hosting IPC file.
The setup runs well without any issues although i have not done any performance comparison/benchmarking.
Just to update that official docker containers are available (from master for now and tags are soon available)