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

Updates to the rust simple example. #937

Merged
merged 2 commits into from
Jul 31, 2019

Conversation

roberthbailey
Copy link
Member

@roberthbailey roberthbailey commented Jul 22, 2019

Fixes #703.

I re-ordered things into what I thought was a more useful ordering (less work -- cloud -- to more work -- local dev environment) and made it so that we could push an "official" image to the agones-images project so that you can run the example without needing to compile any code.

One thing that is weird is that while the running locally with docker instructions work for me, when I run the sample in an actual GKE cluster the game server never moves to Ready -- even though the sidecar is getting health pings the game server never transitions out of the unhealthy state. Maybe @aLekSer has an idea of why this might be?

@aLekSer
Copy link
Collaborator

aLekSer commented Jul 22, 2019

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: cbcfcd65-c425-4bd8-97b2-42c8a29a96e9

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-c1dd21f

@roberthbailey
Copy link
Member Author

@aLekSer - there aren't any images there (yet). I've been testing with images in my own project so that I only push images to the official project once the code has been reviewed.

From https://github.com/googleforgames/agones/blob/c1dd21fb90fc7b9c8ee9515789c1e2dd51e00830/examples/rust-simple/README.md:

If you want to build your own image

$ REPOSITORY=<your-repository> # e.g. gcr.io/agones-images
$ make build-image REPOSITORY=${REPOSITORY}
$ docker push ${REPOSITORY}/rust-simple-server:0.3

To run your own image, make a copy of
examples/rust-simple/gameserver.yaml,
modify the image name to the image you pushed, and run kubectl create -f gameserver.yaml.

@aLekSer
Copy link
Collaborator

aLekSer commented Jul 23, 2019

@roberthbailey thanks for clarification, just want to let you note that the original gcr.io/agones-images/rust-simple-server:0.3 should be pushed at some point for others to follow README.md.

@roberthbailey
Copy link
Member Author

Definitely. I just want to make sure that it works first (right now it doesn't -- see #938).

@aLekSer
Copy link
Collaborator

aLekSer commented Jul 23, 2019

Yes, I am new to Rust language that's why I can not provide a fix for #938 . Seems that it is needed to add some loop with sleep at the beginning on SDK connect stage.

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleanup here looks good - made one small comment similar to what I wrote on #934

I assume we aren't going to merge this until we fix #938 ?

```
make run
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/master/examples/rust-simple/gameserver.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as the C++ one, should we make this

Suggested change
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/master/examples/rust-simple/gameserver.yaml
kubectl create -f https://raw.githubusercontent.com/googleforgames/agones/<release-branch>/examples/rust-simple/gameserver.yaml

With a note saying "Where should match the Agones version you have deployed, e.g release-0.12"

Sound good?

@roberthbailey
Copy link
Member Author

I assume we aren't going to merge this until we fix #938 ?

Yes. Unless it looks like it won't be fixed before the 0.12.0 release in which case I'll cut out the part about running in a cluster and replace it with a warning that the rust SDK is still experimental.

@markmandel
Copy link
Member

Just to confirm - this is building now, but just isn't blocking? If that;s the case, I'll approve so we at least have an example that works.

@roberthbailey
Copy link
Member Author

It builds and runs following the docs. But because the container doesn't block, when running the example on GKE the pod restarts and that means that the gameserver never becomes healthy.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 5bd8f31f-50d3-4681-8ba0-17e6e360059e

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-94b06e8

@markmandel
Copy link
Member

Got it - thanks! I'll take a look, see if I can work out a quick solution as well. I've used rust before in a previous life, so hopefully it will come back to me 😄

Locally. I've got some changes to the conformance tests that will also check for the blocking functionality going forward.

@markmandel markmandel added area/examples Examples. Usually found in the `examples` directory kind/cleanup Refactoring code, fixing up documentation, etc labels Jul 25, 2019
@roberthbailey
Copy link
Member Author

And running locally works just fine.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: aaa95954-510a-4625-91e2-048be37209c9

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-823c8b3

@markmandel
Copy link
Member

Once #953 is merged, this should be good to go.

@roberthbailey
Copy link
Member Author

I'm going to re-work this to create a new tutorial like the cpp/nodejs ones. Changes should be ready shortly.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 503b34e3-0161-41c4-b738-79305fd96662

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-c971555

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 41281055-8cfb-4f75-a770-23ce3939ef97

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-eb08db4

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 754aae7f-2038-4b38-9c42-98290347c72f

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-a8074c1

@@ -0,0 +1,203 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love these 💙

Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: bc509ca0-bf91-4c28-a3fe-04504b36dee0

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/937/head:pr_937 && git checkout pr_937
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.12.0-d13b61a

@markmandel markmandel merged commit 8de0dd9 into googleforgames:master Jul 31, 2019
@roberthbailey roberthbailey deleted the rust branch August 1, 2019 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/examples Examples. Usually found in the `examples` directory kind/cleanup Refactoring code, fixing up documentation, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Split up the api group stable.agones.dev
4 participants