Minecraft Infrastructure
Infrastructure Repostory for hosting a Minecraft Server at hetzner.de, used a combination of Terraform, Ansible and Vagrant.
Motivation
We play Minecraft since many years, on the same world, mostly on the latest Spigot Version. Sometimes with more players, othertimes with not so many. So we need a scalable environment with mininmal cost, at not used Time, lets go in the Cloud! ;).
Features
Install a ready to use Minecraft Server based on nolte/ansible-minecraft
Provide Different Stages
a Reuseable Vagrant Box with build with Packer.
a Local Test Environment, Vagrant based.
a Production Environment, controlled with Terraform and Ansible, hosted at the hetzner.de/cloud
Handle different Type of Backup Solutions
restic, for local or remote Backups to destinations like minio-server, amazon-s3 etc. (Useable for Restore Servers)
archive as tar, and optional downloading or publish to GDrive.
Minimize the Environment, at not used time like the Summer, so minimize the costs to the storage part (~0,90€/Mon).
Combine different Ansible roles for os hardening, like (sshd, fail2ban, logrotate, restic) (nolte/ansible_playbook-baseline-online-server).
Usage
This Repository can be used to Provide your Server on two different Platforms Vagrant and Hetzner Cloud. For more information take al kook to the Documentation nolte.github.io/minecraft-infrastructure.
Local (Vagrant)
For the Local usage you need a runnable Vagrant Installation.
The Local Vagrant part skip the Terraform installation tasks, like backup volumen handling etc. Only the Server Configuration Part provisioning/maintenance/master_playbook-configure-system.yml
will executed, with the inventory provisioning/inventories/test
.
Hetzner Cloud
As Cloud Provide for the Production we use hetzner.de, it exists a nice RestAPI, and a good Terraform Provider for configure the Infrastructure, i love it ;).
Advanced Informations
This Repository is part of the “Host your own Minecraft Server” Project, other parts of the project are nolte/minecraft-gameserver for public WebPresentation and nolte/ansible-minecraft a Ansible Role for install and configure the Minecraft Server.
The reuseable Base is extracted to nolte/ansible_playbook-baseline-online-server/ and nolte/terraform-infrastructure-modules.
Our Production Ansible Inventory is located add a private GitRepository, for protecting Player Informations.