Miou-zora / Oracle-AnsibleMine

A "fork" of https://github.com/wladi0097/AnsibleMine but works for OCI (Oracle Cloud Infrastructure) and setup for my own personnal minecraft server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AnsibleMine

/!\ I DON'T OWN THE MAJORITY OF THE CODE. CHECK ANSIBLEMINE IF YOU WANT THE ORIGINAL ONE /!\

Supported Platforms

  • Ubuntu 18.04.
  • Debian 9 or newer.

Quick tutorial:

Manually building configs:

  • The host system should have Python, Ansible -> apt install python3 ansible
  • Copy the inventory.example to inventory and fill it with your server(s)
  • Configure vars.yml
  • Put your world.zip or world into data
  • Run bash createServer.sh

Cli generated config (experimental):

  • The host system should have Python, Ansible -> apt install python3 ansible
  • Install python requirements -> pip3 install -r requirements.txt
  • Put your world.zip or world into data
  • Run python3 main.py

What?

Setup multiple remote Minecraft servers with Ansible and Docker in minutes.

This is using the awesome docker image provided by itzg in the background.

Dependencies the host system should have:

This programm was written for Linux and only tested on that.

These are host only requirements. They will be automatically installed on the remote system, if they are not already.

How?

Prerequisites for manual configuration

(required)

  1. Copy the inventory.example to inventory and fill it with your servers.
  • There are two options:
    • With ssh key already on the servers -> 1.1.1.1 ansible_user=root
    • With paswords -> 1.1.1.1 ansible_user=root ansible_ssh_pass=pass
  1. Configure vars.yml
  • In use vars files and examples can be found in the examples folder
  • If you want a vanilla server, just fill out the #Required section or keep the default settings.
  • If you want a curseforge modded server the #Required section of the vars will be ignored. Just fill out the server_curse_forge_modpack and world_location.

(optional)

  1. Put your world folder into data/ -> data/world/ or
  2. Provide your zipped world contents as world.zip and put this into data/ (DO NOT ZIP THE FOLDER BUT ITS CONTENT!)

Create Servers

bash createServer.sh

This command will:

  1. Install all dependencies
  2. Upload your world
  3. (Download the modpack if provided)
  4. Start the minecraft server as configured

Backup all Servers

bash getBackup.sh
  • This will save your current world as ip.timestamp. Example: 127.0.0.2.1538461589.zip.
  • The backups are downloaded from all servers and are places in the backups folder
  • To upload a backup, just move it to the data folder and call it world.zip

About

A "fork" of https://github.com/wladi0097/AnsibleMine but works for OCI (Oracle Cloud Infrastructure) and setup for my own personnal minecraft server.

License:Apache License 2.0


Languages

Language:Python 93.9%Language:Shell 6.1%