README
¶
agones-mc-monitor
Minecraft server monitor sidecar for Agones GameServers
Explore the docs »
View Example
·
Report Bug
·
Request Feature
Table of Contents
About The Project
This application is meant to be run as a sidecar container alongside Minecraft servers in an Agones GameServer pod. This application integrates the Agones SDK with the Minecraft server and assists with lifecycle management such as health checking, allocations, and shutdowns.
Built With
Getting Started
To get a copy up and running follow these steps.
Prerequisites
This is an example of how to list things you need to use the software and how to install them.
-
Kubernetes
- Set up a Kubernetes cluster using local or cloud solutions
- https://agones.dev/site/docs/installation/creating-cluster/
-
Agones
- Set up Agones in your cluster
- https://agones.dev/site/docs/installation/install-agones/
-
Minecraft Server
- Compatible with Java and Bedrock editions
- You'll need a container to run the Minecraft server. Highly recommend using itzg/docker-minecraft-server or itzg/minecraft-bedrock-server
Installation
Create a new Minecraft GameServer
kubectl create -f example/mc-server.yml
Full GameServer specification example
Usage
Agones GameServer
A GameServer requires a game server container. This will be the Mincraft server container. Every GameServer also contains the an sdkServer that will report lifecycle changes to the Agones controller. To signal Minecraft server lifecycle updates, a seperate application integrated with the Agones SDK needs to ping the Minecraft server and report lifecycle updates to the sdkServer.
GameServer Pod template example
template:
spec:
containers:
- name: mc-server
image: itzg/minecraft-server # Minecraft server image
imagePullPolicy: Always
env: # Full list of ENV variables at https://github.com/itzg/docker-minecraft-server
- name: EULA
value: 'TRUE'
- name: mc-monitor
image: saulmaldonado/agones-mc-monitor
imagePullPolicy: Always
Full Java GameServer specification example
Full Bedrock GameServer specification example
Run Locally with Docker
Run alongside a Minecraft server and an Agones SDK sidecar in the same network
docker run -it --rm saulmaldonado/agones-mc-monitor
Flags
--attempts uint
Ping attempt limit. Process will end after failing the last attempt (default 5)
--edition string
Minecraft server edition. java or bedrock (default "java")
--host string
Minecraft server host (default "localhost")
--initial-delay duration
Initial startup delay before first ping (default 1m0s)
--interval duration
Server ping interval (default 10s)
--port uint
Minecraft server port (default 25565)
--timeout duration
Ping timeout (default 10s)
Roadmap
See the open issues for a list of proposed features (and known issues).
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Clone the Project
- Create your Feature or Fix Branch (
git checkout -b (feat|fix)/AmazingFeatureOrFix) - Commit your Changes (
git commit -m 'Add some AmazingFeatureOrFix') - Push to the Branch (
git push origin (feat|fix)/AmazingFeatureOrFix) - Open a Pull Request
Build from source
-
Clone the repo
git clone https://github.com/saulmaldonado/agones-mc-monitor.git -
Build
go build -o agones-mc-monitor ./cmd/main.go
Build from Dockerfile
-
Clone the repo
git clone https://github.com/saulmaldonado/agones-mc-monitor.git -
Build
docker build -t <hub-user>/agones-mc-monitor:latest . -
Push to Docker repo
docker push <hub-user>/agones-mc-monitor:latest
License
Distributed under the MIT License. See LICENSE for more information.
Acknowledgements
- Raqbit/mc-pinger
- ZeroErrors/go-bedrockping
- itzg/docker-minecraft-server
- itzg/minecraft-bedrock-server
Author
Saul Maldonado
- 🐱 Github: @saulmaldonado
- 🤝 LinkedIn: @saulmaldonado4
- 🐦 Twitter: @saul_mal
- 💻 Website: saulmaldonado.com
Show your support
Give a ⭐️ if this project helped you!