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

Review: Quickstart: Edit a Game Server #3030

Closed
scozirge opened this issue Mar 15, 2023 · 6 comments
Closed

Review: Quickstart: Edit a Game Server #3030

scozirge opened this issue Mar 15, 2023 · 6 comments
Assignees
Labels
awaiting-maintainer Block issues from being stale/obsolete/closed good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs. kind/documentation Documentation for Agones

Comments

@scozirge
Copy link

What happened:
I follow the tutorial Quickstart: Edit a Game Server
https://agones.dev/site/docs/getting-started/edit-first-gameserver-go/
but fail to build docker image on windows, it says
=> ERROR [builder 5/5] RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server

What you expected to happen:
It shoud build image success

How to reproduce it (as minimally and precisely as possible):

  1. pull the porject
  2. open \examples\simple-game-server by vs code
  3. follow the tutorial here https://agones.dev/site/docs/getting-started/edit-first-gameserver-go/
  4. when setting the environment, it will fail since I am using windows (GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o bin/server -a -v main.go)
    so I change cmd like below:
    set GOOS=linux && set GOARCH=amd64 && set CGO_ENABLED=0 && go build -o bin/server -a -v main.go
  5. when building image, it fail. docker build -t gcr.io/[PROJECT_ID]/agones-simple-game-server:modified .

Anything else we need to know?:

Environment:

  • Agones version: v1
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • Install method (yaml/helm):
  • Troubleshooting guide log(s):
  • Others:
@scozirge scozirge added the kind/bug These are bugs. label Mar 15, 2023
@markmandel
Copy link
Member

This falls because we use simple game server to test with, so it imports from the parent gopath, which the tutorial doesn't (shouldn't???) cover.

We should adjust the tutorial to work a different way (possibly?), Or build from the root of the project like we do in the project, or maybe part of the tutorial is editing the go.mod file to point to released SDKs?

@markmandel markmandel added the kind/documentation Documentation for Agones label Mar 15, 2023
@scozirge
Copy link
Author

sorry, I am new to docker. I fail to build an image and have no idea how to fix it. I post my question on slack and you suggest me file an issue here. Back to the question, how to fix this error

ERROR [builder 5/5] RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server
[builder 5/5] RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server .:
#14 0.315 no Go files in /go/src/agones.dev/agones/examples/simple-game-server

@markmandel
Copy link
Member

Summary: the tutorial is currently broken, it's not your fault, so I wouldn't stress about it 👍🏻

If you are new to Docker and Kubernetes, I'd strongly recommend going through these resources: https://agones.dev/site/docs/prerequisite-knowledge/

Copy link

github-actions bot commented May 1, 2024

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

@github-actions github-actions bot added the stale Pending closure unless there is a strong objection. label May 1, 2024
@markmandel
Copy link
Member

I'm going to leave this open - what should happen is a review of https://agones.dev/site/docs/getting-started/edit-first-gameserver-go/ should be done.

  • Make sure all steps work.
  • Is there a way we can get rid of the use of make in the tutorial? It's not what we want developers to do be doing themselves (and obfuscated the basic commands.
  • We can also remove the Google Cloud specific pieces (and maybe the minikube ones too?) since nothing here is Google Cloud specific to make it easier.

@markmandel markmandel changed the title Fail to build docker image on windows Review: Quickstart: Edit a Game Server May 23, 2024
@markmandel markmandel added awaiting-maintainer Block issues from being stale/obsolete/closed help wanted We would love help on these issues. Please come help us! good first issue These are great first issues. If you are looking for a place to start, start here! and removed stale Pending closure unless there is a strong objection. labels May 23, 2024
@markmandel
Copy link
Member

On review, #3776 fixes this, so closing 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Block issues from being stale/obsolete/closed good first issue These are great first issues. If you are looking for a place to start, start here! help wanted We would love help on these issues. Please come help us! kind/bug These are bugs. kind/documentation Documentation for Agones
Projects
None yet
Development

No branches or pull requests

3 participants