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

Move example images to Artifact Registry #2823

Merged
merged 5 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ KIND_PROFILE ?= agones
KIND_CONTAINER_NAME=$(KIND_PROFILE)-control-plane

# Game Server image to use while doing end-to-end tests
GS_TEST_IMAGE ?= gcr.io/agones-images/simple-game-server:0.14
GS_TEST_IMAGE ?= us-docker.pkg.dev/agones-images/examples/simple-game-server:0.14

# Enable all alpha feature gates. Keep in sync with `false` (alpha) entries in pkg/util/runtime/features.go:featureDefaults
ALPHA_FEATURE_GATES ?= "LifecycleContract=true&PlayerAllocationFilter=true&PlayerTracking=true&ResetMetricsOnDelete=true&SDKGracefulTermination=true&Example=true"
Expand Down
26 changes: 13 additions & 13 deletions build/includes/examples.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@
# |_|\__,_|_| \__, |\___|\__|___/
# |___/

# test all example images exist on Google Cloud Registry
test-examples-on-gcr: example-image-test.allocation-endpoint
test-examples-on-gcr: example-image-test.autoscaler-webhook
test-examples-on-gcr: example-image-test.cpp-simple
test-examples-on-gcr: example-image-test.nodejs-simple
test-examples-on-gcr: example-image-test.rust-simple
test-examples-on-gcr: example-image-test.unity-simple
test-examples-on-gcr: example-image-test.xonotic
test-examples-on-gcr: example-image-test.crd-client
test-examples-on-gcr: example-image-test.supertuxkart
test-examples-on-gcr: example-image-test.simple-game-server
# test all example images exist on Google Artifact Registry
test-examples-on-gar: example-image-test.allocation-endpoint
test-examples-on-gar: example-image-test.autoscaler-webhook
test-examples-on-gar: example-image-test.cpp-simple
test-examples-on-gar: example-image-test.nodejs-simple
test-examples-on-gar: example-image-test.rust-simple
test-examples-on-gar: example-image-test.unity-simple
test-examples-on-gar: example-image-test.xonotic
test-examples-on-gar: example-image-test.crd-client
test-examples-on-gar: example-image-test.supertuxkart
test-examples-on-gar: example-image-test.simple-game-server

push-example-golang-images: example-image-push.allocation-endpoint
push-example-golang-images: example-image-push.autoscaler-webhook
push-example-golang-images: example-image-push.crd-client
push-example-golang-images: example-image-push.supertuxkart
push-example-golang-images: example-image-push.simple-game-server

# Test to ensure the example image found in the % folder is on GCR. Fails if it is not.
# Test to ensure the example image found in the % folder is on GAR. Fails if it is not.
example-image-test.%:
$(DOCKER_RUN) bash -c "cd examples/$* && make gcr-check"
$(DOCKER_RUN) bash -c "cd examples/$* && make gar-check"

example-image-push.%:
$(DOCKER_RUN) bash -c "cd examples/$* && make push"
10 changes: 5 additions & 5 deletions docs/governance/templates/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Images available with this release:
- [gcr.io/agones-images/agones-sdk:{version}](https://gcr.io/agones-images/agones-sdk:{version})
- [gcr.io/agones-images/agones-ping:{version}](https://gcr.io/agones-images/agones-ping:{version})
- [gcr.io/agones-images/agones-allocator:{version}](https://gcr.io/agones-images/agones-allocator:{version})
{ run `make release-example-image-markdown` to populate example images section below (will be more in output than in example) }
- [gcr.io/agones-images/cpp-simple-server:{example-version}](https://gcr.io/agones-images/cpp-simple-server:{example-version})
- [gcr.io/agones-images/crd-client:{example-version}](https://gcr.io/agones-images/crd-client:{example-version})
- [gcr.io/agones-images/nodejs-simple-server:{example-version}](https://gcr.io/agones-images/nodejs-simple-server:{example-version})
- [gcr.io/agones-images/rust-simple-server:{example-version}](https://gcr.io/agones-images/rust-simple-server:{example-version})
{ run `make release-example-image-markdown` to populate example images section below (will be more in output than in example) }
- [us-docker.pkg.dev/agones-images/examples/cpp-simple-server:{example-version}](https://us-docker.pkg.dev/agones-images/examples/cpp-simple-server:{example-version})
- [us-docker.pkg.dev/agones-images/examples/crd-client:{example-version}](https://us-docker.pkg.dev/agones-images/examples/crd-client:{example-version})
- [us-docker.pkg.dev/agones-images/examples/nodejs-simple-server:{example-version}](https://us-docker.pkg.dev/agones-images/examples/nodejs-simple-server:{example-version})
- [us-docker.pkg.dev/agones-images/examples/rust-simple-server:{example-version}](https://us-docker.pkg.dev/agones-images/examples/rust-simple-server:{example-version})

Helm chart available with this release:

Expand Down
60 changes: 30 additions & 30 deletions docs/governance/templates/release_issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ and copy it into a release issue. Fill in relevant values, found inside {}
- [ ] Have permission to publish new versions of the App Engine application.
- [ ] Have write access to Agones GitHub repository.
- [ ] Run `git remote -v` and see:
- [ ] An `origin` remote that points to a personal fork of Agones, such as `git@github.com:yourname/agones.git`.
- [ ] An `upstream` remote that points to `git@github.com:googleforgames/agones.git`.
- [ ] An `origin` remote that points to a personal fork of Agones, such as `git@github.com:yourname/agones.git`.
- [ ] An `upstream` remote that points to `git@github.com:googleforgames/agones.git`.
- [ ] Have a [GitHub Personal Access Token](https://github.com/settings/tokens) with repo permissions.
- [ ] Have a `gcloud config configurations` configuration called `agones-images` that points to the same project.
- [ ] Edit access to the [Agones Release Calendar](https://calendar.google.com/calendar/u/0?cid=Z29vZ2xlLmNvbV84MjhuOGYxOGhmYnRyczR2dTRoMXNrczIxOEBncm91cC5jYWxlbmRhci5nb29nbGUuY29t)
Expand All @@ -23,7 +23,7 @@ and copy it into a release issue. Fill in relevant values, found inside {}

- [ ] Run `make shell` and run `gcloud config configurations activate agones-images`.
- [ ] Review [closed issues with no milestone](https://github.com/googleforgames/agones/issues?q=is%3Aissue+is%3Aclosed+no%3Amilestone++-label%3Ainvalid+-label%3Aduplicate+-label%3Aquestion+-label%3Awontfix++-label%3Aarea%2Fmeta) and add relevant ones to the current milestone.
- Issues tagged as `invalid`, `duplicate`, `question`, `wontfix`, or `area/meta` can be ignored
- Issues tagged as `invalid`, `duplicate`, `question`, `wontfix`, or `area/meta` can be ignored
- [ ] Review closed issues in the current milestone to ensure that they have appropriate tags.
- [ ] Review [merged PRs that have no milestone](https://github.com/googleforgames/agones/pulls?q=is%3Apr+is%3Amerged+no%3Amilestone+) and add them to the current milestone.
- [ ] Review merged PRs in the current milestone to ensure that they have appropriate tags.
Expand All @@ -33,9 +33,9 @@ and copy it into a release issue. Fill in relevant values, found inside {}
- [ ] If release candidate add the label `feature-freeze-do-not-merge` to any feature pull requests.
- [ ] `git checkout main && git pull --rebase upstream main`
- [ ] If full release, run `make site-deploy SERVICE={version}-1`, (replace . with -)
- For example, if you are creating the 1.18.0 release, then you would deploy the 1-17-0 service (release minus one, and then replace dots with dashes).
- [ ] Run `make gen-changelog` to generate the CHANGELOG.md (if release candidate
`make gen-changelog RELEASE_VERSION={version}-rc`). You will need your
- For example, if you are creating the 1.18.0 release, then you would deploy the 1-17-0 service (release minus one, and then replace dots with dashes).
- [ ] Run `make gen-changelog` to generate the CHANGELOG.md (if release candidate
`make gen-changelog RELEASE_VERSION={version}-rc`). You will need your
[GitHub Personal Access Token](https://github.com/settings/tokens) for this.
- [ ] Ensure the [helm `tag` value][values] is correct (should be {version} if a full release, {version}-rc if release candidate)
- [ ] Ensure the [helm `Chart` version values][chart] are correct (should be {version} if a full release, {version}-rc if release candidate)
Expand All @@ -44,37 +44,37 @@ and copy it into a release issue. Fill in relevant values, found inside {}
- [ ] Ensure the [`sdks/csharp/sdk/AgonesSDK.nuspec` and `sdks/csharp/sdk/csharp-sdk.csproj`][csharp] versions are correct (should be {version} if a full release, {version}-rc if release candidate)
- [ ] Update the package version in the [`sdks/unity/package.json`][unity] package file's `Version` field to {version} if a full release, {version}-rc if release candidate
- [ ] Run `make gen-install`
- [ ] Run `make test-examples-on-gcr` to ensure all example images exist on gcr.io/agones-images-
- [ ] Run `make test-examples-on-gar` to ensure all example images exist on us-docker.pkg.dev/agones-images/examples
- [ ] Create a *draft* release with the [release template][release-template]
- [ ] Make a `tag` with the release version.
- [ ] Make a `tag` with the release version.
- [ ] Site updated
- [ ] Copy the draft release content into a new `/site/content/en/blog/releases` content (this will be what you send via email).
- [ ] Review all `link_test` and `data-proofer-ignore` attributes and remove for link testing
- [ ] If full release, review and remove all instances of the `feature` shortcode
- [ ] If full release, add a link to previous version's documentation to nav dropdown.
- [ ] config.toml updates:
- [ ] If full release, update `release_branch` to the new release branch for {version}.
- [ ] If full release, update `release-version` with the new release version {version}.
- [ ] If full release, copy `dev_supported_k8s` to `supported_k8s`.
- [ ] If full release, copy `dev_aks_minor_supported_k8s` to `aks_minor_supported_k8s`.
- [ ] If full release, copy `dev_minikube_minor_supported_k8s` to `minikube_minor_supported_k8s`.
- [ ] If full release, update documentation with updated example images tags.
- [ ] Copy the draft release content into a new `/site/content/en/blog/releases` content (this will be what you send via email).
- [ ] Review all `link_test` and `data-proofer-ignore` attributes and remove for link testing
- [ ] If full release, review and remove all instances of the `feature` shortcode
- [ ] If full release, add a link to previous version's documentation to nav dropdown.
- [ ] config.toml updates:
- [ ] If full release, update `release_branch` to the new release branch for {version}.
- [ ] If full release, update `release-version` with the new release version {version}.
- [ ] If full release, copy `dev_supported_k8s` to `supported_k8s`.
- [ ] If full release, copy `dev_aks_minor_supported_k8s` to `aks_minor_supported_k8s`.
- [ ] If full release, copy `dev_minikube_minor_supported_k8s` to `minikube_minor_supported_k8s`.
- [ ] If full release, update documentation with updated example images tags.
- [ ] Create PR with these changes, and merge them with an approval.
- [ ] Run `git remote update && git checkout main && git reset --hard upstream/main` to ensure your code is in line
with upstream (unless this is a hotfix, then do the same, but for the release branch)
- [ ] Run `git remote update && git checkout main && git reset --hard upstream/main` to ensure your code is in line
with upstream (unless this is a hotfix, then do the same, but for the release branch)
- [ ] Publish SDK packages
- [ ] Run `make sdk-shell-node` to get interactive shell to publish node package. Requires Google internal process
to publish.
- [ ] Run `make sdk-publish-csharp` to deploy to NuGet. Requires login credentials. (if release candidate:
`make sdk-publish-csharp RELEASE_VERSION={version}-rc`).
Will need [NuGet API Key](https://www.nuget.org/account/apikeys) from Agones account.
- [ ] Run `make sdk-shell-node` to get interactive shell to publish node package. Requires Google internal process
to publish.
- [ ] Run `make sdk-publish-csharp` to deploy to NuGet. Requires login credentials. (if release candidate:
`make sdk-publish-csharp RELEASE_VERSION={version}-rc`).
Will need [NuGet API Key](https://www.nuget.org/account/apikeys) from Agones account.
- [ ] Run `make do-release`. (if release candidate: `make do-release RELEASE_VERSION={version}-rc`) to create and push the docker images and helm chart.
- [ ] Run `make shell` and run `gcloud config configurations activate <your development project>` to switch Agones
roberthbailey marked this conversation as resolved.
Show resolved Hide resolved
development tooling off of the `agones-images` project.
development tooling off of the `agones-images` project.
- [ ] Do a `helm repo add agones https://agones.dev/chart/stable` / `helm repo update` and verify that the new
version is available via the command `helm search repo agones --versions --devel`.
- [ ] Do a `helm install --namespace=agones-system agones agones/agones`
(`helm install --namespace=agones-system agones agones/agones --version={version}-rc` if release candidate) and a smoke test to confirm everything is working.
version is available via the command `helm search repo agones --versions --devel`.
- [ ] Do a `helm install --namespace=agones-system agones agones/agones`
(`helm install --namespace=agones-system agones agones/agones --version={version}-rc` if release candidate) and a smoke test to confirm everything is working.
- [ ] Attach all assets found in the `release` folder to the draft GitHub Release.
- [ ] If release candidate check the pre-release box on the draft GitHub Release
- [ ] Copy any review changes from the release blog post into the draft GitHub release.
Expand Down
6 changes: 3 additions & 3 deletions examples/allocation-endpoint/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/
#

REPOSITORY = gcr.io/agones-images
REPOSITORY = us-docker.pkg.dev/agones-images/examples

# Directory that this Makefile is in.
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
Expand All @@ -45,8 +45,8 @@ build:
run:
docker run --network=host $(server_tag) $(args)

# check if hosted on Google Cloud Registry
gcr-check:
# check if hosted on Google Artifact Registry
gar-check:
gcloud container images describe $(server_tag)

#output the tag for this image
Expand Down
2 changes: 1 addition & 1 deletion examples/allocation-endpoint/terraform/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ variable "project_id" {
variable "ae_proxy_image" {
type = string
description = "The docker image of the allocation proxy."
default = "gcr.io/agones-images/allocation-endpoint-proxy:latest"
default = "us-docker.pkg.dev/agones-images/examples/allocation-endpoint-proxy:0.2"
}

variable "region" {
Expand Down
6 changes: 3 additions & 3 deletions examples/autoscaler-webhook/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/
#

REPOSITORY = gcr.io/agones-images
REPOSITORY = us-docker.pkg.dev/agones-images/examples

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
project_path := $(dir $(mkfile_path))
Expand All @@ -45,8 +45,8 @@ build:
push: build
docker push $(autoscaler_webhook_tag)

# check if hosted on Google Cloud Registry
gcr-check:
# check if hosted on Google Artifact Registry
gar-check:
gcloud container images describe $(autoscaler_webhook_tag)

#output the tag for this image
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler-webhook/autoscaler-service-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
secretName: autoscalersecret
containers:
- name: autoscaler-webhook
image: gcr.io/agones-images/autoscaler-webhook:0.5
image: us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.5
imagePullPolicy: Always
volumeMounts:
- mountPath: /home/service/certs
Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler-webhook/autoscaler-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
#serviceAccount: autoscaler-webhook
containers:
- name: autoscaler-webhook
image: gcr.io/agones-images/autoscaler-webhook:0.5
image: us-docker.pkg.dev/agones-images/examples/autoscaler-webhook:0.5
imagePullPolicy: Always
ports:
- name: autoscaler
Expand Down
6 changes: 3 additions & 3 deletions examples/cpp-simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/
#

REPOSITORY = gcr.io/agones-images
REPOSITORY = us-docker.pkg.dev/agones-images/examples

# Directory that this Makefile is in.
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
Expand All @@ -42,8 +42,8 @@ root_path = $(realpath $(project_path)/../..)
build:
cd $(root_path) && docker build -f $(project_path)/Dockerfile --tag=$(server_tag) .

# check if hosted on Google Cloud Registry
gcr-check:
# check if hosted on Google Artifact Registry
gar-check:
gcloud container images describe $(server_tag)

#output the tag for this image
Expand Down
2 changes: 1 addition & 1 deletion examples/cpp-simple/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ spec:
spec:
containers:
- name: cpp-simple
image: gcr.io/agones-images/cpp-simple-server:0.12
image: us-docker.pkg.dev/agones-images/examples/cpp-simple-server:0.15
# imagePullPolicy: Always # add for development
2 changes: 1 addition & 1 deletion examples/cpp-simple/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ spec:
spec:
containers:
- name: cpp-simple
image: gcr.io/agones-images/cpp-simple-server:0.12
image: us-docker.pkg.dev/agones-images/examples/cpp-simple-server:0.15
imagePullPolicy: Always # add for development
6 changes: 3 additions & 3 deletions examples/crd-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/
#

REPOSITORY ?= gcr.io/agones-images
REPOSITORY ?= us-docker.pkg.dev/agones-images/examples

server_tag = $(REPOSITORY)/crd-client:0.7

Expand All @@ -41,8 +41,8 @@ build:
push: build
docker push $(server_tag)

# check if hosted on Google Cloud Registry
gcr-check:
# check if hosted on Google Artifact Registry
gar-check:
gcloud container images describe $(server_tag)

#output the tag for this image
Expand Down
4 changes: 2 additions & 2 deletions examples/crd-client/create-gs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ spec:
serviceAccountName: agones-controller
containers:
- name: create-gameserver
image: gcr.io/agones-images/crd-client:0.7
image: us-docker.pkg.dev/agones-images/examples/crd-client:0.7
imagePullPolicy: Always
env:
- name: GAMESERVER_IMAGE
value: "gcr.io/agones-images/simple-game-server:0.14"
value: "us-docker.pkg.dev/agones-images/examples/simple-game-server:0.14"
restartPolicy: Never
2 changes: 1 addition & 1 deletion examples/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ spec:
spec:
containers:
- name: simple-game-server
image: gcr.io/agones-images/simple-game-server:0.14
image: us-docker.pkg.dev/agones-images/examples:0.14
2 changes: 1 addition & 1 deletion examples/gameserver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spec:
spec:
containers:
- name: simple-game-server
image: gcr.io/agones-images/simple-game-server:0.14
image: us-docker.pkg.dev/agones-images/examples/simple-game-server:0.14
imagePullPolicy: Always
# nodeSelector is a label that can be used to tell Kubernetes which host
# OS to use. For Windows game servers uncomment the nodeSelector
Expand Down
6 changes: 3 additions & 3 deletions examples/nodejs-simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/
#

REPOSITORY = gcr.io/agones-images
REPOSITORY = us-docker.pkg.dev/agones-images/examples

# Directory that this Makefile is in.
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
Expand All @@ -45,8 +45,8 @@ build:
run:
docker run --network=host $(server_tag) $(args)

# check if hosted on Google Cloud Registry
gcr-check:
# check if hosted on Google Artifact Registry
gar-check:
gcloud container images describe $(server_tag)

#output the tag for this image
Expand Down
Loading