Skip to content

About

Minecraft server sidecar CLI for Agones GameServers

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Contributors Forks Stargazers Issues


agones-mc

Minecraft server CLI for Agones GameServers
Explore the docs »

View Example · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Acknowledgements
  8. Author

About The Project

This application was built to run as a sidecar container alongside Minecraft server in an Agones GameServer Pod to integrate it with the Agones SDK and assist with lifecycle management, health checking, world loading and backup, and configuration editing.

Built With

Getting Started

Prerequisites

Installation

Create a new Minecraft GameServer With Sidecar

kubectl create -f example/mc-server.yml

Full GameServer specification example

Usage

Agones GameServer

A Minecraft server container will serve as the GameServer container. Every GameServer Pod 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 will 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
        args:
          - monitor
        imagePullPolicy: Always

Full Java GameServer specification example

Full Bedrock GameServer specification example

Run Locally with Docker

Run an example Minecraft GameServer Pod locally with docker-compose

docker-compose -f monitor.docker-compose.yml up

# or

make docker-compose.monitor

Flags

Usage:
  agones-mc monitor [flags]

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")

-h, --help                     help for monitor

--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)

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.

  1. Fork the Project
  2. Clone the Project
  3. Create your Feature or Fix Branch (git checkout -b (feat|fix)/AmazingFeatureOrFix)
  4. Commit your Changes (git commit -m 'Add some AmazingFeatureOrFix')
  5. Push to the Branch (git push origin (feat|fix)/AmazingFeatureOrFix)
  6. Open a Pull Request

Build from source

  1. Clone the repo

    git clone https://github.com/saulmaldonado/agones-mc.git
  2. Build

    make build
    
    # or
    
    CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/agones-mc .

Build from Dockerfile

  1. Clone the repo

    git clone https://github.com/saulmaldonado/agones-mc.git
  2. Build

    docker build -t <hub-user>/agones-mc:latest .
  3. Push to Docker repo

    docker push <hub-user>/agones-mc:latest

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

Author

Saul Maldonado

Show your support

Give a ⭐️ if this project helped you!

About

Minecraft server sidecar CLI for Agones GameServers

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages