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

PoC: How you could automate your minecraft server deployment in the cloud

License

Notifications You must be signed in to change notification settings

the-technat/minecraft_servers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft_servers

Proof of Concept how you could automate your minecraft server deployment.

Setup

  • Fork the repository
  • Create TFE workspace with api-driven workflow, add a generated TFE token (with access to that workspace) as TF_API_TOKEN to the Github Repo secrets
  • Generate a ssh-key of type ed25519. The public key should be in the local.ssh_keys var of terraform/servers.tf and the private key should be in the Github repo secrets as SSH_KEY
  • Create a read-only token in a hetzner cloud project and add it as HCLOUD_TOKEN to the Github repo secrets
  • Add / Remove servers in terraform/servers.tf
  • Add / Change minecraft settings either in ansible/groups_vars/all.yml or per server in ansible/host_vars/servername.yml
  • Let the magic happen by heading to the Github Actions tab and triggering the "Continuous Deployment" workflow

Note: Deployment's are only done on main branch. All other branches will get validation for Terraform & Ansible and if you use a PR to change something on main (rather than a commit which directly triggers the deployment) you can see a Terraform plan in your PR with the changes that you suggest.

Terraform

Generate Documentation

Use terraform-docs and the following command to generate the documentation:

terraform-docs markdown --indent 3 --output-file ../README.md terraform 

Requirements

Name Version
hcloud 1.33.2
hetznerdns 2.1.0

Providers

Name Version
hetznerdns 2.1.0

Modules

Name Source Version
monkey app.terraform.io/technat/vm/hcloud 1.0.1

Resources

Name Type
hetznerdns_record.monkey_technat_dev_a resource
hetznerdns_record.monkey_technat_dev_aaaa resource
hetznerdns_zone.technat_dev data source

Inputs

No inputs.

Outputs

No outputs.

About

PoC: How you could automate your minecraft server deployment in the cloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages