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
# to the chart and its templates, including the app version.
# 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
# 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.
appVersion: 1.16.4
appVersion: 1.0.0

View File

@@ -1,80 +1,3 @@
# Minecraft
# Minecraft Server
## Getting server.jar
![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
Creates a vanilla Minecraft server.

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"
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

View File

@@ -6,14 +6,34 @@ spec:
selector:
matchLabels:
app: {{ .Release.Name }}
strategy:
type: Recreate
template:
metadata:
labels:
app: {{ .Release.Name }}
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:
- name: {{ .Release.Name }}
image: {{ .Values.image }}
imagePullPolicy: Always
ports:
- containerPort: 25565
volumeMounts:
@@ -31,13 +51,13 @@ spec:
- name: MAX_RAM
value: {{ .Values.max_ram | quote }}
- name: MIN_RAM
value: {{ .Values.max_ram | quote }}
value: "1"
resources:
requests:
memory: {{ .Values.max_ram }}Gi
memory: {{ div .Values.max_ram 2 }}Gi
cpu: 1m
limits:
memory: {{ .Values.max_ram }}Gi
memory: {{ add 1 .Values.max_ram }}Gi
cpu: {{ .Values.max_cpu | quote }}
volumes:
- 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
max_cpu: 4
max_ram: 4