Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Custom Linux image for game servers ready to be deployed.

Notifications You must be signed in to change notification settings

WalrusNetwork/spinning-walrus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 

Repository files navigation

Spinning Walrus

Just spin the Walrus!

Description

This project allows to make a custom Linux image for private game servers ready to be deployed on a Linux server/VPS. All the needed files are already included into the Linux image so this makes the deployment really easy.

Insights

The project slim is used to turn a Docker image into a real bootable Linux image.

Thanks to Docker, it is now fairly easy to build a custom image and modify it later.

Also the program metadata from LinuxKit is used to fetch the configuration needed to start the server for things like the operator and the server name. This metadata/userdata is passed through the API or directly in the user panel if the cloud provider supports it.

Monitoring

Netdata

The program Netdata is available on the port 19999 of each server. To access it you just need to type the ip of the server followed by the 19999 port in your browser (exemple: unixfox.walrus.gg:19999).

Shell access (console/SSH)

If you need a shell to the server, you can open the console on Vultr panel or add your SSH key to the authorized_keys file: https://gitlab.com/WalrusNetwork/infrastructure/spinningwalrus/-/blob/master/vm/files/root/.ssh/authorized_keys

Minecraft server console

Get shell access to the server then:

supervisorctl fg minecraft

To exit the console: CTRL + C (you may need to do it twice to exit the console).

Metadata/User data

An example file is available here: https://gitlab.com/WalrusNetwork/infrastructure/spinningwalrus/-/blob/master/vm/metadata.json Explaination of each environment variables:

  • minecraft script (launch the minecraft server):
    • OP_USERNAME: The username of the op to add
    • OP_UUID: The uuid (example: 02407912-8bbf-4b7b-a34c-a45339841436) of the op to add
    • SERVERNAME: the server name which gets added to the properties
    • MOTD: The motd of the Minecraft server
    • MAX_PLAYERS: The number of slots to allocate
    • ONLINE_MODE: Disable or enable online mode
    • BUNGEECORD: Disable or enable bungeecord support
  • minecraft-sleep script (delete the server if no one is using it):
    • SLEEP_MIN: The number of minutes before the server gets deleted.

How to build the image

  1. Add the secrets environments variables to the file info.yml, you may find an example in the file info.example.yml.
  2. Install slim: https://github.com/ottomatica/slim#installing-slim.
  3. Install Docker and KVM/libvirt.
  4. Execute slim build -p kvm -f iso ..

Additional documentation available here: https://github.com/ottomatica/slim/blob/master/README.md

About

Custom Linux image for game servers ready to be deployed.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published