{"id":18647392,"url":"https://github.com/googleforgames/space-agon","last_synced_at":"2025-07-16T06:50:07.229Z","repository":{"id":40675744,"uuid":"490852435","full_name":"googleforgames/space-agon","owner":"googleforgames","description":"An integration demo for Agones and Open Match. The original is https://github.com/laremere/space-agon","archived":false,"fork":false,"pushed_at":"2025-03-13T01:27:34.000Z","size":13555,"stargazers_count":46,"open_issues_count":1,"forks_count":19,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-07T16:43:13.681Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/googleforgames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-10T20:34:36.000Z","updated_at":"2025-04-01T07:55:48.000Z","dependencies_parsed_at":"2023-10-12T12:35:06.301Z","dependency_job_id":"72039979-28df-46f0-a1d0-61b6d8fc64c8","html_url":"https://github.com/googleforgames/space-agon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/googleforgames/space-agon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleforgames%2Fspace-agon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleforgames%2Fspace-agon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleforgames%2Fspace-agon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleforgames%2Fspace-agon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googleforgames","download_url":"https://codeload.github.com/googleforgames/space-agon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googleforgames%2Fspace-agon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265489479,"owners_count":23775346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T06:26:04.083Z","updated_at":"2025-07-16T06:50:07.162Z","avatar_url":"https://github.com/googleforgames.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"The original work is [Laremere/space-agon](https://github.com/Laremere/space-agon).\n\n# Space Agon\n\nSpace Agon is a integrated demo of [Agones](https://agones.dev/) and\n[Open Match](https://open-match.dev/).\n\n\u003cimg src=\"./site/assets/space-agon.png\" alt=\"Space Agon Game\" width=\"250px\" height=\"250px\" /\u003e\n\n## Before Trying\n\n**Be aware of billing charges for running the cluster.**\n\nSpace Agon is intended to run on [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine) and has been tested with the configured cluster size.\nLeaving the cluster running may incur your cost. You need to be responsible for the cost.  (See pricings of [GKE](https://cloud.google.com/kubernetes-engine/pricing), [Cloud Build](https://cloud.google.com/build/pricing) and [Artifact Registry](https://cloud.google.com/artifact-registry/pricing).)\n\n## Prerequisites\n\nCreate your [Google Cloud Project](https://cloud.google.com/).\n\nInstall tools in your dev environment:\n\n- [gcloud](https://cloud.google.com/sdk/gcloud)\n- [docker](https://www.docker.com/)\n- [kubectl](https://cloud.google.com/kubernetes-engine/docs/how-to/cluster-access-for-kubectl#install_kubectl)\n- [helm](https://helm.sh/)\n- [skaffold](https://skaffold.dev/) (Optional)\n- [envsubst](https://linux.die.net/man/1/envsubst)\n- [minikube](https://minikube.sigs.k8s.io/docs/start/) (Optional)\n- [hyperkit](https://github.com/moby/hyperkit) (Optional)\n\n_[Google Cloud Shell](https://cloud.google.com/shell) has all tools you need._\n\n## Create the Resources and Install Gaming OSS\n\n### Deploy them to Google Cloud\n\n```bash\n# Set Your Project ID before you run\nexport PROJECT_ID=\u003cyour project ID\u003e\n\nexport LOCATION=us-central1\nexport ZONE=$LOCATION-a\n\nexport REPOSITORY=space-agon\n\ngcloud services enable artifactregistry.googleapis.com \\\n                        container.googleapis.com\n\ngcloud config set project $PROJECT_ID\n\ngcloud config set compute/zone $ZONE\n\n# Create cluster (using default network)\n# Set NETWORK=\u003cyour network\u003e, if you want to select the network\nmake gcloud-test-cluster\n\n# Create Artifact Registry Repository\ngcloud artifacts repositories create $REPOSITORY \\\n    --repository-format=docker \\\n    --location=$LOCATION \n\n# Assign roles to default service account\ngcloud projects add-iam-policy-binding $PROJECT_ID \\\n    --member serviceAccount:$(gcloud iam service-accounts list \\\n    --filter=\"displayName:Compute Engine default service account\" \\\n    --format=\"value(email)\") \\\n    --role roles/artifactregistry.reader\n\n# Login Artifact Registry\ngcloud auth configure-docker $LOCATION-docker.pkg.dev\n\n# Add Helm Repositories \nmake helm-repo-add\n\n# Install Agones\nmake agones-install\n\n# Install Open Match\nmake openmatch-install\n```\n\n### Deploy them to local k8s cluster by minikube\n\n```bash\n# Start minikube\n# ref: https://minikube.sigs.k8s.io/docs/commands/start/\n# Or you can other dirvers\nminikube start --cpus=\"2\" --memory=\"4096\" --kubernetes-version=v1.31.0 --driver=hyperkit\n\n# Add Helm Repositories \nmake helm-repo-add\n\n# Install minimized Agones\nmake agones-install-local\n\n# Install minimized Open Match\nmake openmatch-install-local\n```\n\n## Deploy applications\n\n### Deploy to Google Cloud\n\nMake sure you installed docker to build and push images\n\n```bash\n# Build Space Agon images\nmake build\n\n# Deploy Space Agon\nmake install\n```\n\n### Deploy to local k8s cluster by minikube\n\n```bash\n# Build Space Agon images for minikube cluster\nmake build-local\n\n# Deploy Space Agon for minikube cluster\nmake install-local\n```\n\n## View and Play\n\nGet External IP from:\n\n```bash\nkubectl get service frontend\n```\n\nWhen you run Space Agon in minikube, you should followings in another terminal:\n\n```bash\nminikube tunnel\n```\n\nOpen `http://\u003cexternal ip\u003e/` in your favorite web browser.  You can use \"Find Game\" to start searching for a match.\n\n\u003cimg src=\"./site/assets/title.png\" alt=\"Space Agon Title\" width=\"250px\" height=\"250px\" /\u003e\n\nRepeat in a second web browser window to create a second player, the players\nwill be connected and can play each other.\n\n## Access GameServer\n\nView Running Game Servers:\n\n```bash\nkubectl get gameserver\n```\n\nThen use the connect to server option with the value `\u003cip\u003e:\u003cport\u003e`.\n\n## Changing the parameters\n\nIf you'd like to modify your parameters of your deployments, you can change in [`install/helm/space-agon/values.yaml`](./install/helm/space-agon/values.yaml) or use `--set` parameters directly.\n\nSpace Agon uses [Helm](https://helm.sh/) to install the applications.\n\n```yaml\n# values.yaml\nfrontend:\n  name: frontend\n  replicas: 2\n  containerPort: 8080\n  servicePort: 80\n  serviceType: LoadBalancer \n  image: \n    repository: YOUR_REPO_NAME_HERE\n    tag: YOUR_TAG_HERE\n...\n```\n\n## Clean Up\n\n### Delete the deployment\n\n```bash\n# Uninstall Space Agon Applications\nmake uninstall\n```\n\n### Uninstall Agones\n\n```bash\nmake agones-uninstall\n```\n\n### Uninstall Open-Match\n\n```bash\nmake openmatch-uninstall\n```\n\n### (Optional) Remove Helm Repositories\n\nYou can remove Helm repositories by the command, if you do not need.\n\n```bash\nmake helm-repo-remove\n```\n\n### Delete your Google Cloud Project\n\n```bash\n# Delete project\ngcloud projects delete $PROJECT_ID\n```\n\n## (Optional) Develop Applications with Skaffold\n\nIn case testing your original match making logics, [`skaffold`](https://skaffold.dev/) can help you debug your applications.\n\n### Setup\n\n1. [Create a Space Agon cluster.](#create-the-resources-and-install-gaming-oss)\n1. [Install `skaffold`](https://skaffold.dev/docs/install/)\n\nAfter running `make build` or `make build-local`, you're ready to run `skaffold` commands.\n\n### Develop\n\nOnce you create a `skaffold.yaml`, you can run `skaffold` commands.\n\n```bash\n# You need envsubst for setting up a skaffold file\n# Setup skaffold \n\nmake skaffold-setup\n\n# For local development\n\nmake skaffold-setup-local\n\n# Build Space Agon images with Cloud Build\nskaffold build \n\n# Run Applicaitons in the local Space Agon cluster for debugging.\nskaffold dev\n\n# Use cloud profile in case of GKE (Run `make build` first)\nskaffold dev -p cloud\n\n# Check your deployed yaml file\nskaffold render\n```\n\nModifying applications or helm values during `skaffold dev` triggers Build and Deploy again automatically.  \nFor more commands and details, visit [`skaffold`](https://skaffold.dev/).\n\n## Test your Cluster\n\nWhen you would like to test the application, follow the steps below.\n\n### Google Cloud\n\n1. [Create a Space Agon k8s cluster](#create-the-resources-and-install-gaming-oss).\n1. Run below commands for integration test.\n\n```bash\n# Run you Space Agon applications\n# Optiionally, you can use `skaffold dev`\nmake install\n\n# Open another terminal and\n# Run Test command\nmake integration-test\n```\n\n### minikube\n\n1. [Create a Space Agon k8s cluster on minikube](#create-the-resources-and-install-gaming-oss).\n1. Run below commands for integration test.\n\n```bash\n# Connect to service in minikube\nminikube tunnel\n\n# Open another terminal and\n# Run Test command\nmake integration-test\n```\n\n## LICENSE\n\nThis is [Apache 2.0 License](./LICENSE).\n\n## Note\n\nThis is not an officially supported Google product.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleforgames%2Fspace-agon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogleforgames%2Fspace-agon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogleforgames%2Fspace-agon/lists"}