From 1bcacfc474016d49672df7ae7f8f3f8d96999cce Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Fri, 19 Jun 2020 15:34:56 -0500 Subject: [PATCH] docs: added a bunch more development notes --- DEVELOPMENT.md | 41 +++++++++++++++++++++++++++++- start-magma => start-deployMagma | 0 start-mohist => start-deployMohist | 5 ++-- 3 files changed, 43 insertions(+), 3 deletions(-) rename start-magma => start-deployMagma (100%) mode change 100755 => 100644 rename start-mohist => start-deployMohist (95%) mode change 100755 => 100644 diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index d879bc7b..a3cb3fa2 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,4 +1,17 @@ -Individual scripts can be iteratively developed and tested using the following procedure. +## Adding a server type + +Adding a new server `TYPE` can vary due to the complexity of obtaining and configuring each type; however, the addition of any server type includes at least the following steps: + +1. Copy an existing "start-deploy*" script, such as [start-deployMohist](start-deployMohist) and rename it accordingly making sure to retain the "start-deploy" prefix +2. Modify the type-specific behavior between the "start-utils" preamble and the hand-off to `start-finalSetup01World` at the end of the script +3. Develop and test the changes using the [iterative process described below](#iterative-script-development) +4. Add a case-entry to the `case "${TYPE^^}"` in [start-configuration](start-configuration) +5. Add a section to the [README](README.md). It is recommended to copy-modify an existing section to retain a similar wording and level of detail +6. [Submit a pull request](https://github.com/itzg/docker-minecraft-server/pulls) + +## Iterative script development + +Individual scripts can be iteratively developed, debugged, and tested using the following procedure. First, build a baseline of the image to include the packages needed by existing or new scripts: @@ -26,3 +39,29 @@ VANILLA_VERSION=1.12.2 /scripts/start-magma ``` > NOTE: You may want to temporarily add an `exit` statement near the end of your script to isolate execution to just the script you're developing. + +## Multi-base-image variants + +Several base-image variants are maintained in order to offer choices in JDK provider and version. The variants are maintained in their respective branches: +- openj9 +- openj9-nightly +- adopt11 +- adopt13 +- multiarch + +The [docker-versions-create.sh](docker-versions-create.sh) script is configured with the branches to maintain and is used to merge changes from the master branch into the mulit-base variant branches. The script also manages git tagging the master branch along with the merged branches. So a typical use of the script would be like: + +```shell script +./docker-versions-create.sh -t 1.2.0 +``` + +> Most often the major version will be bumped unless a bug or hotfix needs to be published in which case the patch version should be incremented. + +> The build and publishing of those branches and their tags is currently performed within Docker Hub. + +## multiarch support + +The [multiarch branch](https://github.com/itzg/docker-minecraft-server/tree/multiarch) supports running the image on amd64, arm64, and armv7 (aka RaspberryPi). Unlike the mainline branches, it is based on Ubuntu 18.04 since the openjdk package provided by Ubuntu includes full JIT support on all of the processor types. + +The multiarch images are built and published by [a Github action](https://github.com/itzg/docker-minecraft-server/actions?query=workflow%3A%22Build+and+publish+multiarch%22), which [is configured in that branch](https://github.com/itzg/docker-minecraft-server/blob/multiarch/.github/workflows/build-multiarch.yml). + diff --git a/start-magma b/start-deployMagma old mode 100755 new mode 100644 similarity index 100% rename from start-magma rename to start-deployMagma diff --git a/start-mohist b/start-deployMohist old mode 100755 new mode 100644 similarity index 95% rename from start-mohist rename to start-deployMohist index c9fcecd2..78bb1a47 --- a/start-mohist +++ b/start-deployMohist @@ -1,11 +1,12 @@ #!/bin/bash . ${SCRIPTS:-/}start-utils -requireVar VANILLA_VERSION set -o pipefail set -e isDebugging && set -x +requireVar VANILLA_VERSION + mohistJobs=https://ci.codemc.io/job/Mohist-Community/job/ mohistJob=${mohistJobs}Mohist-${VANILLA_VERSION}/ @@ -37,4 +38,4 @@ fi export SKIP_LOG4J_CONFIG=true # Continue to Final Setup -exec ${SCRIPTS:-/}start-finalSetup01World $@ +exec ${SCRIPTS:-/}start-finalSetup01World "$@"