Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lordthorzonus/minecraft-ftb-server-provisioning
Provisioning scripts for a modded minecraft server to Hetzner Cloud with Ansible & Terraform
https://github.com/lordthorzonus/minecraft-ftb-server-provisioning
Last synced: about 2 months ago
JSON representation
Provisioning scripts for a modded minecraft server to Hetzner Cloud with Ansible & Terraform
- Host: GitHub
- URL: https://github.com/lordthorzonus/minecraft-ftb-server-provisioning
- Owner: lordthorzonus
- License: mit
- Created: 2021-01-01T22:03:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-03T12:33:46.000Z (2 months ago)
- Last Synced: 2024-11-03T13:25:44.459Z (2 months ago)
- Language: HCL
- Size: 220 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Minecraft server provisioning
This repository contains Terraform and Ansible scripts for provisioning a minecraft server with a FTB modpack into Hetzner cloud with AWS route 53 dnsThe main infrastructure is first spun up by Terraform:
- One server of chosen type (cx11, cx21 etc.)
- A floating IP assigned to the server
- Subdomain A record pointing to the floating IPThen Ansible provisions:
- Docker
- ufw
- fail2ban
- Minecraft server with a FTB modpackusing the Hetzner cloud dynamic inventory plugin.
See `variables.tf` and `group_vars/all.yml` for currently easily modifiable variables regarding the server
## Requirements
- Terraform
- Ansible
- Hetzner cloud account and API key (https://docs.hetzner.cloud)
- Hcloud python `pip install hcloud`
- AWS account and user (https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication)
- Registered main domain in Route53 (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-register.html)
- Working ssh key to be used with ansible and ssh:ing into the server (default used key is ~/.ssh/id_rsa.pub)## Provisioning
- Install required external ansible roles `ansible-galaxy role install -r requirements.yml`
- Install required external ansible collections `ansible-galaxy collections install -r requirements.yml`
- Install required terraform providers by running `terraform init`
- Spin up the server and dns records by running `terraform apply`
- Provision the minecraft server by running `HCLOUD_TOKEN= ansible-playbook -i hcloud.yml minecraft-server-configuration.yml`