Closed cyriltovena closed 6 years ago
I'm not sure I 100% follow this ticket.
Long term, a developer won't need to build the sidecar - there will be a binary download (Linux, OSX, Windows) - so that won't be a blocker for a developer.
This is already a build artifact of make build
(or at least it should be). They should be found in agon/gameservers/sidecar/bin
.
I figured this would be best, as then developers don't need much other than to run the binary itself - rather than worrying about Docker tooling.
I'm not sure if that answers the question or the issue?
Or is this a feature request, being able to specify the address the sidecar is attached to? i.e. it would be nice to not be bound to connections from localhost?
(Whoops, wrong button)
This is already a build artifact of make build (or at least it should be). They should be found in agon/gameservers/sidecar/bin.
Well to get the artifact, as of today, they need the whole tooling installed properly (WSL, Docker, bindmount, etc)
Also it's easier to versioned and share docker component but yes, I didn't know you where planing in the long term to allow pre-built package.
My Idea was since there no pre-built package we could use the docker image, but then the current image listen to only localhost so we would need to change that.
If you want to stick with binary download, let's close.
Also the title was wrong 😞
I don't think I do that right now, but yes - for each release (and build as part of the CI system), you should be able to download the sidecar binary for that build - once this is a public system, it will be hosted on Google Cloud Storage as a downloadable artifact for each release, and test build.
That being said, there is nothing to stop you running the docker image you are building as the local version - and tell your developers to use this.
Doing a the docker run
you showed above works (although I haven't tested actually connecting to it)
Am I correct then that the issue is actually that we should add a --address
option to the sidecar, so you can bind to 0.0.0.0 for example, and allow connections from anywhere, so if you WANT to run the sidecar in local mode in a container, then you can.
Is that what you are driving at?
Yes correct ! And i've shared my images as you said ;).
Got it! Okay cool - that should be relatively simple to do.
Issue looks to be here: https://github.com/googleprivate/agon/blob/master/gameservers/sidecar/main.go#L64
Would need to add and bind a new "address" flag and env var, and default it to "localhost", and then replace the "localhost" value in that line with the address value.
When a game developer want to test his build locally, he has to build the sidecar via go and run it locally on the machine so it listen to localhost.
But we could just allow to change the listen address when we are in --local mode or listen on any address.
If so developer could just use :
And start testing their SDK integration.
/cc @markmandel