|
|
Figments.nrw provides support to run on many different backends.
|
|
|
|
|
|
[[_TOC_]]
|
|
|
|
|
|
---
|
|
|
|
|
|
# Client Deployment
|
|
|
|
|
|
Clients can be deployed as Windows Installers and Android APKs.
|
|
|
|
|
|
1. [Windows Installer](Development/Deployment/Windows-Installer)
|
|
|
2. [Sideloading APKs](Development/Deployment/Sideload-APKs)
|
|
|
|
|
|
---
|
|
|
|
|
|
# Server Deployment
|
|
|
|
|
|
This and the referenced articles should provide you with the necessary information to set up your preferred way of running game servers on a locally managed setup or on any Kubernetes cluster provider.
|
|
|
|
|
|
## Local Server
|
|
|
|
|
|
This is the simplest dedicated server and only requires you to do the following steps:
|
|
|
|
|
|
1. Get a binary of Figments.nrw
|
|
|
1. Download a pre-built binary from our releases, *or*
|
|
|
2. See [Build for Linux (Only for Servers)](Development/Build/Linux) to build your own version
|
|
|
3. Run the binary on the machine you want to use as a server.
|
|
|
4. Allow Figments.nrw through your firewall and, if needed, open the ports
|
|
|
1. See [Ports used by Figments.nrw](Network/Services-and-Ports) for the default configuration
|
|
|
|
|
|
---
|
|
|
|
|
|
## Virtual Machine and Docker
|
|
|
|
|
|
This is a fairly small step from running the server application on a local machine, but allows us to have a containerized solution we can easily deploy nearly anywhere. A common use case would be running the Figments.nrw game server in a Virtual Machine hosted on premise or in the cloud.
|
|
|
|
|
|
1. Setup the docker environment in your VM
|
|
|
1. We use Ubuntu, but it should not make that much of a difference
|
|
|
2. Create a dockerfile tailored to your specific needs and setup. See our [barebones template](Development/Deployment/Server/Dockerfiles/Dockerfile.barebones) for guidance.
|
|
|
3. We use docker compose to build our image, see our template `docker-compose.yml` below.
|
|
|
4. Put dockerfile and docker-compose in a directory of your choice in your VM.
|
|
|
2. Get a binary of Figments.nrw
|
|
|
1. Download a pre-built binary from our releases, *or*
|
|
|
2. See [Build for Linux (Only for Servers)](Development/Build/Linux) to build your own version
|
|
|
2. Create a zip-archive from the binary folder, excluding the directories prefixed with `DoNotShip`. Give this archive a name, e.g. `ServerLinux.zip`.
|
|
|
3. Copy the archive into a directory of your choice (e.g. `figments/`) and unzip it
|
|
|
`unzip -d build ServerLinux.zip`
|
|
|
This will create a new directory named `build` in your working directory. This directory and the `BUILDDIR` you defined in your docker-compose have to be the same
|
|
|
4. Build and run your container via the following command.
|
|
|
`docker compose up -d --build`
|
|
|
1. If you are not using docker compose, you need to first build your image:
|
|
|
`docker build . --build-arg BUILDDIR=./build/ -t figments`
|
|
|
2. and then run the container with
|
|
|
`docker run -p 7777:7777/udp figments`
|
|
|
:warning: Either way, make sure that you expose the port the game server will try to use using UDP (see [Ports](Network/Services-and-Ports)), otherwise users will not be able to join your server.
|
|
|
1. The service should then be running until you either stop it. To view the server logs you can for example use
|
|
|
`docker logs -f figments-figments-1`
|
|
|
|
|
|
*docker-compose.yml (just a template)*
|
|
|
```yml
|
|
|
version: "3.5"
|
|
|
|
|
|
services:
|
|
|
figments:
|
|
|
build:
|
|
|
context: .
|
|
|
args:
|
|
|
BUILDDIR: ./build
|
|
|
image: "figments/linux:local"
|
|
|
hostname: figments
|
|
|
restart: unless-stopped
|
|
|
ports:
|
|
|
- "7777:7777/udp"
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
## Scalable Kubernetes Cluster via Agones
|
|
|
|
|
|
Use a persistent lobby from which you can spawn new VM's, each capable of running a timed or persistent Figments.nrw session.
|
|
|
You can either use an already existing cluster or one that is provided by one of the many cloud services, e.g. Google or AWS, or create your own cluster via minikube or kubeadm. We are using the [Agones](https://agones.dev/site/) framework to facilitate server orchestration, so your cluster needs to support this. Agones provides documentation to be set up on [Google Cloud](https://agones.dev/site/docs/installation/creating-cluster/gke/), [AWS](https://agones.dev/site/docs/installation/creating-cluster/eks/), [Azure](https://agones.dev/site/docs/installation/creating-cluster/aks/) and the local test environment [minikube](https://agones.dev/site/docs/installation/creating-cluster/minikube/).
|
|
|
|
|
|
In case you want to host your servers on your own hardware, we're providing instructions on how to set up your own cluster with [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/) in this [Article](Development/Deployment/Server/Local-Kubernetes-Cluster).
|
|
|
|
|
|
- [How to setup a local Kubernetes cluster](Local-Kubernetes-Cluster.md)
|
|
|
- For any other cluster type, check out the [Agones Documentation](https://agones.dev/site/docs/installation/creating-cluster/), we do not provide step-by-step instructions for those.
|
|
|
- [How to setup Agones on a local Kubernetes cluster](Development/Deployment/Server/Setup-Agones-on-Cluster)
|
|
|
|
|
|
|
|
|
# Server Configuration
|
|
|
Depending on which method you use, a server can be configured differently. Find more information in the [Figments Gameserver Configuration](Development/Deployment/Server/Figments-Gameserver-Configuration) article. |
|
|
\ No newline at end of file |