Automated release of chart minecraft: version 1.0.0.

This commit is contained in:
ducoterra
2021-10-31 16:26:51 -04:00
parent 0cbdd4d98e
commit 2d5a1f03bb
7 changed files with 47 additions and 86 deletions

View File

@@ -15,9 +15,9 @@ 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: 1.0.0 version: 1.1.0
# 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.4 appVersion: 1.0.0

View File

@@ -1,80 +1,3 @@
# Minecraft # Minecraft Server
## Getting server.jar Creates a vanilla Minecraft server.
![Click Installations](img/main.png)
![Select the Options Menu](img/menu.png)
![Click Edit](img/edit.png)
![Click Download Server](img/server.png)
## Running Locally
```bash
docker-compose build minecraft
docker-compose up minecraft
```
## Uploading to Docker Hub
In docker-compose.yaml, update the image tag to:
```yaml
...
services:
minecraft:
build: .
image: <your_username>/minecraft:<version>-1
ports:
...
```
then run
```bash
docker-compose push
```
## Running in kubernetes
In k8s/deploy.yaml, edit the deploy
```yaml
...
spec:
containers:
- name: minecraft
image: <your image from above>
ports:
...
```
Then run the following
```bash
kubectl apply -f k8s/pvc
kubectl apply -f k8s
```
Your minecraft server will be available on port 25565
## Create a Backup
```bash
kubectl cp <pod_name>:/mc_data <backup>
```
## Restore from Backup
```bash
kubectl cp <backup> <pod_name>:/mc_data
```
## Cool seeds
### 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

View File

@@ -1 +1,2 @@
image: ducoterra/minecraft:1.16.4 image: ducoterra/minecraft:latest
server_version: "1.17.1"

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

View File

@@ -4,21 +4,35 @@ groups:
- name: "Storage" - name: "Storage"
description: "Minecraft Server Storage" description: "Minecraft Server Storage"
questions: questions:
- variable: server_version
description: "Server Version"
label: "Version"
group: "Server Config"
schema:
type: string
default: "1.17.1"
required: false
- variable: port - variable: port
description: "Listen Port" description: "Listen Port"
group: "Server Config" group: "Server Config"
label: "Port" label: "Port"
schema: schema:
type: int type: int
default: 25565
required: true
- variable: max_ram - variable: max_ram
description: "Total RAM allocated to the server" description: "Total RAM allocated to the server"
group: "Server Config" group: "Server Config"
label: "RAM Limit (GiB)" label: "RAM Limit (GiB)"
schema: schema:
type: int type: int
default: 4
required: true
- variable: max_cpu - variable: max_cpu
description: "# CPU Cores Allocated to the server" description: "# CPU Cores Allocated to the server"
group: "Server Config" group: "Server Config"
label: "CPU Limit (# Cores)" label: "CPU Limit (# Cores)"
schema: schema:
type: int type: int
default: 4
required: true

View File

@@ -6,14 +6,34 @@ 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 }}
volumeMounts:
- mountPath: /downloads
name: data
- name: download-server
image: {{ .Values.get_server.image }}
imagePullPolicy: Always
command: ["bash", "-c", "curl -o server.jar $(cat SERVER_VERSION)"]
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:
@@ -31,13 +51,13 @@ spec:
- name: MAX_RAM - name: MAX_RAM
value: {{ .Values.max_ram | quote }} value: {{ .Values.max_ram | quote }}
- name: MIN_RAM - name: MIN_RAM
value: {{ .Values.max_ram | quote }} value: "1"
resources: resources:
requests: requests:
memory: {{ .Values.max_ram }}Gi memory: {{ div .Values.max_ram 2 }}Gi
cpu: 1m cpu: 1m
limits: limits:
memory: {{ .Values.max_ram }}Gi memory: {{ add 1 .Values.max_ram }}Gi
cpu: {{ .Values.max_cpu | quote }} cpu: {{ .Values.max_cpu | quote }}
volumes: volumes:
- name: data - name: data

View File

@@ -1,4 +1,7 @@
image: ducoterra/minecraft:1.16.4 image: ducoterra/minecraft:latest
get_server:
image: ducoterra/get-minecraft:latest
server_version: "1.17.1"
port: 20101 port: 20101
max_cpu: 4 max_cpu: 4
max_ram: 4 max_ram: 4