--- a/minecraft/server/defaults/main.yaml Mon Oct 25 15:57:24 2021 -0500
+++ b/minecraft/server/defaults/main.yaml Sun Dec 12 18:48:50 2021 -0600
@@ -1,5 +1,11 @@
---
+minecraft_java_arch: "aarch64"
+minecraft_java_major: "17"
+minecraft_java_version: "{{minecraft_java_major}}.0.1"
+minecraft_java_build: "12"
+
+
minecraft_user: "minecraft"
minecraft_parent_dir: "/opt"
minecraft_motd: "A Minecraft Server"
@@ -11,15 +17,15 @@
minecraft_world_name: "world"
# https://papermc.io
-minecraft_paper_version: "1.17.1"
-minecraft_paper_build: "353"
+minecraft_paper_version: "1.18.1"
+minecraft_paper_build: "68"
minecreat_plugins_enabled:
- "dynmap"
- "geyser"
# https://www.reddit.com/r/Dynmap/
-minecraft_dynmap_version: "3.2.1"
+minecraft_dynmap_version: "3.3-SNAPSHOT"
# https://geysermc.org
-minecraft_geyser_vesrion: "911"
+minecraft_geyser_vesrion: "961"
--- a/minecraft/server/files/03adoptopenjdk-direct Mon Oct 25 15:57:24 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Acquire::HTTP::Proxy::adoptopenjdk.jfrog.io "DIRECT";
--- a/minecraft/server/tasks/adoptopenjdk.yaml Mon Oct 25 15:57:24 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
----
-
-- name: configure apt proxy bypass for https
- become: yes
- copy: src="03adoptopenjdk-direct" dest="/etc/apt/apt.conf.d/03adoptopenjdk-direct"
-
-- name: add adoptopenjdk apt key
- become: yes
- apt_key: url="https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public/"
-
-- name: add adoptopenjdk apt repo
- become: yes
- apt_repository: repo="deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ buster main"
-
-- name: update apt package cache
- become: yes
- apt: upgrade="dist" autoremove="yes" autoclean="yes" update_cache="yes" cache_valid_time="3600"
-
-- name: install adoptopenjdk hotspot jre 16
- become: yes
- apt: name="adoptopenjdk-16-hotspot-jre"
--- a/minecraft/server/tasks/main.yaml Mon Oct 25 15:57:24 2021 -0500
+++ b/minecraft/server/tasks/main.yaml Sun Dec 12 18:48:50 2021 -0600
@@ -4,8 +4,16 @@
become: yes
user: name="{{minecraft_user}}" home="{{minecraft_parent_dir}}/minecraft" shell="/bin/false" system="yes"
-- name: install adoptopenjdk
- include_tasks: adoptopenjdk.yaml
+- name: install adoptium java
+ become: yes
+ unarchive:
+ remote_src: yes
+ src: "{{minecraft_java_url}}"
+ dest: "/opt/"
+ creates: "/opt/jdk-{{minecraft_java_version}}+{{minecraft_java_build}}/"
+ owner: "root"
+ group: "root"
+ notify: restart minecraft
- name: create minecraft dir
become: yes
--- a/minecraft/server/templates/[email protected] Mon Oct 25 15:57:24 2021 -0500
+++ b/minecraft/server/templates/[email protected] Sun Dec 12 18:48:50 2021 -0600
@@ -9,7 +9,7 @@
WorkingDirectory={{minecraft_parent_dir}}/minecraft/%i
Restart=on-failure
RestartSec=20 5
-ExecStart=/usr/bin/java -Xms{{minecraft_mem}} -Xmx{{minecraft_mem}} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui
+ExecStart=/opt/jdk-{{minecraft_java_version}}+{{minecraft_java_build}}/bin/java -Xms{{minecraft_mem}} -Xmx{{minecraft_mem}} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui
PrivateTmp=true
ProtectSystem=full
--- a/minecraft/server/vars/main.yaml Mon Oct 25 15:57:24 2021 -0500
+++ b/minecraft/server/vars/main.yaml Sun Dec 12 18:48:50 2021 -0600
@@ -1,8 +1,11 @@
---
minecraft_dir: "{{minecraft_parent_dir}}/minecraft/{{minecraft_world_name}}"
-minecraft_url: "https://papermc.io/api/v1/paper/{{minecraft_paper_version}}/{{minecraft_paper_build}}/download"
+minecraft_url: "https://papermc.io/api/v2/projects/paper/versions/{{minecraft_paper_version}}/builds/{{minecraft_paper_build}}/downloads/paper-{{minecraft_paper_version}}-{{minecraft_paper_build}}.jar"
# paper is a spigot derivative
minecraft_dynmap_url: "http://dynmap.us/builds/dynmap/Dynmap-{{minecraft_dynmap_version}}-spigot.jar"
minecraft_geyser_url: "https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/{{minecraft_geyser_vesrion}}/artifact/bootstrap/spigot/target/Geyser-Spigot.jar"
+
+# Java - https://adoptium.net/releases.html
+minecraft_java_url: "https://github.com/adoptium/temurin{{minecraft_java_major}}-binaries/releases/download/jdk-{{minecraft_java_version}}%2B{{minecraft_java_build}}/OpenJDK{{minecraft_java_major}}U-jdk_{{minecraft_java_arch}}_linux_hotspot_{{minecraft_java_version}}_{{minecraft_java_build}}.tar.gz"