From 07790d9e1354757d8d55ef2b0ea336fd3908560f Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 09:57:23 -0400 Subject: [PATCH 01/15] Set Up a Xonotic Game Server with K3s and Agones --- docs/contributors/michael-archer/_index.md | 6 + .../index.md | 265 ++++++++++++++++++ 2 files changed, 271 insertions(+) create mode 100644 docs/contributors/michael-archer/_index.md create mode 100644 docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md diff --git a/docs/contributors/michael-archer/_index.md b/docs/contributors/michael-archer/_index.md new file mode 100644 index 00000000000..b2777ad1fdb --- /dev/null +++ b/docs/contributors/michael-archer/_index.md @@ -0,0 +1,6 @@ +--- +title: "Michael Archer" +link: "" +email: "mailto:marcher@akamai.com" +description: "The Linode documentation library's profile page and submission listing for Michael Archer" +--- \ No newline at end of file diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md new file mode 100644 index 00000000000..c359de9b12c --- /dev/null +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -0,0 +1,265 @@ +--- +slug: xonotic-game-server +title: "Set Up a Xonotic Gaming Server with K3s and Agones" +description: "This guide demonstrates how to install and manage server software for Xonotic using Terraform, K3s, and Agones." +authors: ["Michael Archer"] +contributors: ["Michael Archer"] +published: 2025-03-20 +keywords: ['agones','xonotic','k3s','self-hosted game server'] +license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' +--- + +This guide demonstrates how to install and manage server software for Xonotic, a free and fast arena shooter game. Resources are deployed on Linode using [Terraform](https://www.terraform.io/), the infrastructure-as-code tool, and the game server installation is supported by K3s and Agones. + +[K3s](https://k3s.io/) is a lightweight Kubernetes distribution. This guide deploys K3s on a single Linode and uses it to manage your game server software. [Agones](https://agones.dev/site/) is an open-source, Kubernetes-native project specifically designed for managing dedicated game servers, and it is deployed on the K3s installation in this guide. Agones is then used to deploy and manage containers for the Xonotic game server software. + +### Before You Begin + +1. [Install Terraform](https://developer.hashicorp.com/terraform/install) on your workstation. + +1. Create an account with Linode, if you do not already have one. + +1. [Create a Linode personal access token](https://techdocs.akamai.com/linode-api/reference/get-started#personal-access-tokens), which is later used by Terraform to create resources on your Linode account. + +### Configure Terraform + +1. Create a directory for the Terraform project: + + ```command {title="Your workstation"} + mkdir xonotic + cd xonotic + ``` + +1. Inside the new directory, create a file named `main.tf` and paste in the following code. This code defines a Linode instance and sets up a firewall. + + Be sure to replace {{< placeholder "LINODE_REGION" >}} and {{< placeholder "LINODE_TYPE" >}} with a [region](https://www.linode.com/global-infrastructure/availability/) that's geographically closest to your location. + + ```file {title="main.tf"} + # Specify the required Terraform provider + terraform { + required_providers { + linode = { + source = "linode/linode" + version = ">= 1.27.0" # Ensure a version that supports metadata + } + } + } + # Define variables for sensitive information + variable "linode_token" { + description = "Linode API token" + type = string + sensitive = true + } + variable "root_password" { + description = "Root password for the instance" + type = string + sensitive = true + } + variable "admin_ip" { + description = "IPv4 address to be used to access the instance" + type = string + sensitive = true + } + + # Configure the Linode provider + provider "linode" { + token = var.linode_token + } + + # Define the cloud-init configuration + data "template_file" "cloud_init" { + template = <}}" + type = "g6-dedicated-4" + image = "linode/ubuntu20.04" + root_pass = var.root_password + booted = true + metadata { + user_data = base64encode(data.template_file.cloud_init.rendered) + } + } + # Create a firewall to allow incoming traffic on port 22 and 7000-8000 + resource "linode_firewall" "my_firewall" { + label = "xonotic-firewall" + # Drop everything that is not covered by an explicit rule + inbound_policy = "DROP" + # Allow all outbound traffic + outbound_policy = "ACCEPT" + # Rule to allow SSH (port 22) + inbound { + label = "allow-ssh" + action = "ACCEPT" + protocol = "TCP" + ports = "22" + ipv4 = var.admin_ip + } + # Rule to allow custom port range (7000-8000) + inbound { + label = "allow-custom-ports" + action = "ACCEPT" + protocol = "UDP" + ports = "7000-8000" + ipv4 = ["0.0.0.0/0"] + ipv6 = ["::/0"] + } + # Rule to allow Agones port 8080 + inbound { + label = "allow-custom-ports" + action = "ACCEPT" + protocol = "TCP" + ports = "8080" + ipv4 = ["0.0.0.0/0"] + ipv6 = ["::/0"] + } + # Associate the firewall with the instance + linodes = [linode_instance.my_instance.id] + } + # Output the instance's IP address + output "instance_ip" { + value = linode_instance.my_instance.ip_address + } + ``` + +1. In the `xonotic` directory, create a file named `terraform.tfvars` with the following code. Insert your personal access token, create a unique and complex root password, and insert your workstation's IP address. + + ```file {title="terraform.tfvars"} + linode_token = "{{< placeholder "PERSONAL_ACCESS_TOKEN">}}" + root_password = "{{< placeholder "LINODE_ROOT_PASSWORD">}}" + admin_ip = "{{< placeholder "WORKSTATION_IP_ADDRESS">}}/32" + ``` + + If you’re not sure of your current IP address you can use the following command which will return your current public IP address. + + ```{title="Your workstation"} + curl http://whatismyip.akamai.com + ``` + + {{< caution >}} + Keep your terraform.tfvars file safe and *never* commit it to a public repository. + {{< /caution >}} + +### Create Resources with Terraform + +1. While inside the `xonotic` directory, initialize Terraform: + + ```command {title="Your workstation"} + terraform init + ``` + + This command downloads the necessary Linode provider. + +1. Apply the configuration defined in the previous section of this guide: + + ```command {title="Your workstation"} + terraform apply + ``` + +1. When prompted to confirm the changes, type yes and hit Enter. Terraform provisions your Linode instance and sets up the firewall. + +1. Once Terraform is finished, it outputs the IP address of your new Linode instance. SSH into the instance using this IP address: + + ```command {title="Your workstation"} + ssh root@{{< placeholder "LINODE_INSTANCE_IP_ADDRESS" >}} + ``` + + Enter the root password when prompted, which you defined in the `terraform.tfvars` file in the previous section of this guide. + +1. Before proceeding with game server software installation, take time to [secure your new instance](https://techdocs.akamai.com/cloud-computing/docs/set-up-and-secure-a-compute-instance). + +### Install K3s + +From your SSH session with your Linode instance, run: + +```command {title="Linode SSH session"} +curl -sfL https://get.k3s.io | sh - +``` + +### Install Agones on K3s + +1. From your SSH session with your Linode instance, run: + + ```command {title="Linode SSH session"} + kubectl create namespace agones-system + kubectl apply --server-side -f https://raw.githubusercontent.com/googleforgames/agones/release-1.47.0/install/yaml/install.yaml + ``` + + This creates a dedicated namespace for Agones and deploys it to your K3s cluster. + +1. Observe the new pods created by Agones: + + ```command {title="Linode SSH session"} + kubectl describe --namespace agones-system pods + ``` + + You should see output indicating that the Agones pods are running. If the Agones pods are not running yet, wait until they are before proceeding to the next section. + +### Deploy Xonotic on K3s + +1. From your SSH session with your Linode instance, run this command to deploy a container for the Xonotic game server software using Agones: + + ```command {title="Linode SSH session"} + kubectl apply -f https://raw.githubusercontent.com/googleforgames/agones/release-1.47.0/examples/xonotic/fleet.yaml + ``` + +1. Run this command to observe the newly deployed game server. The `watch` command will updated every 2 seconds: + + ```command {title="Linode SSH session"} + watch kubectl describe gameserver + ``` + + Enter Ctrl + c to exit the `watch` command. + +1. Get a list of your game servers and their IP addresses and ports: + + ```command {title="Linode SSH session"} + kubectl get gs + ``` + + Make a note of the IP address and port, which is used to configure the Xonotic client software in the next section. + +### Install and Configure Xonotic Client + +1. If you don't have it already, download and install the Xonotic client for your workstation's operating system from [https://xonotic.org/](https://xonotic.org/). + +1. Launch the Xonotic client and choose the multiplayer mode. + +1. Enter the IP address and port of your game server in the **Address** field of the Xonotic client UI, separated by a colon: + + ``` + {{< placeholder "GAME_SERVER_IP_ADDRESS" >}}:{{< placeholder "GAME_SERVER_PORT" >}} + +1. Click **Join!** to join the game server. + +### Clean Up Resources + +When you're finished playing, it's good practice to clean up your resources: + +1. To remove the Xonotic game server, run this kubectl command on your Linode instance: + + ```command {title="Linode SSH session"} + kubectl delete -f https://raw.githubusercontent.com/googleforgames/agones/release-1.47.0/examples/xonotic/fleet.yaml + ``` + +1. To remove Agones, run this kubectl command on your Linode instance: + + ```command {title="Linode SSH session"} + kubectl delete -f https://raw.githubusercontent.com/googleforgames/agones/release-1.47.0/install/yaml/install.yaml + ``` + +1. To remove the Linode instance and firewall, run this Terraform command from the `xonotic` directory on your workstation: + + ```command {title"Your workstation"} + terraform destroy + ``` From 624b1524454f4a2e275d7829872c31eaf0a9a2fc Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 09:59:21 -0400 Subject: [PATCH 02/15] Update slug --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index c359de9b12c..ed71f58335a 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -1,5 +1,5 @@ --- -slug: xonotic-game-server +slug: set-up-a-xonotic-game-server-with-k3s-and-agones title: "Set Up a Xonotic Gaming Server with K3s and Agones" description: "This guide demonstrates how to install and manage server software for Xonotic using Terraform, K3s, and Agones." authors: ["Michael Archer"] From ce92f8e98bc7656d9f3deb1ec02d0f19c6f8c025 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:00:24 -0400 Subject: [PATCH 03/15] Update publish date --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index ed71f58335a..5e3b88ca14c 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -4,7 +4,7 @@ title: "Set Up a Xonotic Gaming Server with K3s and Agones" description: "This guide demonstrates how to install and manage server software for Xonotic using Terraform, K3s, and Agones." authors: ["Michael Archer"] contributors: ["Michael Archer"] -published: 2025-03-20 +published: 2025-03-17 keywords: ['agones','xonotic','k3s','self-hosted game server'] license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' --- From e287953014b7f171f7418f7aaf55f6e0641e9aee Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:20:17 -0400 Subject: [PATCH 04/15] Copy edits and syntax fixes --- .../index.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 5e3b88ca14c..70423562d02 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -1,6 +1,6 @@ --- slug: set-up-a-xonotic-game-server-with-k3s-and-agones -title: "Set Up a Xonotic Gaming Server with K3s and Agones" +title: "Set Up a Xonotic Game Server with K3s and Agones" description: "This guide demonstrates how to install and manage server software for Xonotic using Terraform, K3s, and Agones." authors: ["Michael Archer"] contributors: ["Michael Archer"] @@ -23,7 +23,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a ### Configure Terraform -1. Create a directory for the Terraform project: +1. Create a directory for the Terraform project on your workstation: ```command {title="Your workstation"} mkdir xonotic @@ -32,9 +32,9 @@ This guide demonstrates how to install and manage server software for Xonotic, a 1. Inside the new directory, create a file named `main.tf` and paste in the following code. This code defines a Linode instance and sets up a firewall. - Be sure to replace {{< placeholder "LINODE_REGION" >}} and {{< placeholder "LINODE_TYPE" >}} with a [region](https://www.linode.com/global-infrastructure/availability/) that's geographically closest to your location. + Be sure to replace {{< placeholder "LINODE_REGION" >}} on line 47 with a slug for a region (e.g. `us-central` for the Dallas, TX region) that's geographically closest to your location. Regions and slugs are listed on the [region availability](https://www.linode.com/global-infrastructure/availability/) page. - ```file {title="main.tf"} + ```file {title="main.tf" hl_lines="47"} # Specify the required Terraform provider terraform { required_providers { @@ -147,8 +147,8 @@ This guide demonstrates how to install and manage server software for Xonotic, a ``` {{< caution >}} - Keep your terraform.tfvars file safe and *never* commit it to a public repository. - {{< /caution >}} +Keep your `terraform.tfvars` file safe and *never* commit it to a public repository. +{{< /caution >}} ### Create Resources with Terraform @@ -166,7 +166,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a terraform apply ``` -1. When prompted to confirm the changes, type yes and hit Enter. Terraform provisions your Linode instance and sets up the firewall. +1. When prompted to confirm the changes, type `yes` and hit Enter. Terraform provisions your Linode instance and sets up the firewall. 1. Once Terraform is finished, it outputs the IP address of your new Linode instance. SSH into the instance using this IP address: @@ -237,8 +237,8 @@ curl -sfL https://get.k3s.io | sh - 1. Enter the IP address and port of your game server in the **Address** field of the Xonotic client UI, separated by a colon: - ``` - {{< placeholder "GAME_SERVER_IP_ADDRESS" >}}:{{< placeholder "GAME_SERVER_PORT" >}} + {{< placeholder "GAME_SERVER_IP_ADDRESS" >}}:{{< placeholder "GAME_SERVER_PORT" >}} + 1. Click **Join!** to join the game server. @@ -260,6 +260,6 @@ When you're finished playing, it's good practice to clean up your resources: 1. To remove the Linode instance and firewall, run this Terraform command from the `xonotic` directory on your workstation: - ```command {title"Your workstation"} + ```command {title="Your workstation"} terraform destroy - ``` + ``` \ No newline at end of file From 247742897df2901b6189a14d95670021b5b27b38 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:22:07 -0400 Subject: [PATCH 05/15] Copy edit --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 70423562d02..2fdc58ad348 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -219,7 +219,7 @@ curl -sfL https://get.k3s.io | sh - watch kubectl describe gameserver ``` - Enter Ctrl + c to exit the `watch` command. + Enter Ctrl + C to exit the `watch` command. 1. Get a list of your game servers and their IP addresses and ports: From 01e2b8f5d894c9df90cddfbe22ccd8c99999a8a9 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:23:48 -0400 Subject: [PATCH 06/15] Syntax fixes --- .../index.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 2fdc58ad348..720fc7c6b0b 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -13,7 +13,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a [K3s](https://k3s.io/) is a lightweight Kubernetes distribution. This guide deploys K3s on a single Linode and uses it to manage your game server software. [Agones](https://agones.dev/site/) is an open-source, Kubernetes-native project specifically designed for managing dedicated game servers, and it is deployed on the K3s installation in this guide. Agones is then used to deploy and manage containers for the Xonotic game server software. -### Before You Begin +## Before You Begin 1. [Install Terraform](https://developer.hashicorp.com/terraform/install) on your workstation. @@ -21,7 +21,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a 1. [Create a Linode personal access token](https://techdocs.akamai.com/linode-api/reference/get-started#personal-access-tokens), which is later used by Terraform to create resources on your Linode account. -### Configure Terraform +## Configure Terraform 1. Create a directory for the Terraform project on your workstation: @@ -150,7 +150,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a Keep your `terraform.tfvars` file safe and *never* commit it to a public repository. {{< /caution >}} -### Create Resources with Terraform +## Create Resources with Terraform 1. While inside the `xonotic` directory, initialize Terraform: @@ -178,7 +178,7 @@ Keep your `terraform.tfvars` file safe and *never* commit it to a public reposit 1. Before proceeding with game server software installation, take time to [secure your new instance](https://techdocs.akamai.com/cloud-computing/docs/set-up-and-secure-a-compute-instance). -### Install K3s +## Install K3s From your SSH session with your Linode instance, run: @@ -186,7 +186,7 @@ From your SSH session with your Linode instance, run: curl -sfL https://get.k3s.io | sh - ``` -### Install Agones on K3s +## Install Agones on K3s 1. From your SSH session with your Linode instance, run: @@ -205,7 +205,7 @@ curl -sfL https://get.k3s.io | sh - You should see output indicating that the Agones pods are running. If the Agones pods are not running yet, wait until they are before proceeding to the next section. -### Deploy Xonotic on K3s +## Deploy Xonotic on K3s 1. From your SSH session with your Linode instance, run this command to deploy a container for the Xonotic game server software using Agones: @@ -229,7 +229,7 @@ curl -sfL https://get.k3s.io | sh - Make a note of the IP address and port, which is used to configure the Xonotic client software in the next section. -### Install and Configure Xonotic Client +## Install and Configure Xonotic Client 1. If you don't have it already, download and install the Xonotic client for your workstation's operating system from [https://xonotic.org/](https://xonotic.org/). @@ -242,7 +242,7 @@ curl -sfL https://get.k3s.io | sh - 1. Click **Join!** to join the game server. -### Clean Up Resources +## Clean Up Resources When you're finished playing, it's good practice to clean up your resources: From f5d7340985e07bb05dda0081b56976f05e5e150c Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:24:31 -0400 Subject: [PATCH 07/15] Copy edit --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 720fc7c6b0b..9f803f98eb9 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -205,7 +205,7 @@ curl -sfL https://get.k3s.io | sh - You should see output indicating that the Agones pods are running. If the Agones pods are not running yet, wait until they are before proceeding to the next section. -## Deploy Xonotic on K3s +## Install Xonotic Game Server on K3s 1. From your SSH session with your Linode instance, run this command to deploy a container for the Xonotic game server software using Agones: From fff4bb864e2c66c943a0a139a8e8af6772c45f7f Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:54:28 -0400 Subject: [PATCH 08/15] Copy edit --- .../index.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 9f803f98eb9..c9a90ef2297 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -32,7 +32,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a 1. Inside the new directory, create a file named `main.tf` and paste in the following code. This code defines a Linode instance and sets up a firewall. - Be sure to replace {{< placeholder "LINODE_REGION" >}} on line 47 with a slug for a region (e.g. `us-central` for the Dallas, TX region) that's geographically closest to your location. Regions and slugs are listed on the [region availability](https://www.linode.com/global-infrastructure/availability/) page. + Be sure to replace {{< placeholder "LINODE_REGION" >}} on line 47 with a slug for a region (e.g. `us-central` for the Dallas, TX region) that's geographically closest to your location. Regions and slugs are listed on the [region availability](https://www.linode.com/global-infrastructure/availability/) page. Closer locations reduce lag/latency for players on your game server. ```file {title="main.tf" hl_lines="47"} # Specify the required Terraform provider @@ -132,6 +132,14 @@ This guide demonstrates how to install and manage server software for Xonotic, a } ``` + {{< note >}} + Akamai now offers an expanded set of [distributed compute regions](https://techdocs.akamai.com/cloud-computing/docs/distributed-compute-regions). Deploying in these regions are currently in limited availability. These regions may include locations that are closer to you than the set of core compute regions. + + To access these regions, [contact customer support](https://techdocs.akamai.com/cloud-computing/docs/help-and-support#contact-customer-support). + + When deploying in a distributed compute region, note that there is a different [list of supported instance types](https://techdocs.akamai.com/cloud-computing/docs/plans-distributed). The instance type can be updated on line 48 of the `main.tf` file. + {{< /note >}} + 1. In the `xonotic` directory, create a file named `terraform.tfvars` with the following code. Insert your personal access token, create a unique and complex root password, and insert your workstation's IP address. ```file {title="terraform.tfvars"} From c5c9e51313f7f0fe7219350b362ffd547dcdfa30 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 10:58:01 -0400 Subject: [PATCH 09/15] Copy edit --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index c9a90ef2297..903d7ff63e1 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -133,14 +133,14 @@ This guide demonstrates how to install and manage server software for Xonotic, a ``` {{< note >}} - Akamai now offers an expanded set of [distributed compute regions](https://techdocs.akamai.com/cloud-computing/docs/distributed-compute-regions). Deploying in these regions are currently in limited availability. These regions may include locations that are closer to you than the set of core compute regions. + Akamai now offers an expanded set of [distributed compute regions](https://techdocs.akamai.com/cloud-computing/docs/distributed-compute-regions). Deploying in these regions is currently in [limited availability](https://techdocs.akamai.com/etp/docs/features-not-released). These regions may include locations that are closer to you than the set of core compute regions. To access these regions, [contact customer support](https://techdocs.akamai.com/cloud-computing/docs/help-and-support#contact-customer-support). When deploying in a distributed compute region, note that there is a different [list of supported instance types](https://techdocs.akamai.com/cloud-computing/docs/plans-distributed). The instance type can be updated on line 48 of the `main.tf` file. {{< /note >}} -1. In the `xonotic` directory, create a file named `terraform.tfvars` with the following code. Insert your personal access token, create a unique and complex root password, and insert your workstation's IP address. +1. In the `xonotic` directory, create a file named `terraform.tfvars` with the following code. Insert your personal access token, create a unique and complex root password, and insert your workstation's IP address (maintain the `/32` suffix after the IP). ```file {title="terraform.tfvars"} linode_token = "{{< placeholder "PERSONAL_ACCESS_TOKEN">}}" From b7e4ca302123b1f0cde215bd906cade359022dac Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 11:00:33 -0400 Subject: [PATCH 10/15] Terraform fix --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 903d7ff63e1..f42e2b0e333 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -103,7 +103,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a action = "ACCEPT" protocol = "TCP" ports = "22" - ipv4 = var.admin_ip + ipv4 = [var.admin_ip] } # Rule to allow custom port range (7000-8000) inbound { From adef6d9e32a8811acd9fca0607f25397330cb142 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 11:07:08 -0400 Subject: [PATCH 11/15] Terraform fix --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index f42e2b0e333..9a84926fd13 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -137,7 +137,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a To access these regions, [contact customer support](https://techdocs.akamai.com/cloud-computing/docs/help-and-support#contact-customer-support). - When deploying in a distributed compute region, note that there is a different [list of supported instance types](https://techdocs.akamai.com/cloud-computing/docs/plans-distributed). The instance type can be updated on line 48 of the `main.tf` file. + When deploying in a distributed compute region, note that there is a different [list of supported instance types](https://techdocs.akamai.com/cloud-computing/docs/plans-distributed). The recommended distributed compute instance type for this guide is `g6-dedicated-edge-4`. The instance type can be updated in your Terraform configuration on line 48 of the `main.tf` file. {{< /note >}} 1. In the `xonotic` directory, create a file named `terraform.tfvars` with the following code. Insert your personal access token, create a unique and complex root password, and insert your workstation's IP address (maintain the `/32` suffix after the IP). From 5655557fd0678b7447195e8973960eaeb5ec5da8 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 11:07:59 -0400 Subject: [PATCH 12/15] Terraform fix --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 9a84926fd13..5c83b58964a 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -17,9 +17,9 @@ This guide demonstrates how to install and manage server software for Xonotic, a 1. [Install Terraform](https://developer.hashicorp.com/terraform/install) on your workstation. -1. Create an account with Linode, if you do not already have one. +1. Create an account with Linode if you do not already have one. -1. [Create a Linode personal access token](https://techdocs.akamai.com/linode-api/reference/get-started#personal-access-tokens), which is later used by Terraform to create resources on your Linode account. +1. [Create a Linode personal access token](https://techdocs.akamai.com/linode-api/reference/get-started#personal-access-tokens). This token is used later by Terraform to create resources on your Linode account. ## Configure Terraform From fc5075350ff7faa0ebecd19d946bcd2a6e333842 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 11:17:33 -0400 Subject: [PATCH 13/15] Vale fix --- ci/vale/dictionary.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/vale/dictionary.txt b/ci/vale/dictionary.txt index 4e52df882ef..cf99324468b 100644 --- a/ci/vale/dictionary.txt +++ b/ci/vale/dictionary.txt @@ -25,6 +25,7 @@ adoptium aes ag agentless +Agones ahci0 Aho ahvz @@ -2926,6 +2927,7 @@ xml xmpp xms xmx +Xonotic XPath XQuartz XQuery From 59fd63ccfb2f27f440eff8bdd378e18405bc07f3 Mon Sep 17 00:00:00 2001 From: Nathan Melehan Date: Mon, 17 Mar 2025 14:12:36 -0400 Subject: [PATCH 14/15] copy edit --- .../set-up-a-xonotic-game-server-with-k3s-and-agones/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 5c83b58964a..790b770bf9f 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -252,7 +252,7 @@ curl -sfL https://get.k3s.io | sh - ## Clean Up Resources -When you're finished playing, it's good practice to clean up your resources: +To remove the software and resources created in this guide, follow these steps: 1. To remove the Xonotic game server, run this kubectl command on your Linode instance: From 0a5779cc24929b8be4b4201094d136dd17e3e298 Mon Sep 17 00:00:00 2001 From: jddocs Date: Mon, 17 Mar 2025 16:21:09 -0400 Subject: [PATCH 15/15] additional copy edits --- .../index.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md index 790b770bf9f..5ad37fd29c2 100644 --- a/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md +++ b/docs/guides/game-servers/set-up-a-xonotic-game-server-with-k3s-and-agones/index.md @@ -9,17 +9,17 @@ keywords: ['agones','xonotic','k3s','self-hosted game server'] license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)' --- -This guide demonstrates how to install and manage server software for Xonotic, a free and fast arena shooter game. Resources are deployed on Linode using [Terraform](https://www.terraform.io/), the infrastructure-as-code tool, and the game server installation is supported by K3s and Agones. +This guide demonstrates how to install and manage software for a Xonotic server, a free and fast arena shooter game. Resources are deployed on Akamai Cloud using [Terraform](https://www.terraform.io/), an infrastructure-as-code (IaC) tool, and the game server installation is supported by K3s and Agones. -[K3s](https://k3s.io/) is a lightweight Kubernetes distribution. This guide deploys K3s on a single Linode and uses it to manage your game server software. [Agones](https://agones.dev/site/) is an open-source, Kubernetes-native project specifically designed for managing dedicated game servers, and it is deployed on the K3s installation in this guide. Agones is then used to deploy and manage containers for the Xonotic game server software. +[K3s](https://k3s.io/) is a lightweight Kubernetes distribution. This tutorial deploys K3s on a single compute instance running the Ubuntu 20.04 LTS Linux distribution and uses it to manage your game server software. [Agones](https://agones.dev/site/) is an open-source, Kubernetes-native project specifically designed for managing dedicated game servers, and it is deployed on the K3s installation in this guide. Agones is then used to deploy and manage containers for the Xonotic server software. ## Before You Begin -1. [Install Terraform](https://developer.hashicorp.com/terraform/install) on your workstation. +1. [Install Terraform](https://developer.hashicorp.com/terraform/install) on your local machine or workstation. -1. Create an account with Linode if you do not already have one. +1. Create an Akamai Cloud account if you do not already have one. -1. [Create a Linode personal access token](https://techdocs.akamai.com/linode-api/reference/get-started#personal-access-tokens). This token is used later by Terraform to create resources on your Linode account. +1. [Create a Linode personal access token](https://techdocs.akamai.com/linode-api/reference/get-started#personal-access-tokens). This token is used later by Terraform to create resources on your Akamai Cloud account. ## Configure Terraform @@ -30,7 +30,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a cd xonotic ``` -1. Inside the new directory, create a file named `main.tf` and paste in the following code. This code defines a Linode instance and sets up a firewall. +1. Inside the new directory, create a Terraform configuration file named `main.tf`, and paste in the following code. This code defines a Linode instance type and sets up a firewall. Be sure to replace {{< placeholder "LINODE_REGION" >}} on line 47 with a slug for a region (e.g. `us-central` for the Dallas, TX region) that's geographically closest to your location. Regions and slugs are listed on the [region availability](https://www.linode.com/global-infrastructure/availability/) page. Closer locations reduce lag/latency for players on your game server. @@ -137,7 +137,7 @@ This guide demonstrates how to install and manage server software for Xonotic, a To access these regions, [contact customer support](https://techdocs.akamai.com/cloud-computing/docs/help-and-support#contact-customer-support). - When deploying in a distributed compute region, note that there is a different [list of supported instance types](https://techdocs.akamai.com/cloud-computing/docs/plans-distributed). The recommended distributed compute instance type for this guide is `g6-dedicated-edge-4`. The instance type can be updated in your Terraform configuration on line 48 of the `main.tf` file. + When deploying in a distributed compute region, note that there is a different [list of supported instance types](https://techdocs.akamai.com/cloud-computing/docs/plans-distributed). The recommended distributed instance type for the deployment in this guide is a `g6-dedicated-edge-4` dedicated server. The instance type can be updated in your Terraform configuration on line 48 of the `main.tf` file under the “type” field. {{< /note >}} 1. In the `xonotic` directory, create a file named `terraform.tfvars` with the following code. Insert your personal access token, create a unique and complex root password, and insert your workstation's IP address (maintain the `/32` suffix after the IP). @@ -148,14 +148,14 @@ This guide demonstrates how to install and manage server software for Xonotic, a admin_ip = "{{< placeholder "WORKSTATION_IP_ADDRESS">}}/32" ``` - If you’re not sure of your current IP address you can use the following command which will return your current public IP address. + If you’re not sure of your IP address, you can use the following command which will return your current public IP address. ```{title="Your workstation"} curl http://whatismyip.akamai.com ``` {{< caution >}} -Keep your `terraform.tfvars` file safe and *never* commit it to a public repository. +Keep your `terraform.tfvars` file safe, and *never* commit it to a public repository. {{< /caution >}} ## Create Resources with Terraform @@ -166,7 +166,7 @@ Keep your `terraform.tfvars` file safe and *never* commit it to a public reposit terraform init ``` - This command downloads the necessary Linode provider. + This command downloads the necessary [Linode Terraform provider](https://registry.terraform.io/providers/linode/linode/latest/docs). 1. Apply the configuration defined in the previous section of this guide: @@ -176,7 +176,7 @@ Keep your `terraform.tfvars` file safe and *never* commit it to a public reposit 1. When prompted to confirm the changes, type `yes` and hit Enter. Terraform provisions your Linode instance and sets up the firewall. -1. Once Terraform is finished, it outputs the IP address of your new Linode instance. SSH into the instance using this IP address: +1. Once Terraform is finished, it outputs the IP address of your new Linode instance. SSH into the instance as the root user using this IP address: ```command {title="Your workstation"} ssh root@{{< placeholder "LINODE_INSTANCE_IP_ADDRESS" >}} @@ -184,11 +184,11 @@ Keep your `terraform.tfvars` file safe and *never* commit it to a public reposit Enter the root password when prompted, which you defined in the `terraform.tfvars` file in the previous section of this guide. -1. Before proceeding with game server software installation, take time to [secure your new instance](https://techdocs.akamai.com/cloud-computing/docs/set-up-and-secure-a-compute-instance). +1. Before proceeding with game server software installation, take time to [secure your new instance](https://techdocs.akamai.com/cloud-computing/docs/set-up-and-secure-a-compute-instance). Make sure to create a limited sudo user, set your timezone, configure your hostname, and harden SSH access. ## Install K3s -From your SSH session with your Linode instance, run: +Once fully deployed and secured, continue your server setup while logged into your instance. First, install K3’s using the following curl command: ```command {title="Linode SSH session"} curl -sfL https://get.k3s.io | sh - @@ -196,15 +196,15 @@ curl -sfL https://get.k3s.io | sh - ## Install Agones on K3s -1. From your SSH session with your Linode instance, run: +While logged into your instance, continue your server configuration by installing Agones. + +1. Create a dedicated namespace for Agones, and deploy it to your K3s cluster via the installation YAML file hosted on GitHub: ```command {title="Linode SSH session"} kubectl create namespace agones-system kubectl apply --server-side -f https://raw.githubusercontent.com/googleforgames/agones/release-1.47.0/install/yaml/install.yaml ``` - This creates a dedicated namespace for Agones and deploys it to your K3s cluster. - 1. Observe the new pods created by Agones: ```command {title="Linode SSH session"} @@ -239,9 +239,9 @@ curl -sfL https://get.k3s.io | sh - ## Install and Configure Xonotic Client -1. If you don't have it already, download and install the Xonotic client for your workstation's operating system from [https://xonotic.org/](https://xonotic.org/). +1. If you don't have it already, download and install the Xonotic client for your workstation's operating system from [https://xonotic.org/](https://xonotic.org/). See the Xonotic [Forums](https://forums.xonotic.org/) and [FAQ](https://xonotic.org/faq/) for additional application support, docs, and in-game information. -1. Launch the Xonotic client and choose the multiplayer mode. +1. Launch the Xonotic client and choose the multiplayer game mode. 1. Enter the IP address and port of your game server in the **Address** field of the Xonotic client UI, separated by a colon: @@ -252,7 +252,7 @@ curl -sfL https://get.k3s.io | sh - ## Clean Up Resources -To remove the software and resources created in this guide, follow these steps: +Follow these steps to remove the software and resources created in this tutorial: 1. To remove the Xonotic game server, run this kubectl command on your Linode instance: @@ -266,7 +266,7 @@ To remove the software and resources created in this guide, follow these steps: kubectl delete -f https://raw.githubusercontent.com/googleforgames/agones/release-1.47.0/install/yaml/install.yaml ``` -1. To remove the Linode instance and firewall, run this Terraform command from the `xonotic` directory on your workstation: +1. To remove the Linode instance and firewall created by Terraform, run this Terraform command from the `xonotic` directory on your workstation ```command {title="Your workstation"} terraform destroy