Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any thoughts on running zeus on TCP/UDP as well? #233

Open
gja opened this issue Jan 5, 2013 · 4 comments
Open

Any thoughts on running zeus on TCP/UDP as well? #233

gja opened this issue Jan 5, 2013 · 4 comments

Comments

@gja
Copy link

gja commented Jan 5, 2013

I'm using zeus with vagrant.

I was hoping to run zeus inside the VM, and access it from outside. However, it's not possible to create a fifo inside the VM

vagrant@precise32:/vagrant$ sudo mkfifo foo
mkfifo: cannot create fifo `foo': Operation not permitted

This is probably what's causing #156 as well.

I was looking through your architecture, and it should be possible to have the client talk to the master over the socket (and keep the existing mechanism between the master and the client)

@gja
Copy link
Author

gja commented Jan 6, 2013

I actually thought of a minimally invasive way of doing thiis. I'll add a Zeus tcp command, which will create a listener. I'll listen on some tcp port, and whatever requests come in, I'll folk out to Zeus, and map stdout to the socket.

Ill be working on this today. Hopefully will have some code soon. Plus i get a chance to learn go.

@gja
Copy link
Author

gja commented Jan 6, 2013

However, what you'll need to ork on is a way to change the socket location so things still start on vagrant

gja added a commit to gja/zeus that referenced this issue Jan 6, 2013
This can be executed as follows (after running zeus tcp)
echo zeus rake middleware | nc localhost 3333
@gja
Copy link
Author

gja commented Jan 6, 2013

Tell me if you need me to reopen this issue as a pull request (i'm not sure if you can just pull from here).

I've opened zeus tcp (which maybe should be correctly called as zeus tcp-shell or something).

After running zeus tcp, you can do the following to send commands to zeus via the excellent (default available on mac) utility netcat.

echo zeus rake middleware | nc localhost 3333

If you give me a way to change the zeus.sock path, then that would be the last step to get zeus to work with vagrant :-).

Some context if you are unfamiliar with vagrant:

  • Vagrant creates a VM for your rails app
  • Your rails app is automounted into /vagrant. Because of this, files there show up as a network mount
  • Thus you cannot create a socket file over there
  • You can, however, create socket files in (say) ~/.zeus.sock

@gja
Copy link
Author

gja commented Jan 6, 2013

And yes, I know that this entire pull request is equivalent to:

(while nc.traditional -lp 3000 -e /bin/bash; do true; done) &

However, nc.traditional is not available on all linux distros (or mac OS), and its nice to have this as part of zeus itself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant