From 635e93987b36df087daadcc89df59fc1c654b064 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sat, 21 Apr 2018 19:02:00 +0200 Subject: [PATCH 01/10] Upgrade GitLab CE to 10.7.0 --- Changelog.md | 3 ++ Dockerfile | 2 +- README.md | 56 +++++++++++++++++++------------------- VERSION | 2 +- docker-compose.yml | 2 +- docs/container_registry.md | 10 +++---- kubernetes/gitlab-rc.yml | 2 +- 7 files changed, 40 insertions(+), 37 deletions(-) diff --git a/Changelog.md b/Changelog.md index fcb93860..6af36756 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,6 +3,9 @@ This file only reflects the changes that are made in this image. Please refer to the upstream GitLab [CHANGELOG]( https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) for the list of changes in GitLab. +**10.7.0** +- gitlab: upgrade CE to v10.7.0 + **10.6.4** - gitlab: upgrade CE to v10.6.4 diff --git a/Dockerfile b/Dockerfile index 619d7753..a4f39b96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM sameersbn/ubuntu:16.04.20180124 LABEL maintainer="sameer@damagehead.com" -ENV GITLAB_VERSION=10.6.4 \ +ENV GITLAB_VERSION=10.7.0 \ RUBY_VERSION=2.3 \ GOLANG_VERSION=1.9.5 \ GITLAB_SHELL_VERSION=6.0.4 \ diff --git a/README.md b/README.md index 959404b7..cbdad52f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/gitlab/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/gitlab) [![](https://images.microbadger.com/badges/image/sameersbn/gitlab.svg)](http://microbadger.com/images/sameersbn/gitlab "Get your own image badge on microbadger.com") -# sameersbn/gitlab:10.6.4 +# sameersbn/gitlab:10.7.0 - [Introduction](#introduction) - [Changelog](Changelog.md) @@ -126,7 +126,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/gitlab) ```bash -docker pull sameersbn/gitlab:10.6.4 +docker pull sameersbn/gitlab:10.7.0 ``` You can also pull the `latest` tag which is built from the repository *HEAD* @@ -195,7 +195,7 @@ docker run --name gitlab -d \ --env 'GITLAB_SECRETS_SECRET_KEY_BASE=long-and-random-alpha-numeric-string' \ --env 'GITLAB_SECRETS_OTP_KEY_BASE=long-and-random-alpha-numeric-string' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` *Please refer to [Available Configuration Parameters](#available-configuration-parameters) to understand `GITLAB_PORT` and other configuration options* @@ -230,7 +230,7 @@ Volumes can be mounted in docker by specifying the `-v` option in the docker run ```bash docker run --name gitlab -d \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` ## Database @@ -263,7 +263,7 @@ docker run --name gitlab -d \ --env 'DB_NAME=gitlabhq_production' \ --env 'DB_USER=gitlab' --env 'DB_PASS=password' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` #### Linking to PostgreSQL Container @@ -307,7 +307,7 @@ We are now ready to start the GitLab application. ```bash docker run --name gitlab -d --link gitlab-postgresql:postgresql \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` Here the image will also automatically fetch the `DB_NAME`, `DB_USER` and `DB_PASS` variables from the postgresql container as they are specified in the `docker run` command for the postgresql container. This is made possible using the magic of docker links and works with the following images: @@ -361,7 +361,7 @@ docker run --name gitlab -d \ --env 'DB_NAME=gitlabhq_production' \ --env 'DB_USER=gitlab' --env 'DB_PASS=password' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` #### Linking to MySQL Container @@ -404,7 +404,7 @@ We are now ready to start the GitLab application. ```bash docker run --name gitlab -d --link gitlab-mysql:mysql \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` Here the image will also automatically fetch the `DB_NAME`, `DB_USER` and `DB_PASS` variables from the mysql container as they are specified in the `docker run` command for the mysql container. This is made possible using the magic of docker links and works with the following images: @@ -431,7 +431,7 @@ The image can be configured to use an external redis server. The configuration s ```bash docker run --name gitlab -it --rm \ --env 'REDIS_HOST=192.168.1.100' --env 'REDIS_PORT=6379' \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` ### Linking to Redis Container @@ -458,7 +458,7 @@ We are now ready to start the GitLab application. ```bash docker run --name gitlab -d --link gitlab-redis:redisio \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` ### Mail @@ -471,7 +471,7 @@ If you are using Gmail then all you need to do is: docker run --name gitlab -d \ --env 'SMTP_USER=USER@gmail.com' --env 'SMTP_PASS=PASSWORD' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` Please refer the [Available Configuration Parameters](#available-configuration-parameters) section for the list of SMTP parameters that can be specified. @@ -491,7 +491,7 @@ docker run --name gitlab -d \ --env 'IMAP_USER=USER@gmail.com' --env 'IMAP_PASS=PASSWORD' \ --env 'GITLAB_INCOMING_EMAIL_ADDRESS=USER+%{key}@gmail.com' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` Please refer the [Available Configuration Parameters](#available-configuration-parameters) section for the list of IMAP parameters that can be specified. @@ -568,7 +568,7 @@ docker run --name gitlab -d \ --env 'GITLAB_SSH_PORT=10022' --env 'GITLAB_PORT=10443' \ --env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` In this configuration, any requests made over the plain http protocol will automatically be redirected to use the https protocol. However, this is not optimal when using a load balancer. @@ -584,7 +584,7 @@ docker run --name gitlab -d \ --env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \ --env 'NGINX_HSTS_MAXAGE=2592000' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` If you want to completely disable HSTS set `NGINX_HSTS_ENABLED` to `false`. @@ -607,7 +607,7 @@ docker run --name gitlab -d \ --env 'GITLAB_SSH_PORT=10022' --env 'GITLAB_PORT=443' \ --env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` Again, drop the `--env 'SSL_SELF_SIGNED=true'` option if you are using CA certified SSL certificates. @@ -655,7 +655,7 @@ Let's assume we want to deploy our application to '/git'. GitLab needs to know t docker run --name gitlab -it --rm \ --env 'GITLAB_RELATIVE_URL_ROOT=/git' \ --volume /srv/docker/gitlab/gitlab:/home/git/data \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` GitLab will now be accessible at the `/git` path, e.g. `http://www.example.com/git`. @@ -783,14 +783,14 @@ Also the container processes seem to be executed as the host's user/group `1000` ```bash docker run --name gitlab -it --rm [options] \ --env "USERMAP_UID=$(id -u git)" --env "USERMAP_GID=$(id -g git)" \ - sameersbn/gitlab:10.6.4 + sameersbn/gitlab:10.7.0 ``` When changing this mapping, all files and directories in the mounted data volume `/home/git/data` have to be re-owned by the new ids. This can be achieved automatically using the following command: ```bash docker run --name gitlab -d [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:sanitize + sameersbn/gitlab:10.7.0 app:sanitize ``` ### Piwik @@ -1060,7 +1060,7 @@ Execute the rake task to create a backup. ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:backup:create + sameersbn/gitlab:10.7.0 app:rake gitlab:backup:create ``` A backup will be created in the backups folder of the [Data Store](#data-store). You can change the location of the backups using the `GITLAB_BACKUP_DIR` configuration parameter. @@ -1088,14 +1088,14 @@ you need to prepare the database: ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake db:setup + sameersbn/gitlab:10.7.0 app:rake db:setup ``` Execute the rake task to restore a backup. Make sure you run the container in interactive mode `-it`. ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:backup:restore + sameersbn/gitlab:10.7.0 app:rake gitlab:backup:restore ``` The list of all available backups will be displayed in reverse chronological order. Select the backup you want to restore and continue. @@ -1104,7 +1104,7 @@ To avoid user interaction in the restore operation, specify the timestamp of the ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:backup:restore BACKUP=1417624827 + sameersbn/gitlab:10.7.0 app:rake gitlab:backup:restore BACKUP=1417624827 ``` When using `docker-compose` you may use the following command to execute the restore. @@ -1153,7 +1153,7 @@ The `app:rake` command allows you to run gitlab rake tasks. To run a rake task s ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:env:info + sameersbn/gitlab:10.7.0 app:rake gitlab:env:info ``` You can also use `docker exec` to run raketasks on running gitlab instance. For example, @@ -1166,7 +1166,7 @@ Similarly, to import bare repositories into GitLab project instance ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:import:repos + sameersbn/gitlab:10.7.0 app:rake gitlab:import:repos ``` Or @@ -1197,7 +1197,7 @@ Copy all the **bare** git repositories to the `repositories/` directory of the [ ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:import:repos + sameersbn/gitlab:10.7.0 app:rake gitlab:import:repos ``` Watch the logs and your repositories should be available into your new gitlab container. @@ -1219,12 +1219,12 @@ To upgrade to newer gitlab releases, simply follow this 4 step upgrade procedure > **Note** > -> Upgrading to `sameersbn/gitlab:10.6.4` from `sameersbn/gitlab:7.x.x` can cause issues. It is therefore required that you first upgrade to `sameersbn/gitlab:8.0.5-1` before upgrading to `sameersbn/gitlab:8.1.0` or higher. +> Upgrading to `sameersbn/gitlab:10.7.0` from `sameersbn/gitlab:7.x.x` can cause issues. It is therefore required that you first upgrade to `sameersbn/gitlab:8.0.5-1` before upgrading to `sameersbn/gitlab:8.1.0` or higher. - **Step 1**: Update the docker image. ```bash -docker pull sameersbn/gitlab:10.6.4 +docker pull sameersbn/gitlab:10.7.0 ``` - **Step 2**: Stop and remove the currently running image @@ -1250,7 +1250,7 @@ Replace `x.x.x` with the version you are upgrading from. For example, if you are > **Note**: Since GitLab `8.11.0` you need to provide the `GITLAB_SECRETS_SECRET_KEY_BASE` and `GITLAB_SECRETS_OTP_KEY_BASE` parameters while starting the image. These should initially both have the same value as the contents of the `/home/git/data/.secret` file. See [Available Configuration Parameters](#available-configuration-parameters) for more information on these parameters. ```bash -docker run --name gitlab -d [OPTIONS] sameersbn/gitlab:10.6.4 +docker run --name gitlab -d [OPTIONS] sameersbn/gitlab:10.7.0 ``` ## Shell Access diff --git a/VERSION b/VERSION index 827886a6..1bcdaf5f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.6.4 +10.7.0 diff --git a/docker-compose.yml b/docker-compose.yml index d02ed090..fb693868 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: gitlab: restart: always - image: sameersbn/gitlab:10.6.4 + image: sameersbn/gitlab:10.7.0 depends_on: - redis - postgresql diff --git a/docs/container_registry.md b/docs/container_registry.md index ecb28735..816bfe06 100644 --- a/docs/container_registry.md +++ b/docs/container_registry.md @@ -284,7 +284,7 @@ docker stop registry gitlab && docker rm registry gitlab Execute the rake task with a removeable container. ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:backup:create + sameersbn/gitlab:10.7.0 app:rake gitlab:backup:create ``` ## Restoring Backups @@ -300,7 +300,7 @@ Execute the rake task to restore a backup. Make sure you run the container in in ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:backup:restore + sameersbn/gitlab:10.7.0 app:rake gitlab:backup:restore ``` The list of all available backups will be displayed in reverse chronological order. Select the backup you want to restore and continue. @@ -309,7 +309,7 @@ To avoid user interaction in the restore operation, specify the timestamp of the ```bash docker run --name gitlab -it --rm [OPTIONS] \ - sameersbn/gitlab:10.6.4 app:rake gitlab:backup:restore BACKUP=1417624827 + sameersbn/gitlab:10.7.0 app:rake gitlab:backup:restore BACKUP=1417624827 ``` # Upgrading from an existing GitLab installation @@ -320,7 +320,7 @@ If you want enable this feature for an existing instance of GitLab you need to d - **Step 1**: Update the docker image. ```bash -docker pull sameersbn/gitlab:10.6.4 +docker pull sameersbn/gitlab:10.7.0 ``` - **Step 2**: Stop and remove the currently running image @@ -373,7 +373,7 @@ docker run --name gitlab -d [PREVIOUS_OPTIONS] \ --env 'GITLAB_REGISTRY_CERT_PATH=/certs/registry-auth.crt' \ --env 'GITLAB_REGISTRY_KEY_PATH=/certs/registry-auth.key' \ --link registry:registry -sameersbn/gitlab:10.6.4 +sameersbn/gitlab:10.7.0 ``` diff --git a/kubernetes/gitlab-rc.yml b/kubernetes/gitlab-rc.yml index eb8f3cf1..ab6d38c7 100644 --- a/kubernetes/gitlab-rc.yml +++ b/kubernetes/gitlab-rc.yml @@ -14,7 +14,7 @@ spec: spec: containers: - name: gitlab - image: sameersbn/gitlab:10.6.4 + image: sameersbn/gitlab:10.7.0 env: - name: TZ value: Asia/Kolkata From 614e2134e771ffeddd7c244e52039219aadfc3da Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sat, 21 Apr 2018 19:04:44 +0200 Subject: [PATCH 02/10] Update gitlab-shell to 7.1.2 Signed-off-by: solidnerd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a4f39b96..0f53b735 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ LABEL maintainer="sameer@damagehead.com" ENV GITLAB_VERSION=10.7.0 \ RUBY_VERSION=2.3 \ GOLANG_VERSION=1.9.5 \ - GITLAB_SHELL_VERSION=6.0.4 \ GITLAB_WORKHORSE_VERSION=4.0.0 \ GITLAB_PAGES_VERSION=0.7.1 \ GITALY_SERVER_VERSION=0.91.0 \ + GITLAB_SHELL_VERSION=7.1.2 \ GITLAB_USER="git" \ GITLAB_HOME="/home/git" \ GITLAB_LOG_DIR="/var/log/gitlab" \ From e2101e3e750f47d49959ad414c7053161ddb8177 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sat, 21 Apr 2018 19:05:03 +0200 Subject: [PATCH 03/10] Update gitlab-workhorse to 4.1.0 Signed-off-by: solidnerd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0f53b735..15952e9f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ LABEL maintainer="sameer@damagehead.com" ENV GITLAB_VERSION=10.7.0 \ RUBY_VERSION=2.3 \ GOLANG_VERSION=1.9.5 \ - GITLAB_WORKHORSE_VERSION=4.0.0 \ GITLAB_PAGES_VERSION=0.7.1 \ GITALY_SERVER_VERSION=0.91.0 \ GITLAB_SHELL_VERSION=7.1.2 \ + GITLAB_WORKHORSE_VERSION=4.1.0 \ GITLAB_USER="git" \ GITLAB_HOME="/home/git" \ GITLAB_LOG_DIR="/var/log/gitlab" \ From bf3a9ca68c279fd797c55d3fc09bf4a2bbbebd10 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sat, 21 Apr 2018 19:05:30 +0200 Subject: [PATCH 04/10] update gitlab-pages to 0.8.0 Signed-off-by: solidnerd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 15952e9f..787321b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ LABEL maintainer="sameer@damagehead.com" ENV GITLAB_VERSION=10.7.0 \ RUBY_VERSION=2.3 \ GOLANG_VERSION=1.9.5 \ - GITLAB_PAGES_VERSION=0.7.1 \ GITALY_SERVER_VERSION=0.91.0 \ GITLAB_SHELL_VERSION=7.1.2 \ GITLAB_WORKHORSE_VERSION=4.1.0 \ + GITLAB_PAGES_VERSION=0.8.0 \ GITLAB_USER="git" \ GITLAB_HOME="/home/git" \ GITLAB_LOG_DIR="/var/log/gitlab" \ From 0575981febde99a9db2bfe7813102ca930ef9020 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sat, 21 Apr 2018 19:05:49 +0200 Subject: [PATCH 05/10] update gitaly to 0.95.0 Signed-off-by: solidnerd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 787321b0..b9393d7f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,10 @@ LABEL maintainer="sameer@damagehead.com" ENV GITLAB_VERSION=10.7.0 \ RUBY_VERSION=2.3 \ GOLANG_VERSION=1.9.5 \ - GITALY_SERVER_VERSION=0.91.0 \ GITLAB_SHELL_VERSION=7.1.2 \ GITLAB_WORKHORSE_VERSION=4.1.0 \ GITLAB_PAGES_VERSION=0.8.0 \ + GITALY_SERVER_VERSION=0.95.0 \ GITLAB_USER="git" \ GITLAB_HOME="/home/git" \ GITLAB_LOG_DIR="/var/log/gitlab" \ From 6111c2e375693acbe57728bb66d8a6ead23d6a66 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sun, 29 Apr 2018 09:25:02 +0200 Subject: [PATCH 06/10] Add GITLAB_SIDEKIQ_LOG_FORMAT Signed-off-by: solidnerd --- Changelog.md | 1 + README.md | 1 + assets/runtime/config/gitlabhq/gitlab.yml | 5 +++++ assets/runtime/env-defaults | 1 + assets/runtime/functions | 5 ++++- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index 6af36756..f9ad653a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,7 @@ https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) for the list o **10.7.0** - gitlab: upgrade CE to v10.7.0 +- ADD `GITLAB_SIDEKIQ_LOG_FORMAT` **10.6.4** - gitlab: upgrade CE to v10.6.4 diff --git a/README.md b/README.md index cbdad52f..e9afa4ae 100644 --- a/README.md +++ b/README.md @@ -914,6 +914,7 @@ Below is the complete list of available options that can be used to customize yo | `SIDEKIQ_CONCURRENCY` | The number of concurrent sidekiq jobs to run. Defaults to `25` | | `SIDEKIQ_SHUTDOWN_TIMEOUT` | Timeout for sidekiq shutdown. Defaults to `4` | | `SIDEKIQ_MEMORY_KILLER_MAX_RSS` | Non-zero value enables the SidekiqMemoryKiller. Defaults to `1000000`. For additional options refer [Configuring the MemoryKiller](http://doc.gitlab.com/ce/operations/sidekiq_memory_killer.html) | +| `GITLAB_SIDEKIQ_LOG_FORMAT` | Sidekiq log format that will be used. Defaults to `default` | | `DB_ADAPTER` | The database type. Possible values: `mysql2`, `postgresql`. Defaults to `postgresql`. | | `DB_ENCODING` | The database encoding. For `DB_ADAPTER` values `postresql` and `mysql2`, this parameter defaults to `unicode` and `utf8` respectively. | | `DB_COLLATION` | The database collation. Defaults to `utf8_general_ci` for `DB_ADAPTER` `mysql2`. This parameter is not supported for `DB_ADAPTER` `postresql` and will be removed. | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 02481124..23c2f28b 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -194,6 +194,11 @@ production: &base plain_url: "{{GITLAB_GRAVATAR_HTTP_URL}}" # default: https://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon ssl_url: "{{GITLAB_GRAVATAR_HTTPS_URL}}" # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon + + ## Sidekiq + sidekiq: + log_format: {{GITLAB_SIDEKIQ_LOG_FORMAT}} # (json is also supported) + ## Auxiliary jobs # Periodically executed jobs, to self-heal GitLab, do external synchronizations, etc. # Please read here for more information: https://github.com/ondrejbartas/sidekiq-cron#adding-cron-job diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index e2270d53..0abcfe85 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -57,6 +57,7 @@ REDIS_DB_NUMBER=${REDIS_DB_NUMBER:-0} SIDEKIQ_SHUTDOWN_TIMEOUT=${SIDEKIQ_SHUTDOWN_TIMEOUT:-4} SIDEKIQ_CONCURRENCY=${SIDEKIQ_CONCURRENCY:-25} SIDEKIQ_MEMORY_KILLER_MAX_RSS=${SIDEKIQ_MEMORY_KILLER_MAX_RSS:-1000000} +GITLAB_SIDEKIQ_LOG_FORMAT=${GITLAB_SIDEKIQ_LOG_FORMAT:-default} ## UNICORN UNICORN_WORKERS=${UNICORN_WORKERS:-3} diff --git a/assets/runtime/functions b/assets/runtime/functions index 6c6a1f2b..5255aba3 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -294,7 +294,6 @@ gitlab_configure_monitoring() { GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED \ GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS \ GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT - } gitlab_configure_gitlab_workhorse() { @@ -742,6 +741,10 @@ gitlab_configure_secrets() { gitlab_configure_sidekiq() { echo "Configuring gitlab::sidekiq..." + # configure gitlab sidekiq log format + update_template ${GITLAB_CONFIG} \ + GITLAB_SIDEKIQ_LOG_FORMAT + # configure sidekiq update_template /etc/supervisor/conf.d/sidekiq.conf \ SIDEKIQ_CONCURRENCY \ From fdc26d2dd54bb556f71c358cd3ab8c97a0582aff Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sun, 29 Apr 2018 10:46:50 +0200 Subject: [PATCH 07/10] Add GITLAB_ARTIFACTS_OBJECT_STORE_* Signed-off-by: solidnerd --- Changelog.md | 11 +++++++++++ README.md | 11 +++++++++++ assets/runtime/config/gitlabhq/gitlab.yml | 14 ++++++++++++++ assets/runtime/env-defaults | 13 +++++++++++++ assets/runtime/functions | 14 ++++++++++++++ 5 files changed, 63 insertions(+) diff --git a/Changelog.md b/Changelog.md index f9ad653a..68d0c0ba 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,17 @@ https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) for the list o **10.7.0** - gitlab: upgrade CE to v10.7.0 - ADD `GITLAB_SIDEKIQ_LOG_FORMAT` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` +- ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` **10.6.4** - gitlab: upgrade CE to v10.6.4 diff --git a/README.md b/README.md index e9afa4ae..7bac7593 100644 --- a/README.md +++ b/README.md @@ -846,6 +846,17 @@ Below is the complete list of available options that can be used to customize yo | `GITLAB_SHARED_DIR` | The directory to store the build artifacts. Defaults to `/home/git/data/shared` | | `GITLAB_ARTIFACTS_ENABLED` | Enable/Disable GitLab artifacts support. Defaults to `true`. | | `GITLAB_ARTIFACTS_DIR` | Directory to store the artifacts. Defaults to `$GITLAB_SHARED_DIR/artifacts` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED` | Enables Object Store for Artifacts that will be remote stored. Defaults to `false` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY` | Bucket name to store the artifacts. Defaults to `artifacts` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD` | Temporary option to limit automatic upload. Defaults to `false` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD` | Passthrough all downloads via GitLab instead of using Redirects to Object Storage. Defaults to `false` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER` | Connection Provider for the Object Store. Currently only AWS is supported. Defaults to `AWS` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID` | AWS Access Key ID for the Bucket. Defaults to `AWS_ACCESS_KEY_ID` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY` | AWS Secret Access Key. Defaults to `AWS_SECRET_ACCESS_KEY` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION` | AWS Region. Defaults to `us-east-1` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST` | Configure this for an compatible AWS host like minio. Defaults to `s3.amazonaws.com` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` | AWS Endpoint like `http://127.0.0.1:9000`. Defaults to `nil` | +| `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` | Changes AWS Path Style to 'host/bucket_name/object' instead of 'bucket_name.host/object'. Defaults to `true` | | `GITLAB_PIPELINE_SCHEDULE_WORKER_CRON` | Cron notation for the Gitlab pipeline schedule worker. Defaults to `'0 */12 * * *'` | | `GITLAB_LFS_ENABLED` | Enable/Disable Git LFS support. Defaults to `true`. | | `GITLAB_LFS_OBJECTS_DIR` | Directory to store the lfs-objects. Defaults to `$GITLAB_SHARED_DIR/lfs-objects` | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 23c2f28b..662de91c 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -148,6 +148,20 @@ production: &base enabled: {{GITLAB_ARTIFACTS_ENABLED}} # The location where build artifacts are stored (default: shared/artifacts). path: {{GITLAB_ARTIFACTS_DIR}} + object_store: + enabled: {{GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED}} + remote_directory: {{GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY}} # The bucket name + background_upload: {{GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD}} # Temporary option to limit automatic upload (Default: true) + proxy_download: {{GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD}} # Passthrough all downloads via GitLab instead of using Redirects to Object Storage + connection: + provider: {{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER}} # Only AWS supported at the moment + aws_access_key_id: {{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID}} + aws_secret_access_key: {{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY}} + region: {{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION}} + host: '{{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST}}' # default: s3.amazonaws.com + endpoint: '{{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT}}' # default: nil + path_style: {{GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE}} # Use 'host/bucket_name/object' instead of 'bucket_name.host/object' + ## Git LFS lfs: diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 0abcfe85..7ba0bf6f 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -91,6 +91,19 @@ GITLAB_WORKHORSE_TIMEOUT=${GITLAB_WORKHORSE_TIMEOUT:-5m0s} GITLAB_ARTIFACTS_ENABLED=${GITLAB_ARTIFACTS_ENABLED:-true} GITLAB_ARTIFACTS_DIR="${GITLAB_ARTIFACTS_DIR:-$GITLAB_SHARED_DIR/artifacts}" +GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED=${GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED:-false} +GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY=${GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY:-artifacts} +GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD=${GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD:-false} +GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD=${GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD:-false} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER:-AWS} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID:-AWS_ACCESS_KEY_ID} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY:-AWS_SECRET_ACCESS_KEY} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION:-us-east-1} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST:-s3.amazonaws.com} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT:-nil} +GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE=${GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE:-true} + + ## Cron Jobs GITLAB_PIPELINE_SCHEDULE_WORKER_CRON=${GITLAB_PIPELINE_SCHEDULE_WORKER_CRON:-"19 * * * *"} diff --git a/assets/runtime/functions b/assets/runtime/functions index 5255aba3..5c9c56cc 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -944,6 +944,20 @@ gitlab_configure_artifacts() { update_template ${GITLAB_CONFIG} \ GITLAB_ARTIFACTS_ENABLED \ GITLAB_ARTIFACTS_DIR + + echo "Configuring gitlab::artifacts:object_store" + update_template ${GITLAB_CONFIG} \ + GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED \ + GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY \ + GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD \ + GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE } gitlab_configure_lfs() { From 79eb0a7e9a00c41f15ba4cd0922b70e0d40e4910 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sun, 29 Apr 2018 10:47:35 +0200 Subject: [PATCH 08/10] Add GITLAB_LFS_OBJECT_STORE_* Signed-off-by: solidnerd --- Changelog.md | 12 ++++++++++++ README.md | 11 +++++++++++ assets/runtime/config/gitlabhq/gitlab.yml | 15 +++++++++++++++ assets/runtime/env-defaults | 13 +++++++++++++ assets/runtime/functions | 15 +++++++++++++++ 5 files changed, 66 insertions(+) diff --git a/Changelog.md b/Changelog.md index 68d0c0ba..574957be 100644 --- a/Changelog.md +++ b/Changelog.md @@ -18,6 +18,18 @@ https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) for the list o - ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` - ADD `GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` +- ADD `GITLAB_LFS_OBJECT_STORE_ENABLED` +- ADD `GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY` +- ADD `GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD` +- ADD `GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD` +- ADD `GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` +- ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` **10.6.4** - gitlab: upgrade CE to v10.6.4 diff --git a/README.md b/README.md index 7bac7593..e3a1722f 100644 --- a/README.md +++ b/README.md @@ -860,6 +860,17 @@ Below is the complete list of available options that can be used to customize yo | `GITLAB_PIPELINE_SCHEDULE_WORKER_CRON` | Cron notation for the Gitlab pipeline schedule worker. Defaults to `'0 */12 * * *'` | | `GITLAB_LFS_ENABLED` | Enable/Disable Git LFS support. Defaults to `true`. | | `GITLAB_LFS_OBJECTS_DIR` | Directory to store the lfs-objects. Defaults to `$GITLAB_SHARED_DIR/lfs-objects` | +| `GITLAB_LFS_OBJECT_STORE_ENABLED` | Enables Object Store for LFS that will be remote stored. Defaults to `false` | +| `GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY` | Bucket name to store the LFS. Defaults to `lfs-object` | +| `GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD` | Temporary option to limit automatic upload. Defaults to `false` | +| `GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD` | Passthrough all downloads via GitLab instead of using Redirects to Object Storage. Defaults to `false` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER` | Connection Provider for the Object Store. Currently only AWS is supported. Defaults to `AWS` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID` | AWS Access Key ID for the Bucket. Defaults to `AWS_ACCESS_KEY_ID` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY` | AWS Secret Access Key. Defaults to `AWS_SECRET_ACCESS_KEY` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION` | AWS Region. Defaults to `us-east-1` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST` | Configure this for an compatible AWS host like minio. Defaults to `s3.amazonaws.com` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` | AWS Endpoint like `http://127.0.0.1:9000`. Defaults to `nil` | +| `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` | Changes AWS Path Style to 'host/bucket_name/object' instead of 'bucket_name.host/object'. Defaults to `true` | | `GITLAB_UPLOADS_STORAGE_PATH` | The location where uploads objects are stored. Defaults to `$GITLAB_SHARED_DIR/public`. | | `GITLAB_UPLOADS_BASE_DIR` | Mapping for the `GITLAB_UPLOADS_STORAGE_PATH`. Defaults to `uploads/-/system` | | `GITLAB_MATTERMOST_ENABLED` | Enable/Disable GitLab Mattermost for *Add Mattermost button*. Defaults to `false`. | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 662de91c..4aa74e8c 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -168,6 +168,21 @@ production: &base enabled: {{GITLAB_LFS_ENABLED}} # The location where LFS objects are stored (default: shared/lfs-objects). storage_path: {{GITLAB_LFS_OBJECTS_DIR}} + object_store: + enabled: {{GITLAB_LFS_OBJECT_STORE_ENABLED}} + remote_directory: {{GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY}} # The bucket name + direct_upload: {{GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD}} # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false) + background_upload: {{GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD}} # Temporary option to limit automatic upload (Default: true) + proxy_download: {{GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD}} # Passthrough all downloads via GitLab instead of using Redirects to Object Storage + connection: + provider: {{GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER}} # Only AWS supported at the moment + aws_access_key_id: {{GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID}} + aws_secret_access_key: {{GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY}} + region: {{GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION}} + host: '{{GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST}}' # default: s3.amazonaws.com + endpoint: '{{GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT}}' # default: nil + path_style: {{GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE}} # Use 'host/bucket_name/object' instead of 'bucket_name.host/object' + ## Uploads (attachments, avatars, etc...) uploads: diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index 7ba0bf6f..c1b063bc 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -111,6 +111,19 @@ GITLAB_PIPELINE_SCHEDULE_WORKER_CRON=${GITLAB_PIPELINE_SCHEDULE_WORKER_CRON:-"19 GITLAB_LFS_ENABLED=${GITLAB_LFS_ENABLED:-true} GITLAB_LFS_OBJECTS_DIR="${GITLAB_LFS_OBJECTS_DIR:-$GITLAB_SHARED_DIR/lfs-objects}" +GITLAB_LFS_OBJECT_STORE_ENABLED=${GITLAB_LFS_OBJECT_STORE_ENABLED:-false} +GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY=${GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY:-lfs-objects} +GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD=${GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD:-false} +GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD=${GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD:-false} +GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD=${GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD:-false} +GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER=${GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER:-AWS} +GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID=${GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID:-AWS_ACCESS_KEY_ID} +GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY=${GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY:-AWS_SECRET_ACCESS_KEY} +GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION=${GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION:-us-east-1} +GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST=${GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST:-s3.amazonaws.com} +GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT=${GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT:-nil} +GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE=${GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE:-true} + ## Uploads GITLAB_UPLOADS_STORAGE_PATH="${GITLAB_UPLOADS_STORAGE_PATH:-$GITLAB_INSTALL_DIR/public}" GITLAB_UPLOADS_BASE_DIR="${GITLAB_UPLOADS_BASE_DIR:-uploads/-/system}" diff --git a/assets/runtime/functions b/assets/runtime/functions index 5c9c56cc..7cfe0d5e 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -965,6 +965,21 @@ gitlab_configure_lfs() { update_template ${GITLAB_CONFIG} \ GITLAB_LFS_ENABLED \ GITLAB_LFS_OBJECTS_DIR + + echo "Configuring gitlab::lfs:object_store" + update_template ${GITLAB_CONFIG} \ + GITLAB_LFS_OBJECT_STORE_ENABLED \ + GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY \ + GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD \ + GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD \ + GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE } gitlab_configure_uploads() { From 0bf46bf73b99de1fd5fc1370b7192b30a8e98fba Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sun, 29 Apr 2018 10:47:59 +0200 Subject: [PATCH 09/10] Add GITLAB_UPLOADS_OBJECT_STORE_* Signed-off-by: solidnerd --- Changelog.md | 14 ++++++++++++++ README.md | 11 +++++++++++ assets/runtime/config/gitlabhq/gitlab.yml | 15 +++++++++++++++ assets/runtime/env-defaults | 14 ++++++++++++++ assets/runtime/functions | 17 +++++++++++++++++ 5 files changed, 71 insertions(+) diff --git a/Changelog.md b/Changelog.md index 574957be..466b87e4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -30,6 +30,20 @@ https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) for the list o - ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST` - ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` - ADD `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` + +- ADD `GITLAB_UPLOADS_OBJECT_STORE_ENABLED` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` +- ADD `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` + **10.6.4** - gitlab: upgrade CE to v10.6.4 diff --git a/README.md b/README.md index e3a1722f..b31bd01c 100644 --- a/README.md +++ b/README.md @@ -873,6 +873,17 @@ Below is the complete list of available options that can be used to customize yo | `GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` | Changes AWS Path Style to 'host/bucket_name/object' instead of 'bucket_name.host/object'. Defaults to `true` | | `GITLAB_UPLOADS_STORAGE_PATH` | The location where uploads objects are stored. Defaults to `$GITLAB_SHARED_DIR/public`. | | `GITLAB_UPLOADS_BASE_DIR` | Mapping for the `GITLAB_UPLOADS_STORAGE_PATH`. Defaults to `uploads/-/system` | +| `GITLAB_UPLOADS_OBJECT_STORE_ENABLED` | Enables Object Store for UPLOADS that will be remote stored. Defaults to `false` | +| `GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY` | Bucket name to store the UPLOADS. Defaults to `uploads` | +| `GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD` | Temporary option to limit automatic upload. Defaults to `false` | +| `GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD` | Passthrough all downloads via GitLab instead of using Redirects to Object Storage. Defaults to `false` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER` | Connection Provider for the Object Store. Currently only AWS is supported. Defaults to `AWS` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID` | AWS Access Key ID for the Bucket. Defaults to `AWS_ACCESS_KEY_ID` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY` | AWS Secret Access Key. Defaults to `AWS_SECRET_ACCESS_KEY` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION` | AWS Region. Defaults to `us-east-1` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST` | Configure this for an compatible AWS host like minio. Defaults to `s3.amazonaws.com` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT` | AWS Endpoint like `http://127.0.0.1:9000`. Defaults to `nil` | +| `GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE` | Changes AWS Path Style to 'host/bucket_name/object' instead of 'bucket_name.host/object'. Defaults to `true` | | `GITLAB_MATTERMOST_ENABLED` | Enable/Disable GitLab Mattermost for *Add Mattermost button*. Defaults to `false`. | | `GITLAB_MATTERMOST_URL` | Sets Mattermost URL. Defaults to `https://mattermost.example.com`. | | `GITLAB_BACKUP_SCHEDULE` | Setup cron job to automatic backups. Possible values `disable`, `daily`, `weekly` or `monthly`. Disabled by default | diff --git a/assets/runtime/config/gitlabhq/gitlab.yml b/assets/runtime/config/gitlabhq/gitlab.yml index 4aa74e8c..3361a1c4 100644 --- a/assets/runtime/config/gitlabhq/gitlab.yml +++ b/assets/runtime/config/gitlabhq/gitlab.yml @@ -189,6 +189,21 @@ production: &base # The location where uploads objects are stored (default: public/). storage_path: {{GITLAB_UPLOADS_STORAGE_PATH}} base_dir: {{GITLAB_UPLOADS_BASE_DIR}} + object_store: + enabled: {{GITLAB_UPLOADS_OBJECT_STORE_ENABLED}} + remote_directory: {{GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY}} # The bucket name + direct_upload: {{GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD}} # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false) + background_upload: {{GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD}} # Temporary option to limit automatic upload (Default: true) + proxy_download: {{GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD}} # Passthrough all downloads via GitLab instead of using Redirects to Object Storage + connection: + provider: {{GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER}} # Only AWS supported at the moment + aws_access_key_id: {{GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID}} + aws_secret_access_key: {{GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY}} + region: {{GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION}} + host: '{{GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST}}' # default: s3.amazonaws.com + endpoint: '{{GITLAB_UPLOADS_ENDPOINT_OBJECT_STORE_CONNECTION_AWS_ENDPOINT}}' # default: nil + path_style: {{GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE}} # Use 'host/bucket_name/object' instead of 'bucket_name.host/object' + ## GitLab Pages diff --git a/assets/runtime/env-defaults b/assets/runtime/env-defaults index c1b063bc..f419afa1 100644 --- a/assets/runtime/env-defaults +++ b/assets/runtime/env-defaults @@ -128,6 +128,19 @@ GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE=${GITLAB_LFS_OBJECT_STORE_CONN GITLAB_UPLOADS_STORAGE_PATH="${GITLAB_UPLOADS_STORAGE_PATH:-$GITLAB_INSTALL_DIR/public}" GITLAB_UPLOADS_BASE_DIR="${GITLAB_UPLOADS_BASE_DIR:-uploads/-/system}" +GITLAB_UPLOADS_OBJECT_STORE_ENABLED=${GITLAB_UPLOADS_OBJECT_STORE_ENABLED:-false} +GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY=${GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY:-uploads} +GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD=${GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD:-false} +GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD=${GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD:-false} +GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD=${GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD:-false} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER:-AWS} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID:-AWS_ACCESS_KEY_ID} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY:-AWS_SECRET_ACCESS_KEY} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION:-us-east-1} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST:-s3.amazonaws.com} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT:-nil} +GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE=${GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE:-true} + ## Mattermost GITLAB_MATTERMOST_ENABLED=${GITLAB_MATTERMOST_ENABLED:-false} GITLAB_MATTERMOST_URL=${GITLAB_MATTERMOST_URL:-https://mattermost.example.com} @@ -411,3 +424,4 @@ GITLAB_MONITORING_IP_WHITELIST=${GITLAB_MONITORING_IP_WHITELIST:-"0.0.0.0/8"} GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_ENABLED:-true} GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_ADDRESS:-"0.0.0.0"} GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT=${GITLAB_MONITORING_SIDEKIQ_EXPORTER_PORT:-3807} + diff --git a/assets/runtime/functions b/assets/runtime/functions index 7cfe0d5e..e8bfa43b 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -987,6 +987,23 @@ gitlab_configure_uploads() { update_template ${GITLAB_CONFIG} \ GITLAB_UPLOADS_STORAGE_PATH \ GITLAB_UPLOADS_BASE_DIR + + echo "Configuring gitlab::uploads:object_store" + update_template ${GITLAB_CONFIG} \ + GITLAB_UPLOADS_OBJECT_STORE_ENABLED \ + GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY \ + GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD \ + GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD \ + GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE +} + } gitlab_configure_mattermost() { From d2f1262dfa658811db04dfe37ce32e562fe401e9 Mon Sep 17 00:00:00 2001 From: solidnerd Date: Sun, 29 Apr 2018 14:23:05 +0200 Subject: [PATCH 10/10] Delete Object Store config when it's not used --- assets/runtime/functions | 99 +++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 43 deletions(-) diff --git a/assets/runtime/functions b/assets/runtime/functions index e8bfa43b..eaf34a2b 100644 --- a/assets/runtime/functions +++ b/assets/runtime/functions @@ -940,68 +940,81 @@ gitlab_configure_ci() { } gitlab_configure_artifacts() { + if [[ ${GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED} == true ]]; then + echo "Configuring gitlab::artifacts:object_store" + update_template ${GITLAB_CONFIG} \ + GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED \ + GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY \ + GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD \ + GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ + GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE + else + exec_as_git sed -i -e "/path: {{GITLAB_ARTIFACTS_DIR}}/{n;N;N;N;N;N;N;N;N;N;N;N;N;d;}" ${GITLAB_CONFIG} + fi + echo "Configuring gitlab::artifacts..." update_template ${GITLAB_CONFIG} \ GITLAB_ARTIFACTS_ENABLED \ GITLAB_ARTIFACTS_DIR - - echo "Configuring gitlab::artifacts:object_store" - update_template ${GITLAB_CONFIG} \ - GITLAB_ARTIFACTS_OBJECT_STORE_ENABLED \ - GITLAB_ARTIFACTS_OBJECT_STORE_REMOTE_DIRECTORY \ - GITLAB_ARTIFACTS_OBJECT_STORE_BACKGROUND_UPLOAD \ - GITLAB_ARTIFACTS_OBJECT_STORE_PROXY_DOWNLOAD \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_PROVIDER \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_REGION \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_HOST \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ - GITLAB_ARTIFACTS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE } gitlab_configure_lfs() { + if [[ ${GITLAB_LFS_OBJECT_STORE_ENABLED} == true ]]; then + echo "Configuring gitlab::lfs:object_store" + update_template ${GITLAB_CONFIG} \ + GITLAB_LFS_OBJECT_STORE_ENABLED \ + GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY \ + GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD \ + GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD \ + GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ + GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE + else + exec_as_git sed -i -e "/path: {{GITLAB_LFS_OBJECTS_DIR}}/{n;N;N;N;N;N;N;N;N;N;N;N;N;N;d;}" ${GITLAB_CONFIG} + fi + echo "Configuring gitlab::lfs..." update_template ${GITLAB_CONFIG} \ GITLAB_LFS_ENABLED \ GITLAB_LFS_OBJECTS_DIR - - echo "Configuring gitlab::lfs:object_store" - update_template ${GITLAB_CONFIG} \ - GITLAB_LFS_OBJECT_STORE_ENABLED \ - GITLAB_LFS_OBJECT_STORE_REMOTE_DIRECTORY \ - GITLAB_LFS_OBJECT_STORE_DIRECT_UPLOAD \ - GITLAB_LFS_OBJECT_STORE_BACKGROUND_UPLOAD \ - GITLAB_LFS_OBJECT_STORE_PROXY_DOWNLOAD \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_PROVIDER \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_REGION \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_HOST \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ - GITLAB_LFS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE } gitlab_configure_uploads() { + if [[ ${GITLAB_UPLOADS_OBJECT_STORE_ENABLED} == true ]]; then + echo "Configuring gitlab::uploads:object_store" + update_template ${GITLAB_CONFIG} \ + GITLAB_UPLOADS_OBJECT_STORE_ENABLED \ + GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY \ + GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD \ + GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD \ + GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ + GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE + else + exec_as_git sed -i -e "/base_dir: {{GITLAB_UPLOADS_BASE_DIR}}/{n;N;N;N;N;N;N;N;N;N;N;N;N;N;d;}" ${GITLAB_CONFIG} + fi + echo "Configuring gitlab::uploads..." update_template ${GITLAB_CONFIG} \ GITLAB_UPLOADS_STORAGE_PATH \ GITLAB_UPLOADS_BASE_DIR - echo "Configuring gitlab::uploads:object_store" - update_template ${GITLAB_CONFIG} \ - GITLAB_UPLOADS_OBJECT_STORE_ENABLED \ - GITLAB_UPLOADS_OBJECT_STORE_REMOTE_DIRECTORY \ - GITLAB_UPLOADS_OBJECT_STORE_DIRECT_UPLOAD \ - GITLAB_UPLOADS_OBJECT_STORE_BACKGROUND_UPLOAD \ - GITLAB_UPLOADS_OBJECT_STORE_PROXY_DOWNLOAD \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_PROVIDER \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ACCESS_KEY_ID \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_SECRET_ACCESS_KEY \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_REGION \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_HOST \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_ENDPOINT \ - GITLAB_UPLOADS_OBJECT_STORE_CONNECTION_AWS_PATH_STYLE } }