diff --git a/templates/janitor/0/docker-compose.yml b/templates/janitor/0/docker-compose.yml new file mode 100644 index 0000000..5cce2d9 --- /dev/null +++ b/templates/janitor/0/docker-compose.yml @@ -0,0 +1,15 @@ +cleanup: + image: meltwater/docker-cleanup:1.4.0 + environment: + CLEAN_PERIOD: ${FREQUENCY} + DELAY_TIME: "900" + KEEP_IMAGES: ${KEEP} + labels: + io.rancher.scheduler.global: "true" + io.rancher.scheduler.affinity:host_label_ne: ${EXCLUDE_LABEL} + privileged: true + tty: true + stdin_open: true + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker:/var/lib/docker diff --git a/templates/janitor/0/rancher-compose.yml b/templates/janitor/0/rancher-compose.yml new file mode 100644 index 0000000..ca4ae8b --- /dev/null +++ b/templates/janitor/0/rancher-compose.yml @@ -0,0 +1,25 @@ +.catalog: + name: "Janitor" + version: "v1.4.0" + description: "Docker cleanup" + uuid: janitor-0 + questions: + - variable: "FREQUENCY" + label: "Frequency" + description: "Run the cleanup on a cycle of this many seconds" + default: 3600 + required: true + type: "int" + - variable: "EXCLUDE_LABEL" + label: "Exclude label" + description: "Specify a Rancher host label here that will be used to determine on which hosts the container should not deploy." + default: janitor.exclude=true + required: true + type: "string" + - variable: "KEEP" + label: "Keep images" + description: "A comma separated list of images that should never be removed" + default: "rancher/agent:v0.8.2,rancher/agent-instance:v0.6.0" + required: false + type: "string" + diff --git a/templates/janitor/README.md b/templates/janitor/README.md new file mode 100644 index 0000000..fdfb873 --- /dev/null +++ b/templates/janitor/README.md @@ -0,0 +1,17 @@ +# Janitor + +### Topology + +A Janitor instance will be started on every host that does not match the +scheduling rule (default is `janitor.exclude=true`). + +### Operation + +This will run a task daily (by default) that will delete any unused +image, and any orphaned volume. The rancher container images are excluded +from the list of images to clean up, and you can add your own containers to +the exclude list if you wish. + +This will halp to prevent the /var/lib/docker filesystem from filling up +with old and unused container images. + diff --git a/templates/janitor/catalogIcon-janitor.svg b/templates/janitor/catalogIcon-janitor.svg new file mode 100644 index 0000000..936390a --- /dev/null +++ b/templates/janitor/catalogIcon-janitor.svg @@ -0,0 +1,31 @@ + + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/janitor/config.yml b/templates/janitor/config.yml new file mode 100644 index 0000000..aa8322e --- /dev/null +++ b/templates/janitor/config.yml @@ -0,0 +1,7 @@ +name: Janitor +description: | + Automatic cleanup of unused images on hosts, in order to save disk space. +version: v1.4.0 +category: monitoring +maintainer: Steve Shipway + diff --git a/templates/minecraft/0/docker-compose.yml b/templates/minecraft/0/docker-compose.yml new file mode 100644 index 0000000..b3420a2 --- /dev/null +++ b/templates/minecraft/0/docker-compose.yml @@ -0,0 +1,24 @@ +Minecraft: + environment: + EULA: ${EULA} + VERSION: ${VERSION} + DIFFICULTY: ${DIFFICULTY} + MODE: ${MODE} + PVP: ${PVP} + WHITELIST: ${WHITELIST} + OPS: ${OPS} + MOTD: ${MOTD} + SEED: ${SEED} + WORLD: ${WORLD} + tty: true + image: itzg/minecraft-server + stdin_open: true +MinecraftLB: + ports: + - ${PORT}:25565/tcp + tty: true + image: rancher/load-balancer-service + links: + - Minecraft:Minecraft + stdin_open: true + diff --git a/templates/minecraft/0/rancher-compose.yml b/templates/minecraft/0/rancher-compose.yml new file mode 100644 index 0000000..3511458 --- /dev/null +++ b/templates/minecraft/0/rancher-compose.yml @@ -0,0 +1,92 @@ +.catalog: + name: "Minecraft" + version: "v1.8" + description: "Minecraft server" + uuid: minecraft-0 + questions: + - variable: "EULA" + label: "Accept EULA" + description: "Select TRUE to accept the Minecraft EULA" + required: true + type: "enum" + options: + - TRUE + - variable: "SCALE" + label: "Scale" + description: "How many servers to run" + default: 1 + required: true + type: "int" + - variable: "PORT" + label: "Port number" + description: "On which port should the Load Balancer listen?" + default: 25565 + required: true + type: "int" + - variable: "VERSION" + label: "Minecraft Version" + description: "Select the version of Minecraft server to run. Default is the latest available" + required: false + type: "enum" + default: LATEST + options: + - LATEST + - SNAPSHOT + - 1.8.9 + - 1.7.10 + - 1.6.4 + - variable: "DIFFICULTY" + label: "Difficulty level" + description: "Select the Minecraft difficulty level. Default is normal" + default: normal + required: true + type: "enum" + options: + - peaceful + - easy + - normal + - hard + - variable: "MODE" + label: "Default game mode" + description: "Select the game mode to connect in. Default is survival" + default: survival + required: true + type: "enum" + options: + - survival + - creative + - adventure + - spectator + - variable: "PVP" + label: "PvP mode" + description: "Check here to enable PvP mode. Default is no PvP." + default: false + type: "boolean" + required: true + - variable: "MOTD" + label: "Description" + description: "Description string for Minecraft server" + default: "A Minecraft server powered by Docker" + type: "string" + required: true + - variable: "WHITELIST" + label: "Whitelist" + description: "Player names to whitelist, comma separated" + type: "string" + - variable: "OPS" + label: "Operators" + description: "Player names to give operator privileges, comma separated" + type: "string" + - variable: "SEED" + label: "Level seed" + description: "Optional level seed number for world generation" + type: "int" + - variable: "WORLD" + label: "World URL" + description: "URL to download zipped world directory" + type: "string" +Minecraft: + scale: ${SCALE} +MinecraftLB: + load_balancer_config: {} + diff --git a/templates/minecraft/README.md b/templates/minecraft/README.md new file mode 100644 index 0000000..6f5352c --- /dev/null +++ b/templates/minecraft/README.md @@ -0,0 +1,19 @@ +# Minecraft + +### Topology + +This will start up several Minecraft servers of the specified type. If no +world seed is specified, then a random one will be used. A Load Balancer +will be created over the top so that they can be accessed. + +The servers use ephemeral disk and so will not be persistent. You can also +specify a URL from which to download an ZIP archive of a world save, which +will be used in all containers. + +### Options + +You **must** accept the [EULA](https://account.mojang.com/documents/minecraft_eula) by selecting **TRUE** in the dropdown. + +You should specify a unique port number for the load balancers to listen on. + +The other options for the server may be left as their defaults. diff --git a/templates/minecraft/catalogIcon-minecraft.svg b/templates/minecraft/catalogIcon-minecraft.svg new file mode 100644 index 0000000..68f0e53 --- /dev/null +++ b/templates/minecraft/catalogIcon-minecraft.svg @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/minecraft/config.yml b/templates/minecraft/config.yml new file mode 100644 index 0000000..f106ac5 --- /dev/null +++ b/templates/minecraft/config.yml @@ -0,0 +1,6 @@ +name: Minecraft +description: | + Multiplayer block game for wasting lots of time +version: v1.8 +category: entertainment +maintainer: Steve Shipway