From 3dd0963a97f86433ea03e765d6bce92fda20f8cc Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 7 Dec 2018 14:43:07 -0500 Subject: [PATCH 1/4] Will continue in the future --- templates/Redis/0/README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 templates/Redis/0/README.md diff --git a/templates/Redis/0/README.md b/templates/Redis/0/README.md new file mode 100644 index 0000000..5ae3faf --- /dev/null +++ b/templates/Redis/0/README.md @@ -0,0 +1,5 @@ +# Redis + +### Will continue this in the future + +https://store.docker.com/_/redis \ No newline at end of file From ba59edd16825bed426e6ab047be9039ff29f74f5 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 8 Feb 2019 22:38:22 -0500 Subject: [PATCH 2/4] First trial configuration --- templates/Redis/0/docker-compose.yml | 27 +++++++++++++++ templates/Redis/0/rancher-compose.yml | 47 +++++++++++++++++++++++++++ templates/Redis/config.yml | 8 +++++ 3 files changed, 82 insertions(+) create mode 100644 templates/Redis/0/docker-compose.yml create mode 100644 templates/Redis/0/rancher-compose.yml create mode 100644 templates/Redis/config.yml diff --git a/templates/Redis/0/docker-compose.yml b/templates/Redis/0/docker-compose.yml new file mode 100644 index 0000000..f3a3bdc --- /dev/null +++ b/templates/Redis/0/docker-compose.yml @@ -0,0 +1,27 @@ +version: '2' + +services: + phpmyadmin: + image: redis:${IMAGE_TAG} + dns: # Using Cloudflare DNS + - 1.1.1.1 + - 1.0.0.1 + environment: + 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 + stdin_open: true + tty: true + 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 + {{- if .Values.DATA_DIR}} + {{- if eq .Values.CUSTOM_CONF "true"}} + - /RancherCattle/${DATA_DIR}/Redis/Configuration/redis.conf:/usr/local/etc/redis/redis.conf + {{- end}} + - /RancherCattle/${DATA_DIR}/Redis/Data:/data + {{- end}} \ No newline at end of file diff --git a/templates/Redis/0/rancher-compose.yml b/templates/Redis/0/rancher-compose.yml new file mode 100644 index 0000000..144fbda --- /dev/null +++ b/templates/Redis/0/rancher-compose.yml @@ -0,0 +1,47 @@ +version: '2' +catalog: + name: Redis + version: latest + # description: + # minimum_rancher_version: + # maximum_rancher_version: + # upgrade_from: + # uuid: + questions: + + - variable: "HOST_LABEL" + label: "Host Label Key/Value Pair" + description: | + The Key/Value pair on the host which the stack should be deployed. + default: "host.id=Host1" + required: false + type: string + + - variable: "IMAGE_TAG" + label: "Image Tag" + description: | + The image tag to use for the desired container variant. + default: "latest" + required: true + type: enum + options: + - "latest" + - "alpine" + - "32bit" + - "stretch" + + - variable: "CUSTOM_CONF" + label: "Custom Configuration" + description: | + Whether a custom configuration file should be mounted from the persistent data directory or not. + default: false + required: true + type: boolean + + - variable: "DATA_DIR" + label: "Data Directory" + description: | + The directory to store persistent data for the stack. + default: "Personal/Redis" + required: true + type: string diff --git a/templates/Redis/config.yml b/templates/Redis/config.yml new file mode 100644 index 0000000..1cba709 --- /dev/null +++ b/templates/Redis/config.yml @@ -0,0 +1,8 @@ +name: Redis +description: | + Redis is an open-source, networked, in-memory, key-value data store with optional durability. +version: latest +# category: +maintainer: WilliamMiceli +# license: +# projectURL: \ No newline at end of file From 599073a217e9958e393949f056e126042b336c9f Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 8 Feb 2019 22:46:33 -0500 Subject: [PATCH 3/4] Better descriptions, disabled DATA_DIR being required --- templates/Redis/0/rancher-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/Redis/0/rancher-compose.yml b/templates/Redis/0/rancher-compose.yml index 144fbda..93fc709 100644 --- a/templates/Redis/0/rancher-compose.yml +++ b/templates/Redis/0/rancher-compose.yml @@ -33,7 +33,7 @@ catalog: - variable: "CUSTOM_CONF" label: "Custom Configuration" description: | - Whether a custom configuration file should be mounted from the persistent data directory or not. + Whether a custom configuration file should be mounted from the persistent data directory or not. Data Directory is required for this. default: false required: true type: boolean @@ -42,6 +42,7 @@ catalog: label: "Data Directory" description: | The directory to store persistent data for the stack. + Leaving this blank will disable persistent data storage for the stack. default: "Personal/Redis" - required: true + required: false type: string From 4648643cabc575dce6560475c1aeef4e9d6e9271 Mon Sep 17 00:00:00 2001 From: WilliamMiceli Date: Fri, 8 Feb 2019 22:48:13 -0500 Subject: [PATCH 4/4] Removed empty environment section --- templates/Redis/0/docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/Redis/0/docker-compose.yml b/templates/Redis/0/docker-compose.yml index f3a3bdc..74b788b 100644 --- a/templates/Redis/0/docker-compose.yml +++ b/templates/Redis/0/docker-compose.yml @@ -1,12 +1,11 @@ version: '2' services: - phpmyadmin: + redis: image: redis:${IMAGE_TAG} dns: # Using Cloudflare DNS - 1.1.1.1 - 1.0.0.1 - environment: labels: io.rancher.container.pull_image: always {{- if .Values.HOST_LABEL}}