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

The local mode of the agon sidecar listen to localhost only #62

Closed
cyriltovena opened this issue Jan 22, 2018 · 9 comments
Closed

The local mode of the agon sidecar listen to localhost only #62

cyriltovena opened this issue Jan 22, 2018 · 9 comments
Assignees
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. good first issue These are great first issues. If you are looking for a place to start, start here! kind/feature New features for Agones
Milestone

Comments

@cyriltovena
Copy link
Collaborator

cyriltovena commented Jan 22, 2018

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 :

docker run -p 59357:59357/tcp gcr.io/agon-images/gameservers-sidecar --local

And start testing their SDK integration.

/cc @markmandel

@markmandel
Copy link
Member

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?

@markmandel
Copy link
Member

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?

@markmandel
Copy link
Member

(Whoops, wrong button)

@cyriltovena
Copy link
Collaborator Author

cyriltovena commented Jan 22, 2018

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.

@cyriltovena cyriltovena changed the title The local mode of the agon SDK listen to localhost only The local mode of the agon sidecar listen to localhost only Jan 23, 2018
@cyriltovena
Copy link
Collaborator Author

Also the title was wrong 😞

@markmandel
Copy link
Member

markmandel commented Jan 23, 2018

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?

@cyriltovena
Copy link
Collaborator Author

Yes correct ! And i've shared my images as you said ;).

@markmandel
Copy link
Member

Got it! Okay cool - that should be relatively simple to do.

@markmandel markmandel added kind/feature New features for Agones good first issue These are great first issues. If you are looking for a place to start, start here! area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. labels Jan 23, 2018
@markmandel
Copy link
Member

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.

@markmandel markmandel added this to the 0.1 milestone Jan 24, 2018
@markmandel markmandel self-assigned this Feb 4, 2018
markmandel added a commit that referenced this issue Feb 4, 2018
This makes it easy to run the sidecar from a
Docker container, with `--address=0.0.0.0` to bind
the server any address.

Closes #62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. good first issue These are great first issues. If you are looking for a place to start, start here! kind/feature New features for Agones
Projects
None yet
Development

No branches or pull requests

2 participants