From e746d51f324a759b340a16a195c49c7f02e0254c Mon Sep 17 00:00:00 2001 From: Hayahito Kawamitsu Date: Sun, 2 Jul 2017 00:34:45 +0900 Subject: [PATCH 1/2] add registry feature in GitLab catalog --- templates/gitlab/0/docker-compose.yml | 51 +++++++++++++------------- templates/gitlab/0/rancher-compose.yml | 32 ++++++++++------ 2 files changed, 46 insertions(+), 37 deletions(-) diff --git a/templates/gitlab/0/docker-compose.yml b/templates/gitlab/0/docker-compose.yml index 25e7e81..2c9813f 100644 --- a/templates/gitlab/0/docker-compose.yml +++ b/templates/gitlab/0/docker-compose.yml @@ -1,27 +1,26 @@ -gitlab-server: - ports: - - ${ssh_port}:22/tcp - - ${http_port}:80/tcp - - ${https_port}:443/tcp - labels: - io.rancher.sidekicks: gitlab-data - hostname: ${gitlab_hostname} - image: gitlab/gitlab-ce:latest - volumes_from: - - gitlab-data - environment: - GITLAB_OMNIBUS_CONFIG: | - external_url '${gitlab_omnipus_prefix}${gitlab_hostname}' - -gitlab-data: - labels: - io.rancher.container.start_once: 'true' - entrypoint: - - /bin/true - hostname: gitdata - image: gitlab/gitlab-ce:latest - volumes: - - /etc/gitlab - - /var/log/gitlab - - /var/opt/gitlab +version: '2' +volumes: + gitlab-app-data: + driver: ${volumedriver} + gitlab-log-data: + driver: ${volumedriver} + gitlab-conf-files: + driver: ${volumedriver} +services: + gitlab-server: + ports: + - ${ssh_port}:22/tcp + - ${http_port}:80/tcp + - ${https_port}:443/tcp + labels: + io.rancher.container.hostname_override: container_name + image: gitlab/gitlab-ce:latest + volumes: + - gitlab-app-data:/var/opt/gitlab + - gitlab-log-data:/var/log/gitlab + - gitlab-conf-files:/etc/gitlab + environment: + GITLAB_OMNIBUS_CONFIG: | + external_url '${gitlab_omnipus_prefix}${gitlab_hostname}' + registry_external_url '${gitlab_omnipus_prefix}${registry_gitlab_hostname}' diff --git a/templates/gitlab/0/rancher-compose.yml b/templates/gitlab/0/rancher-compose.yml index 9147ff9..5ebba3f 100644 --- a/templates/gitlab/0/rancher-compose.yml +++ b/templates/gitlab/0/rancher-compose.yml @@ -13,34 +13,49 @@ required: true default: "git.example.com" type: "string" + - variable: "registry_gitlab_hostname" + description: "Registry Gitlab hostname (without uri scheme http:// or https://)" + label: "Registry hostname:" + required: true + default: "registry.example.com" + type: "string" - variable: "gitlab_omnipus_prefix" label: "Gitlab external_url prefix:" description: | This is needed for the docker-compose file to set the correct external_url - default: 'https://' + default: 'http://' required: true - type: "string" + type: "enum" options: - - 'https://' - 'http://' + - 'https://' - variable: "http_port" description: "HTTP port to expose on host. Will be used to bind TCP" label: "HTTP port:" required: true default: 80 - type: "string" + type: "int" - variable: "https_port" description: "HTTPS port to expose on host. Will be used to bind TCP" label: "HTTPS port:" required: true default: 443 - type: "string" + type: "int" - variable: "ssh_port" description: "SSH port to expose on host. Will be used to bind TCP" label: "SSH port:" required: true default: 22 - type: "string" + type: "int" + - variable: "volumedriver" + description: "Choose the Volume Driver being used.(Option: local or rancher-nfs)" + label: "Volume Driver:" + required: true + default: local + type: "enum" + options: + - local + - rancher-nfs gitlab-server: scale: 1 @@ -52,8 +67,3 @@ gitlab-server: strategy: recreate response_timeout: 2000 healthy_threshold: 2 - -gitlab-data: - scale: 1 - retain_ip: true - From 13a58e50f40f0986a914aadc620d7eb62d5b1215 Mon Sep 17 00:00:00 2001 From: Hayahito Kawamitsu Date: Mon, 3 Jul 2017 21:31:49 +0900 Subject: [PATCH 2/2] specified a concrete version --- templates/gitlab/0/docker-compose.yml | 2 +- templates/gitlab/0/rancher-compose.yml | 2 +- templates/gitlab/config.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/gitlab/0/docker-compose.yml b/templates/gitlab/0/docker-compose.yml index 2c9813f..9422535 100644 --- a/templates/gitlab/0/docker-compose.yml +++ b/templates/gitlab/0/docker-compose.yml @@ -15,7 +15,7 @@ services: - ${https_port}:443/tcp labels: io.rancher.container.hostname_override: container_name - image: gitlab/gitlab-ce:latest + image: gitlab/gitlab-ce:9.3.3-ce.0 volumes: - gitlab-app-data:/var/opt/gitlab - gitlab-log-data:/var/log/gitlab diff --git a/templates/gitlab/0/rancher-compose.yml b/templates/gitlab/0/rancher-compose.yml index 5ebba3f..b382043 100644 --- a/templates/gitlab/0/rancher-compose.yml +++ b/templates/gitlab/0/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: Gitlab Community - version: latest + version: 9.3.3-ce.0 description: | Gitlab CE is a free GitHub alternative minimum_rancher_version: v0.56.0 diff --git a/templates/gitlab/config.yml b/templates/gitlab/config.yml index 66e2221..a4ad423 100644 --- a/templates/gitlab/config.yml +++ b/templates/gitlab/config.yml @@ -1,5 +1,5 @@ name: Gitlab Community description: | Gitlab CE is a free GitHub alternative -version: latest +version: 9.3.3-ce.0 category: Versioning