From 9075744973eff0be1f15576840d02ce98f48fc24 Mon Sep 17 00:00:00 2001 From: WilliamMiceli <9000802+WilliamMiceli@users.noreply.github.com> Date: Wed, 8 Aug 2018 03:05:08 -0400 Subject: [PATCH] Various updates and fixes --- .../EclipseChe-Single/0/docker-compose.yml | 29 ++++++++++++++----- .../EclipseChe-Single/0/rancher-compose.yml | 28 ++++-------------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/templates/EclipseChe-Single/0/docker-compose.yml b/templates/EclipseChe-Single/0/docker-compose.yml index a6bb76f..cdbce5b 100644 --- a/templates/EclipseChe-Single/0/docker-compose.yml +++ b/templates/EclipseChe-Single/0/docker-compose.yml @@ -6,17 +6,32 @@ services: - 1.1.1.1 - 1.0.0.1 environment: - - CHE_HOST=${HOST_IP} - - CHE_PORT=${CHE_PORT} + CHE_HOST: ${HOST_IP} + CHE_PORT: ${CHE_PORT} + CHE_IN_VM: true labels: io.rancher.container.pull_image: always - io.rancher.scheduler.affinity:host_label: ${LABEL_KEY_VALUE} - io.rancher.container.hostname_override: eclipse-che + {{- if (.Values.HOST_LABEL)}} + io.rancher.scheduler.affinity:host_label: ${HOST_LABEL} + {{- end}} ports: - "${CHE_PORT}:8080" - privileged: true restart: on-failure volumes: - /var/run/docker.sock:/var/run/docker.sock - - ${STORAGE_BASE_DIR}${DATA_DIR}:/data - - ${STORAGE_BASE_DIR}${REPO_DIR}:/repo \ No newline at end of file + - Data:/data + - Repo:/repo + +volumes: + Data: + driver: rancher-nfs + driver_opts: + host: 10.0.10.21 + export: /RancherCattleData/${DATA_DIR}/Data + onRemove: retain + Repo: + driver: rancher-nfs + driver_opts: + host: 10.0.10.21 + export: /RancherCattleData/${DATA_DIR}/Repo + onRemove: retain \ No newline at end of file diff --git a/templates/EclipseChe-Single/0/rancher-compose.yml b/templates/EclipseChe-Single/0/rancher-compose.yml index b7909cb..865c6aa 100644 --- a/templates/EclipseChe-Single/0/rancher-compose.yml +++ b/templates/EclipseChe-Single/0/rancher-compose.yml @@ -8,12 +8,12 @@ catalog: # upgrade_from: questions: - - variable: "LABEL_KEY_VALUE" + - variable: HOST_LABEL label: "Host Label Key/Value Pair" description: | - The Label Key/Value pair on the host which Eclipse Che should be deployed + The Label Key/Value pair on the host which containers should be deployed default: "host.id=0000" - required: true + required: false type: string - variable: "HOST_IP" @@ -32,26 +32,10 @@ catalog: required: true type: string - - variable: "STORAGE_BASE_DIR" - label: "Base Storage Directory" - description: | - The base path of where persistent storage should be kept at. - default: "/RancherStorage/EclipseChe-SingleUser" - required: true - type: string - - - variable: "DATA_DIR" + - variable: DATA_DIR label: "Data Directory" description: | - The directory Eclipse Che should use for it's persistent data storage - default: "/Data" - required: true - type: string - - - variable: "REPO_DIR" - label: "Persistent Storage Volume" - description: | - The directory Eclipse Che should use for it's persistent repo storage - default: "/Repo" + The directory to store persistent data + default: "Personal/EclipseChe-Single" required: true type: string \ No newline at end of file