From 930e00a71495b30c235bb5f55cf81b818978a9a4 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Tue, 10 Sep 2019 10:35:14 -0400 Subject: [PATCH] Initial test of MariaDB template --- templates/MariaDB/0/README.md | 7 +++ templates/MariaDB/0/docker-compose.yml | 26 +++++++++++ templates/MariaDB/0/rancher-compose.yml | 58 +++++++++++++++++++++++++ templates/MariaDB/config.yml | 8 ++++ 4 files changed, 99 insertions(+) create mode 100644 templates/MariaDB/0/README.md create mode 100644 templates/MariaDB/0/docker-compose.yml create mode 100644 templates/MariaDB/0/rancher-compose.yml create mode 100644 templates/MariaDB/config.yml diff --git a/templates/MariaDB/0/README.md b/templates/MariaDB/0/README.md new file mode 100644 index 0000000..d55d992 --- /dev/null +++ b/templates/MariaDB/0/README.md @@ -0,0 +1,7 @@ +# Redis + +Redis is an open-source in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, hyperloglogs, bitmaps, streams and spatial indexes. The project is mainly developed by Salvatore Sanfilippo and is currently sponsored by Redis Labs. + +### Will continue this in the future + +https://store.docker.com/_/redis \ No newline at end of file diff --git a/templates/MariaDB/0/docker-compose.yml b/templates/MariaDB/0/docker-compose.yml new file mode 100644 index 0000000..0d5db29 --- /dev/null +++ b/templates/MariaDB/0/docker-compose.yml @@ -0,0 +1,26 @@ +version: '2' + +services: + mariadb: + image: mariadb:latest + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + - 2606:4700:4700::1111 + - 2606:4700:4700::1001 + environment: + MYSQL_DATABASE: ${DB} + MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASS} + MYSQL_USER: ${DB_USER} + MYSQL_PASSWORD: ${DB_USER_PASS} + labels: + io.rancher.container.pull_image: always + {{- if .Values.HOST_LABEL}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} + traefik.enable: false + restart: on-failure + volumes: + - /etc/localtime:/etc/localtime:ro # Syncronize time of container with the host system + - /etc/timezone:/etc/timezone:ro # Syncronize timezone of container with the host system + - /Persistent/${DATA_DIR}/Database:/var/lib/mysql \ No newline at end of file diff --git a/templates/MariaDB/0/rancher-compose.yml b/templates/MariaDB/0/rancher-compose.yml new file mode 100644 index 0000000..a67c2c6 --- /dev/null +++ b/templates/MariaDB/0/rancher-compose.yml @@ -0,0 +1,58 @@ +version: '2' +catalog: + name: MariaDB + version: latest + # description: + # minimum_rancher_version: + # maximum_rancher_version: + # upgrade_from: + # uuid: + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Label Key/Value pair of the host which containers should be deployed + default: "host.id=Host1" + required: false + type: string + + - variable: "DB" + label: "Database Name" + description: | + The name of the database. + # default: + required: true + type: string + + - variable: "DB_ROOT_PASS" + label: "Database Root Password" + description: | + A secure password to be used by the "root" database user. + # default: + required: true + type: password + + - variable: "DB_USER" + label: "Database User" + description: | + The name of the database user. + # default: + required: true + type: string + + - variable: "DB_USER_PASS" + label: "Database User Password" + description: | + A secure password to be used by the database user. + # default: + required: true + type: password + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/MariaDB" + required: true + type: string \ No newline at end of file diff --git a/templates/MariaDB/config.yml b/templates/MariaDB/config.yml new file mode 100644 index 0000000..8b4d16a --- /dev/null +++ b/templates/MariaDB/config.yml @@ -0,0 +1,8 @@ +name: MariaDB +description: | + A community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL. +version: latest +# category: +maintainer: WilliamMiceli +# license: +# projectURL: \ No newline at end of file