Compare commits
78 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5f0e0b41f7
|
|||
|
e038672457
|
|||
| c1ca80b09b | |||
| ed6638cebf | |||
| 3b62f0648a | |||
| 17be6f427d | |||
| d08e02a46c | |||
|
|
d9485d2fdf | ||
|
|
8096a291e6 | ||
|
|
4a80310c33 | ||
|
|
d77bfb210a | ||
|
|
1f7af65220 | ||
|
|
44975664b6 | ||
|
|
05206686ad | ||
|
|
2de53def19 | ||
|
|
a85a7aa84f | ||
|
|
a07400506a | ||
|
|
422f4d49bd | ||
|
|
731ada6a3d | ||
|
|
c3e6d733c6 | ||
|
|
3c91292fea | ||
|
|
d86b5052a8 | ||
|
|
9d0c9c6388 | ||
|
|
30fb8c2171 | ||
|
|
fd96b3f3a3 | ||
|
|
a6053ed3f0 | ||
|
|
3563c5c2aa | ||
|
|
40a217b585 | ||
|
|
5e2bc5f872 | ||
|
|
a5aa0cacbe | ||
|
|
65b3a84e96 | ||
|
|
d181d452e8 | ||
|
|
9eed50962c | ||
|
|
b07a2c095b | ||
|
|
22a952dd53 | ||
|
|
0f6eeb776e | ||
|
|
f81d846f31 | ||
|
|
afed93f58a | ||
|
|
6239af7f74 | ||
|
|
2f767593ef | ||
|
|
66b4fdb902 | ||
|
|
da69418b0d | ||
|
|
ba12c923ba | ||
|
|
74a4a4e77f | ||
|
|
3e8ca71358 | ||
|
|
4146777f85 | ||
|
|
8a52a21a39 | ||
|
|
0d2235b6a3 | ||
|
|
dbe0d47f99 | ||
|
|
c7c547c80f | ||
|
|
a403f6f068 | ||
|
|
32cd04c7ec | ||
|
|
8d190e478f | ||
|
|
ba5ab53bdb | ||
|
|
f18752299d | ||
|
|
a820e9a297 | ||
|
|
9e788ee711 | ||
|
|
d3b0f86f40 | ||
|
|
2f7d4c7f83 | ||
|
|
aa253e6688 | ||
|
|
773c1d6020 | ||
|
|
dae5a097e9 | ||
|
|
44053abdf8 | ||
|
|
807b1866a8 | ||
|
|
99666bab94 | ||
|
|
1b6b8bb281 | ||
|
|
95c7fa79f3 | ||
|
|
7e0ff9e416 | ||
|
|
12fa8ecdbe | ||
|
|
7d34b3a36c | ||
|
|
95b0bd6852 | ||
|
|
ff2c9affb5 | ||
|
|
1dfb1f6202 | ||
|
|
3faf5c9d95 | ||
|
|
072bee6e27 | ||
|
|
e6a042948b | ||
|
|
7df518d7db | ||
|
|
ca4d1eeb45 |
32
.gitea/workflows/minecraft.yaml
Normal file
32
.gitea/workflows/minecraft.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
name: Minecraft Java Image
|
||||||
|
run-name: Build and Push the Minecraft Java Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- Dockerfile
|
||||||
|
- IMAGE
|
||||||
|
- VERSION
|
||||||
|
- .gitea/workflows/minecraft.yaml
|
||||||
|
schedule:
|
||||||
|
- cron: '@daily'
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: gitea.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Login to Gitea Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: gitea.reeseapps.com
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: https://github.com/docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ${{ gitea.workspace }}
|
||||||
|
file: ${{ gitea.workspace }}/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: "gitea.reeseapps.com/services/minecraft:latest,gitea.reeseapps.com/services/minecraft:${{gitea.sha}}"
|
||||||
|
no-cache: true
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
data/
|
data/
|
||||||
|
world/
|
||||||
|
|||||||
@@ -18,21 +18,4 @@ build:
|
|||||||
entrypoint: [""]
|
entrypoint: [""]
|
||||||
script:
|
script:
|
||||||
- echo $DEPLOY
|
- echo $DEPLOY
|
||||||
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
||||||
|
|
||||||
deploy_to_prod:
|
|
||||||
variables:
|
|
||||||
DEPLOY: prod
|
|
||||||
stage: deploy
|
|
||||||
only:
|
|
||||||
variables:
|
|
||||||
- $CI_COMMIT_TAG
|
|
||||||
image:
|
|
||||||
name: debian:10
|
|
||||||
entrypoint: [""]
|
|
||||||
script:
|
|
||||||
- apt -qq update >> /dev/null && apt -qq install -y curl >> /dev/null
|
|
||||||
- curl -L -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
|
|
||||||
- chmod +x /usr/local/bin/kubectl
|
|
||||||
- curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
|
|
||||||
- helm template $CI_PROJECT_NAME --set tag=$CI_COMMIT_TAG ./helm | kubectl apply -f -
|
|
||||||
1
.gitlab/.gitignore
vendored
Normal file
1
.gitlab/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.gitlab
|
||||||
21
.gitlab/Makefile
Normal file
21
.gitlab/Makefile
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
|
PROJECT_NAME ?= $(shell git config --local remote.origin.url | sed -n 's\#.*/\([^.]*\)\.git\#\1\#p')
|
||||||
|
VERSION ?= $(shell cat VERSION)
|
||||||
|
IMAGE ?= $(shell cat IMAGE):$(VERSION)
|
||||||
|
IMAGE_LATEST ?= $(shell cat IMAGE):latest
|
||||||
|
PWD ?= $(shell pwd)
|
||||||
|
STASH ?= "common-update-stash"
|
||||||
|
MAKE_BRANCH ?= main
|
||||||
|
|
||||||
|
include .gitlab/make/docker.makefile
|
||||||
|
include .gitlab/make/helm.makefile
|
||||||
|
include .gitlab/make/kaniko.makefile
|
||||||
|
include .gitlab/make/truenas.makefile
|
||||||
|
include .gitlab/make/git.makefile
|
||||||
|
include .gitlab/make/kubectl.makefile
|
||||||
|
|
||||||
|
# git subtree add --prefix .gitlab --squash --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git main
|
||||||
|
.PHONY: make-update
|
||||||
|
make-update:
|
||||||
|
@git subtree pull --prefix .gitlab --squash --message "Merge update from Common" -q git@gitlab.ducoterra.net:services/common.git $(MAKE_BRANCH)
|
||||||
9
.gitlab/README.md
Normal file
9
.gitlab/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Adding the "common" subtree as your .gitlab folder
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add the subtree as a remote
|
||||||
|
git subtree add --prefix .gitlab git@gitlab.ducoterra.net:services/common.git main --squash --message "Add Common .gitlab Subtree"
|
||||||
|
|
||||||
|
# Now you can run the following to update
|
||||||
|
make make-update
|
||||||
|
```
|
||||||
23
.gitlab/make/docker.makefile
Normal file
23
.gitlab/make/docker.makefile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
.PHONY: docker-init
|
||||||
|
docker-init:
|
||||||
|
@touch VERSION
|
||||||
|
@touch IMAGE
|
||||||
|
|
||||||
|
.PHONY: docker-buildx-context
|
||||||
|
docker-buildx-context:
|
||||||
|
@docker buildx create --name container-builder --use --platform linux/amd64,linux/arm64
|
||||||
|
|
||||||
|
.PHONY: docker-buildx-clear
|
||||||
|
docker-buildx-clear:
|
||||||
|
@docker buildx rm container-builder
|
||||||
|
|
||||||
|
.PHONY: docker-build
|
||||||
|
docker-build:
|
||||||
|
docker build . -t $(IMAGE)
|
||||||
|
|
||||||
|
.PHONY: docker-push
|
||||||
|
docker-push:
|
||||||
|
-make docker-buildx-clear
|
||||||
|
@make docker-buildx-context
|
||||||
|
docker buildx build --platform linux/amd64,linux/arm64 --push . -t $(IMAGE)
|
||||||
|
@docker buildx build --platform linux/amd64,linux/arm64 --push . -t $(IMAGE_LATEST)
|
||||||
5
.gitlab/make/git.makefile
Normal file
5
.gitlab/make/git.makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.PHONY: git-release
|
||||||
|
git-release:
|
||||||
|
@git add .
|
||||||
|
@git commit -m "Automated release for version $(VERSION)"
|
||||||
|
@git tag $(VERSION)
|
||||||
16
.gitlab/make/helm.makefile
Normal file
16
.gitlab/make/helm.makefile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
.PHONY: helm-release
|
||||||
|
helm-release:
|
||||||
|
@yq e ".version = \"$(shell cat VERSION)\"" -i helm/Chart.yaml
|
||||||
|
@yq e ".appVersion = \"$(shell cat VERSION)\"" -i helm/Chart.yaml
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
|
install: set-namespace
|
||||||
|
helm install $(PROJECT_NAME) ./helm --set image=$(IMAGE)
|
||||||
|
|
||||||
|
.PHONY: upgrade
|
||||||
|
upgrade: set-namespace
|
||||||
|
helm upgrade $(PROJECT_NAME) ./helm --set image=$(IMAGE)
|
||||||
|
|
||||||
|
.PHONY: uninstall
|
||||||
|
uninstall: set-namespace
|
||||||
|
helm uninstall $(PROJECT_NAME)
|
||||||
0
.gitlab/make/kaniko.makefile
Normal file
0
.gitlab/make/kaniko.makefile
Normal file
11
.gitlab/make/kubectl.makefile
Normal file
11
.gitlab/make/kubectl.makefile
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
.PHONY: set-namespace
|
||||||
|
set-namespace:
|
||||||
|
kubectl config set contexts.$(shell kubectl config current-context).namespace $(shell cat NAMESPACE)
|
||||||
|
|
||||||
|
.PHONY: create-regcred
|
||||||
|
create-regcred:
|
||||||
|
@kubectl create secret docker-registry regcred \
|
||||||
|
--docker-server=registry.ducoterra.net \
|
||||||
|
--docker-username=$(shell vault kv get -field username secret/duconet/basic-auth) \
|
||||||
|
--docker-password='$(shell vault kv get -field password secret/duconet/basic-auth)' \
|
||||||
|
--docker-email=$(shell vault kv get -field username secret/duconet/basic-auth)
|
||||||
5
.gitlab/make/truenas.makefile
Normal file
5
.gitlab/make/truenas.makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.PHONY: chart-release
|
||||||
|
chart-release:
|
||||||
|
@rsync -av $(CHART)/helm/ charts/$(CHART)/$(shell cat $(CHART)/VERSION)/
|
||||||
|
@git add charts/$(CHART)
|
||||||
|
@git commit -m "Automated release for chart $(CHART) version $(shell cat $(CHART)/VERSION)" -e
|
||||||
16
Dockerfile
16
Dockerfile
@@ -1,15 +1,7 @@
|
|||||||
FROM openjdk:8-slim
|
# Read more about Corretto here:
|
||||||
|
# https://hub.docker.com/_/amazoncorretto
|
||||||
|
FROM docker.io/amazoncorretto:21
|
||||||
|
|
||||||
RUN apt update && apt install -y rsync
|
|
||||||
|
|
||||||
WORKDIR /mc_server
|
|
||||||
COPY ./server .
|
|
||||||
|
|
||||||
RUN groupadd -r minecraft && useradd --no-log-init -r -g minecraft minecraft
|
|
||||||
WORKDIR /mc_data
|
WORKDIR /mc_data
|
||||||
RUN chown -R minecraft:minecraft .
|
|
||||||
|
|
||||||
USER minecraft
|
CMD ["sh", "-c" , "java -Xmx${MAX_RAM}G -Xms${MIN_RAM}G -jar ./server.jar nogui"]
|
||||||
# Copy files only if they don't yet exist (server.jar, server.properties, etc) and start the server
|
|
||||||
CMD cp -r /mc_server/. . && \
|
|
||||||
java -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads="$THREADS" -XX:+AggressiveOpts -Xmx"$MAX_RAM"G -Xms"$MIN_RAM"G -jar server.jar nogui
|
|
||||||
|
|||||||
28
Makefile
Normal file
28
Makefile
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
SHELL := /bin/bash
|
||||||
|
|
||||||
|
include .gitlab/Makefile
|
||||||
|
|
||||||
|
.PHONY: build
|
||||||
|
build:
|
||||||
|
@podman build -f Dockerfile -t localhost/minecraft:latest
|
||||||
|
|
||||||
|
.PHONY: get-server
|
||||||
|
get-server:
|
||||||
|
@mkdir -p world
|
||||||
|
@echo 'eula=true' > world/eula.txt
|
||||||
|
@podman run \
|
||||||
|
-it \
|
||||||
|
--rm \
|
||||||
|
-e SERVER_VERSION=1.21.10 \
|
||||||
|
-v $(PWD)/world:/downloads \
|
||||||
|
--security-opt label=disable \
|
||||||
|
--userns keep-id \
|
||||||
|
docker.io/ducoterra/get-minecraft:latest
|
||||||
|
|
||||||
|
.PHONY: run
|
||||||
|
run:
|
||||||
|
docker compose -f compose.yaml up minecraft
|
||||||
|
|
||||||
|
.PHONY: stop
|
||||||
|
stop:
|
||||||
|
docker compose -f compose.yaml down
|
||||||
73
README.md
73
README.md
@@ -1,69 +1,48 @@
|
|||||||
# Minecraft
|
# Minecraft
|
||||||
|
|
||||||
## Getting server.jar
|
|
||||||
|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
## Running Locally
|
## Running Locally
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose build minecraft
|
# Build
|
||||||
docker-compose up minecraft
|
make build
|
||||||
|
|
||||||
|
# download the most recent version of minecraft
|
||||||
|
make get-server
|
||||||
|
|
||||||
|
# Run the server
|
||||||
|
make run
|
||||||
|
|
||||||
|
# Stop the server
|
||||||
|
make stop
|
||||||
```
|
```
|
||||||
|
|
||||||
## Uploading to Docker Hub
|
## Uploading to Docker Hub
|
||||||
|
|
||||||
In docker-compose.yaml, update the image tag to:
|
1. Update the version in the VERSION file.
|
||||||
|
2. Build and push the new version
|
||||||
|
|
||||||
```yaml
|
```bash
|
||||||
...
|
make build
|
||||||
services:
|
make push
|
||||||
minecraft:
|
```
|
||||||
build: .
|
|
||||||
image: <your_username>/minecraft:<version>-1
|
|
||||||
ports:
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
then run
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose push
|
|
||||||
```
|
|
||||||
|
|
||||||
## Running in kubernetes
|
## Running in kubernetes
|
||||||
|
|
||||||
In k8s/deploy.yaml, edit the deploy
|
Requires helm v3. Edit values.yaml and run the following:
|
||||||
|
|
||||||
```yaml
|
|
||||||
...
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: minecraft
|
|
||||||
image: <your image from above>
|
|
||||||
ports:
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
Then run the following
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl apply -f k8s/pvc
|
helm upgrade --install minecraft
|
||||||
kubectl apply -f k8s
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Your minecraft server will be available on port 25565
|
Your minecraft server will be available on port 25565 by default.
|
||||||
|
|
||||||
## Create a Backup
|
### Create a Backup in Kubernetes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl cp <pod_name>:/mc_data <backup>
|
kubectl cp <pod_name>:/mc_data <backup>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Restore from Backup
|
### Restore from Backup in Kubernetes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl cp <backup> <pod_name>:/mc_data
|
kubectl cp <backup> <pod_name>:/mc_data
|
||||||
@@ -71,4 +50,10 @@ kubectl cp <backup> <pod_name>:/mc_data
|
|||||||
|
|
||||||
## Cool seeds
|
## Cool seeds
|
||||||
|
|
||||||
with an amplified world, -8018833100564192815
|
### 7485786574821478084
|
||||||
|
|
||||||
|
Spawns you next to a nether portal with golden axe and pickaxe. River and Village close by.
|
||||||
|
|
||||||
|
### -8018833100564192815
|
||||||
|
|
||||||
|
Use with an amplified world, massive island
|
||||||
|
|||||||
3
build.sh
3
build.sh
@@ -1,3 +0,0 @@
|
|||||||
docker-compose build mc
|
|
||||||
docker-compose push mc
|
|
||||||
kubectl apply -f k8s/
|
|
||||||
15
compose.yaml
Normal file
15
compose.yaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
minecraft:
|
||||||
|
image: localhost/minecraft:latest
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
volumes:
|
||||||
|
- ./world:/mc_data
|
||||||
|
ports:
|
||||||
|
- 25565:25565
|
||||||
|
environment:
|
||||||
|
- MAX_RAM=1
|
||||||
|
- MIN_RAM=1
|
||||||
|
security_opt:
|
||||||
|
- "label=disable"
|
||||||
|
userns_mode: keep-id
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
version: '3'
|
|
||||||
|
|
||||||
services:
|
|
||||||
minecraft:
|
|
||||||
build: .
|
|
||||||
ports:
|
|
||||||
- 25565:25565
|
|
||||||
volumes:
|
|
||||||
- ./data:/mc_data
|
|
||||||
tty: true
|
|
||||||
stdin_open: true
|
|
||||||
restart: always
|
|
||||||
environment:
|
|
||||||
- MAX_RAM=2
|
|
||||||
- MIN_RAM=1
|
|
||||||
- THREADS=2
|
|
||||||
user: minecraft
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
name: charts
|
name: minecraft
|
||||||
description: A Helm chart for Kubernetes
|
description: A Minecraft server for kubernetes
|
||||||
|
|
||||||
# A chart can be either an 'application' or a 'library' chart.
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
#
|
#
|
||||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
@@ -11,13 +10,11 @@ description: A Helm chart for Kubernetes
|
|||||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
type: application
|
type: application
|
||||||
|
|
||||||
# This is the chart version. This version number should be incremented each time you make changes
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
# to the chart and its templates, including the app version.
|
# to the chart and its templates, including the app version.
|
||||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||||
version: 0.1.0
|
version: 1.0.2
|
||||||
|
|
||||||
# This is the version number of the application being deployed. This version number should be
|
# This is the version number of the application being deployed. This version number should be
|
||||||
# incremented each time you make changes to the application. Versions are not expected to
|
# incremented each time you make changes to the application. Versions are not expected to
|
||||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||||
appVersion: 1.16.0
|
appVersion: 1.0.2
|
||||||
|
|||||||
3
helm/README.md
Normal file
3
helm/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Minecraft Server
|
||||||
|
|
||||||
|
Creates a vanilla Minecraft server.
|
||||||
3
helm/app-readme.md
Normal file
3
helm/app-readme.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Minecraft Server
|
||||||
|
|
||||||
|
Creates a vanilla Minecraft server.
|
||||||
2
helm/ix_values.yaml
Normal file
2
helm/ix_values.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
image: ducoterra/minecraft:latest
|
||||||
|
server_version: "1.17.1"
|
||||||
BIN
helm/minecraft-logo.png
Normal file
BIN
helm/minecraft-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 268 KiB |
38
helm/questions.yaml
Normal file
38
helm/questions.yaml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
groups:
|
||||||
|
- name: "Server Config"
|
||||||
|
description: "Minecraft Server Configuration"
|
||||||
|
- name: "Storage"
|
||||||
|
description: "Minecraft Server Storage"
|
||||||
|
questions:
|
||||||
|
- variable: server_version
|
||||||
|
description: "Server Version"
|
||||||
|
label: "Version"
|
||||||
|
group: "Server Config"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "1.17.1"
|
||||||
|
required: false
|
||||||
|
- variable: port
|
||||||
|
description: "Listen Port"
|
||||||
|
group: "Server Config"
|
||||||
|
label: "Port"
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
default: 25565
|
||||||
|
required: true
|
||||||
|
- variable: max_ram
|
||||||
|
description: "Total RAM allocated to the server"
|
||||||
|
group: "Server Config"
|
||||||
|
label: "RAM Limit (GiB)"
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
default: 4
|
||||||
|
required: true
|
||||||
|
- variable: max_cpu
|
||||||
|
description: "# CPU Cores Allocated to the server"
|
||||||
|
group: "Server Config"
|
||||||
|
label: "CPU Limit (# Cores)"
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
default: 4
|
||||||
|
required: true
|
||||||
8
helm/templates/configmap.yaml
Normal file
8
helm/templates/configmap.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
data:
|
||||||
|
eula.txt: |
|
||||||
|
eula=true
|
||||||
|
server.properties: {{ toYaml .Values.server_props | indent 2 }}
|
||||||
@@ -6,36 +6,58 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: {{ .Release.Name }}
|
app: {{ .Release.Name }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Release.Name }}
|
app: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: get-version
|
||||||
|
image: {{ .Values.get_server.image }}
|
||||||
|
imagePullPolicy: Always
|
||||||
|
env:
|
||||||
|
- name: SERVER_VERSION
|
||||||
|
value: {{ .Values.server_version | quote }}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /downloads
|
||||||
|
name: data
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Release.Name }}
|
- name: {{ .Release.Name }}
|
||||||
image: {{ .Values.image }}
|
image: {{ .Values.image }}
|
||||||
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 25565
|
- containerPort: 25565
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /mc_data
|
- mountPath: /mc_data
|
||||||
name: data
|
name: data
|
||||||
|
- name: properties
|
||||||
|
mountPath: /mc_data/server.properties
|
||||||
|
subPath: server.properties
|
||||||
|
- name: properties
|
||||||
|
mountPath: /mc_data/eula.txt
|
||||||
|
subPath: eula.txt
|
||||||
tty: true
|
tty: true
|
||||||
stdin: true
|
stdin: true
|
||||||
env:
|
env:
|
||||||
- name: MAX_RAM
|
- name: MAX_RAM
|
||||||
value: "4"
|
value: {{ .Values.max_ram | quote }}
|
||||||
- name: MIN_RAM
|
- name: MIN_RAM
|
||||||
value: "1"
|
value: "1"
|
||||||
- name: THREADS
|
|
||||||
value: "4"
|
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: "2Gi"
|
memory: {{ div .Values.max_ram 2 }}Gi
|
||||||
cpu: 250m
|
cpu: 1m
|
||||||
limits:
|
limits:
|
||||||
memory: "4Gi"
|
memory: {{ add 1 .Values.max_ram }}Gi
|
||||||
cpu: "4"
|
cpu: {{ .Values.max_cpu | quote }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ .Release.Name }}
|
claimName: {{ .Release.Name }}
|
||||||
|
- name: properties
|
||||||
|
configMap:
|
||||||
|
name: {{ .Release.Name }}
|
||||||
|
securityContext:
|
||||||
|
fsGroup: 2000
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Release.Name }}
|
name: {{ .Release.Name }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/resource-policy": keep
|
||||||
spec:
|
spec:
|
||||||
storageClassName: nfs-encrypted
|
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteOnce
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 32Gi
|
storage: 32Gi
|
||||||
@@ -6,7 +6,7 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: {{ .Release.Name }}
|
app: {{ .Release.Name }}
|
||||||
ports:
|
ports:
|
||||||
- port: 25565
|
- port: {{ .Values.port }}
|
||||||
targetPort: 25565
|
targetPort: 25565
|
||||||
name: {{ .Release.Name }}
|
name: {{ .Release.Name }}
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
@@ -1 +1,45 @@
|
|||||||
image: hub.ducoterra.net/ducoterra/minecraft:1.15.2_1
|
image: ducoterra/minecraft:latest
|
||||||
|
get_server:
|
||||||
|
image: ducoterra/get-minecraft:2.0.0
|
||||||
|
server_version: "1.17.1"
|
||||||
|
port: 20101
|
||||||
|
max_cpu: 4
|
||||||
|
max_ram: 4
|
||||||
|
server_props: |
|
||||||
|
max-tick-time=60000
|
||||||
|
generator-settings=
|
||||||
|
force-gamemode=false
|
||||||
|
allow-nether=true
|
||||||
|
gamemode=0
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
enable-query=false
|
||||||
|
player-idle-timeout=0
|
||||||
|
difficulty=3
|
||||||
|
spawn-monsters=true
|
||||||
|
op-permission-level=4
|
||||||
|
pvp=true
|
||||||
|
snooper-enabled=true
|
||||||
|
level-type=default
|
||||||
|
hardcore=false
|
||||||
|
enable-command-block=false
|
||||||
|
max-players=20
|
||||||
|
network-compression-threshold=256
|
||||||
|
resource-pack-sha1=
|
||||||
|
max-world-size=29999984
|
||||||
|
server-port=25565
|
||||||
|
server-ip=
|
||||||
|
spawn-npcs=true
|
||||||
|
allow-flight=true
|
||||||
|
level-name=world
|
||||||
|
view-distance=32
|
||||||
|
resource-pack=
|
||||||
|
spawn-animals=true
|
||||||
|
white-list=true
|
||||||
|
generate-structures=true
|
||||||
|
online-mode=true
|
||||||
|
max-build-height=256
|
||||||
|
level-seed=
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
use-native-transport=true
|
||||||
|
motd=This is gonna be interesting
|
||||||
|
enable-rcon=false
|
||||||
|
|||||||
BIN
img/edit.png
BIN
img/edit.png
Binary file not shown.
|
Before Width: | Height: | Size: 481 KiB |
BIN
img/main.png
BIN
img/main.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB |
BIN
img/menu.png
BIN
img/menu.png
Binary file not shown.
|
Before Width: | Height: | Size: 476 KiB |
BIN
img/server.png
BIN
img/server.png
Binary file not shown.
|
Before Width: | Height: | Size: 348 KiB |
@@ -1 +0,0 @@
|
|||||||
eula=true
|
|
||||||
Binary file not shown.
@@ -1,39 +0,0 @@
|
|||||||
#Minecraft server properties
|
|
||||||
#Thu Jan 02 01:15:23 UTC 2020
|
|
||||||
max-tick-time=60000
|
|
||||||
generator-settings=
|
|
||||||
force-gamemode=false
|
|
||||||
allow-nether=true
|
|
||||||
gamemode=0
|
|
||||||
broadcast-console-to-ops=true
|
|
||||||
enable-query=false
|
|
||||||
player-idle-timeout=0
|
|
||||||
difficulty=3
|
|
||||||
spawn-monsters=true
|
|
||||||
op-permission-level=4
|
|
||||||
pvp=true
|
|
||||||
snooper-enabled=true
|
|
||||||
level-type=amplified
|
|
||||||
hardcore=false
|
|
||||||
enable-command-block=false
|
|
||||||
max-players=20
|
|
||||||
network-compression-threshold=256
|
|
||||||
resource-pack-sha1=
|
|
||||||
max-world-size=29999984
|
|
||||||
server-port=25565
|
|
||||||
server-ip=
|
|
||||||
spawn-npcs=true
|
|
||||||
allow-flight=true
|
|
||||||
level-name=world
|
|
||||||
view-distance=20
|
|
||||||
resource-pack=
|
|
||||||
spawn-animals=true
|
|
||||||
white-list=true
|
|
||||||
generate-structures=true
|
|
||||||
online-mode=true
|
|
||||||
max-build-height=512
|
|
||||||
level-seed=
|
|
||||||
prevent-proxy-connections=false
|
|
||||||
use-native-transport=true
|
|
||||||
motd=This is gonna be interesting
|
|
||||||
enable-rcon=false
|
|
||||||
19
servers.md
Normal file
19
servers.md
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Servers
|
||||||
|
|
||||||
|
## Minecraft
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade --install minecraft ./helm --set tag=1.15.2_7 --set port=25565
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pubcraft
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade --install pubcraft ./helm --set tag=1.15.2_7 --set port=20100
|
||||||
|
```
|
||||||
|
|
||||||
|
## TestCraft
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade --install testcraft ./helm --set tag=1.16.1_2 --set port=25566
|
||||||
|
```
|
||||||
45
values/values-camcraft.yaml
Normal file
45
values/values-camcraft.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
image: ducoterra/minecraft:latest
|
||||||
|
get_server:
|
||||||
|
image: ducoterra/get-minecraft:2.0.0
|
||||||
|
server_version: "1.16.4"
|
||||||
|
port: 20101
|
||||||
|
max_cpu: 4
|
||||||
|
max_ram: 4
|
||||||
|
server_props: |
|
||||||
|
max-tick-time=60000
|
||||||
|
generator-settings=
|
||||||
|
force-gamemode=false
|
||||||
|
allow-nether=true
|
||||||
|
gamemode=0
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
enable-query=false
|
||||||
|
player-idle-timeout=0
|
||||||
|
difficulty=3
|
||||||
|
spawn-monsters=true
|
||||||
|
op-permission-level=4
|
||||||
|
pvp=true
|
||||||
|
snooper-enabled=true
|
||||||
|
level-type=default
|
||||||
|
hardcore=false
|
||||||
|
enable-command-block=false
|
||||||
|
max-players=20
|
||||||
|
network-compression-threshold=256
|
||||||
|
resource-pack-sha1=
|
||||||
|
max-world-size=29999984
|
||||||
|
server-port=25565
|
||||||
|
server-ip=
|
||||||
|
spawn-npcs=true
|
||||||
|
allow-flight=true
|
||||||
|
level-name=world
|
||||||
|
view-distance=32
|
||||||
|
resource-pack=
|
||||||
|
spawn-animals=true
|
||||||
|
white-list=true
|
||||||
|
generate-structures=true
|
||||||
|
online-mode=true
|
||||||
|
max-build-height=256
|
||||||
|
level-seed=
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
use-native-transport=true
|
||||||
|
motd=This is gonna be interesting
|
||||||
|
enable-rcon=false
|
||||||
42
values/values-minecraft.yaml
Normal file
42
values/values-minecraft.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
image: hub.ducoterra.net/ducoterra/minecraft:1.16.4
|
||||||
|
port: 25565
|
||||||
|
max_cpu: 8
|
||||||
|
max_ram: 6
|
||||||
|
server_props: |
|
||||||
|
max-tick-time=60000
|
||||||
|
generator-settings=
|
||||||
|
force-gamemode=false
|
||||||
|
allow-nether=true
|
||||||
|
gamemode=0
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
enable-query=false
|
||||||
|
player-idle-timeout=0
|
||||||
|
difficulty=3
|
||||||
|
spawn-monsters=true
|
||||||
|
op-permission-level=4
|
||||||
|
pvp=true
|
||||||
|
snooper-enabled=true
|
||||||
|
level-type=default
|
||||||
|
hardcore=false
|
||||||
|
enable-command-block=false
|
||||||
|
max-players=20
|
||||||
|
network-compression-threshold=256
|
||||||
|
resource-pack-sha1=
|
||||||
|
max-world-size=29999984
|
||||||
|
server-port=25565
|
||||||
|
server-ip=
|
||||||
|
spawn-npcs=true
|
||||||
|
allow-flight=true
|
||||||
|
level-name=world
|
||||||
|
view-distance=32
|
||||||
|
resource-pack=
|
||||||
|
spawn-animals=true
|
||||||
|
white-list=true
|
||||||
|
generate-structures=true
|
||||||
|
online-mode=true
|
||||||
|
max-build-height=256
|
||||||
|
level-seed=
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
use-native-transport=true
|
||||||
|
motd=This is gonna be interesting
|
||||||
|
enable-rcon=false
|
||||||
42
values/values-pubcraft.yaml
Normal file
42
values/values-pubcraft.yaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
image: hub.ducoterra.net/ducoterra/minecraft:1.16.4
|
||||||
|
port: 20100
|
||||||
|
max_cpu: 8
|
||||||
|
max_ram: 6
|
||||||
|
server_props: |
|
||||||
|
max-tick-time=60000
|
||||||
|
generator-settings=
|
||||||
|
force-gamemode=false
|
||||||
|
allow-nether=true
|
||||||
|
gamemode=0
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
enable-query=false
|
||||||
|
player-idle-timeout=0
|
||||||
|
difficulty=3
|
||||||
|
spawn-monsters=true
|
||||||
|
op-permission-level=4
|
||||||
|
pvp=true
|
||||||
|
snooper-enabled=true
|
||||||
|
level-type=default
|
||||||
|
hardcore=false
|
||||||
|
enable-command-block=false
|
||||||
|
max-players=20
|
||||||
|
network-compression-threshold=256
|
||||||
|
resource-pack-sha1=
|
||||||
|
max-world-size=29999984
|
||||||
|
server-port=25565
|
||||||
|
server-ip=
|
||||||
|
spawn-npcs=true
|
||||||
|
allow-flight=true
|
||||||
|
level-name=world
|
||||||
|
view-distance=32
|
||||||
|
resource-pack=
|
||||||
|
spawn-animals=true
|
||||||
|
white-list=true
|
||||||
|
generate-structures=true
|
||||||
|
online-mode=true
|
||||||
|
max-build-height=256
|
||||||
|
level-seed=
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
use-native-transport=true
|
||||||
|
motd=This is gonna be interesting
|
||||||
|
enable-rcon=false
|
||||||
45
values/values-testcraft.yaml
Normal file
45
values/values-testcraft.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
image: ducoterra/minecraft:latest
|
||||||
|
get_server:
|
||||||
|
image: ducoterra/get-minecraft:2.0.0
|
||||||
|
server_version: "1.18"
|
||||||
|
port: 20103
|
||||||
|
max_cpu: 8
|
||||||
|
max_ram: 8
|
||||||
|
server_props: |
|
||||||
|
max-tick-time=60000
|
||||||
|
generator-settings=
|
||||||
|
force-gamemode=false
|
||||||
|
allow-nether=true
|
||||||
|
gamemode=0
|
||||||
|
broadcast-console-to-ops=true
|
||||||
|
enable-query=false
|
||||||
|
player-idle-timeout=0
|
||||||
|
difficulty=3
|
||||||
|
spawn-monsters=true
|
||||||
|
op-permission-level=4
|
||||||
|
pvp=true
|
||||||
|
snooper-enabled=true
|
||||||
|
level-type=default
|
||||||
|
hardcore=false
|
||||||
|
enable-command-block=false
|
||||||
|
max-players=20
|
||||||
|
network-compression-threshold=256
|
||||||
|
resource-pack-sha1=
|
||||||
|
max-world-size=29999984
|
||||||
|
server-port=25565
|
||||||
|
server-ip=
|
||||||
|
spawn-npcs=true
|
||||||
|
allow-flight=true
|
||||||
|
level-name=world
|
||||||
|
view-distance=32
|
||||||
|
resource-pack=
|
||||||
|
spawn-animals=true
|
||||||
|
white-list=true
|
||||||
|
generate-structures=true
|
||||||
|
online-mode=true
|
||||||
|
max-build-height=256
|
||||||
|
level-seed=
|
||||||
|
prevent-proxy-connections=false
|
||||||
|
use-native-transport=true
|
||||||
|
motd=Welcome to testcraft!
|
||||||
|
enable-rcon=false
|
||||||
Reference in New Issue
Block a user