Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync upstream configuration #2570

Draft
wants to merge 47 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
32036f7
Sync config v7.9.0 : Sync comment in smtp_settings.rb
kkimurak Oct 24, 2022
946ed85
Sync config v13.0.0 : Change usage of Redis slave to replica in resqu…
kkimurak Oct 24, 2022
67bef4f
Sync config v11.0.0 : Add db: load_balancing
kkimurak Oct 24, 2022
e31cb7f
Sync config v13.2.0 : gitaly: Fix double quote for `tls_listen_addr`
kkimurak Oct 24, 2022
a0d906c
SYnc config v13.2.0 : Add consolidated object_storage config in one p…
kkimurak Oct 24, 2022
74cfc7a
Sync config v13.3.0 : remove DB_POOL
kkimurak Oct 24, 2022
290cff5
Sync config v13.3.0 : Add commented-out configs for AWS S3 server sid…
kkimurak Oct 24, 2022
a2e37f9
Sync config v13.3.0 : gitlab-shell: Add commented out config ssl_cert…
kkimurak Oct 24, 2022
9eb17cc
Sync config v13.4.2 : gitlab-shell: Add commented-out config gitlab_r…
kkimurak Oct 24, 2022
8c02e96
Sync config v13.5.0 : Update link to redis docs in config/resque.yml
kkimurak Oct 24, 2022
1d78bba
Sync config v13.5.0 : gitlab-shell: Add commented-out config `secret`
kkimurak Oct 24, 2022
495291b
Sync config v13.7.0 : Rename PIWIK_* to MATOMO_*
kkimurak Oct 24, 2022
a548218
Sync config v13.8.0 : Update puma.rb: upstream/48897
kkimurak Oct 24, 2022
1f922e3
Sync config v13.8.0 : Update puma.rb: upstream/51467
kkimurak Oct 24, 2022
9afe65b
Sync config v13.9.0 : Update comment: URL for feature flag docs in gi…
kkimurak Oct 24, 2022
cdf9cd0
Sync config v13.9.0 : gitlab: Add commented-out config `application_s…
kkimurak Oct 24, 2022
4735b15
Sync config v13.10.0 : Add default config for matomo_disable_cookies …
kkimurak Oct 24, 2022
3c6fd1d
Sync config v13.10.0 : gitlab: Add `allowed_hosts` setting (not param…
kkimurak Oct 24, 2022
c6e6b9b
Sync config v13.11.0 : Fix code comments with bad capitalization
kkimurak Oct 24, 2022
8f3956b
Sync config v13.11.0 : gitaly: Add commented out settings [git.config]
kkimurak Oct 24, 2022
92a534f
Sync config v13.11.0 : gitlab: Add commented-out config for SMTP conn…
kkimurak Oct 24, 2022
66dfc37
Sync config v13.12.0 : Update comment: use 32 byte long version of db…
kkimurak Oct 24, 2022
8d59979
Sync config v13.12.0 : Update puma.rb: upstream/61572
kkimurak Oct 24, 2022
262658e
Sync config v14.0.0 : gitlab.yml: Unify unicon/puma to puma
kkimurak Oct 24, 2022
2cf6170
Sync config v14.0.0 : Add commented-out config `display_initial_root_…
kkimurak Oct 24, 2022
a03c267
Sync config v14.2.0 : Update puma.rb: upstream/66712
kkimurak Oct 24, 2022
b10e6d6
Sync config v14.3.0 : Update comment: default gitlab-shell log format…
kkimurak Oct 24, 2022
c5527a3
Sync config v14.7.0 : gitlab.yml: Add note about updating GDK settings
kkimurak Oct 24, 2022
77558c1
Sync config v14.8.0 : Remove deprecated config `SSL_SELF_CERT`
kkimurak Oct 24, 2022
3e5fa9f
Sync config v14.9.0 : Move custom_hooks_dir from gitlab-shell to gitaly
kkimurak Oct 24, 2022
872a6b7
Sync config v14.2.0 : gitlab: Add commented-out config cdn_host
kkimurak Oct 24, 2022
c95365c
Sync config v14.2.0 : gitlab: Add commented-out config for encrypted …
kkimurak Oct 24, 2022
91c2e0c
Sync config v14.9.0 : Update docs link in mail_room yml section
kkimurak Oct 24, 2022
9b31de5
Sync config v14.10.0 : Add commented-out potions for gitaly: runtime_dir
kkimurak Oct 24, 2022
06ce2a0
Sync config v15.0.0 : remove Pseudonymizer code
kkimurak Oct 24, 2022
47115b2
Sync config v15.0.0 : Remove `direct_upload` and `background_upload`
kkimurak Oct 24, 2022
eca60f4
Sync config v15.0.0 : Update comment: Clarify expunged vs deleted in …
kkimurak Oct 24, 2022
9d1fa62
Sync config v15.1.0 : gitaly: Add commented out setting ignore_gitconfig
kkimurak Oct 24, 2022
c502882
Sync config v15.2.0 : Remove GITLAB_NOTIFY_{ON_BROKEN_BUILDS, PUSHER}
kkimurak Oct 24, 2022
c1d7f8f
Sync config v15.4.0 : Add commented-out configs for microsoft_graph_m…
kkimurak Oct 24, 2022
0c3b227
Sync config v13.6.0 : Add gitlab.yml:packages:dpkg_deb_path
kkimurak Oct 24, 2022
d2909aa
Sync config v14.8.0 : Add ci_secure_files related configs
kkimurak Oct 24, 2022
b05cbd9
Sync config v13.5.0 : Add pages deployments uploader
kkimurak Oct 24, 2022
d9dade8
Sync config v13.11.0 : Add local_store
kkimurak Oct 24, 2022
eb1fd0e
Sync config v13.9.0 : Update links to redirected docs
kkimurak Oct 24, 2022
595f6c9
Sync config v15.0.0 : Allow pruning of stale group runners
kkimurak Oct 24, 2022
4209299
Sync config v15.0.0 : Remove Legacy Job Artifact replication
kkimurak Oct 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 23 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- [Gitlab Pages](#gitlab-pages)
- [External Issue Trackers](#external-issue-trackers)
- [Host UID / GID Mapping](#host-uid--gid-mapping)
- [Piwik](#piwik)
- [Matomo](#matomo)
- [Exposing ssh port in dockerized gitlab-ce](docs/exposing-ssh-port.md)
- [Available Configuration Parameters](#available-configuration-parameters)
- [Maintenance](#maintenance)
Expand Down Expand Up @@ -483,13 +483,14 @@ Great! we are now just one step away from having our application secured.

##### Enabling HTTPS support

HTTPS support can be enabled by setting the `GITLAB_HTTPS` option to `true`. Additionally, when using self-signed SSL certificates you need to the set `SSL_SELF_SIGNED` option to `true` as well. Assuming we are using self-signed certificates
HTTPS support can be enabled by setting the `GITLAB_HTTPS` option to `true`.
Since corresponding setting `self_signed_cert` was removed in the gitlab-shell 13.26.0 release, the option `SSL_SELF_SIGNED`, that was used to indicate to use a self-signed certificate, is not used anymore. You don't need to set this option even if you're using a self-signed certificate.

```bash
docker run --name gitlab -d \
--publish 10022:22 --publish 10080:80 --publish 10443:443 \
--env 'GITLAB_SSH_PORT=10022' --env 'GITLAB_PORT=10443' \
--env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \
--env 'GITLAB_HTTPS=true' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab:15.5.0
```
Expand All @@ -504,7 +505,7 @@ With `NGINX_HSTS_MAXAGE` you can configure that value. The default value is `315

```bash
docker run --name gitlab -d \
--env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \
--env 'GITLAB_HTTPS=true' \
--env 'NGINX_HSTS_MAXAGE=2592000' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab:15.5.0
Expand All @@ -516,7 +517,7 @@ If you want to completely disable HSTS set `NGINX_HSTS_ENABLED` to `false`.

Load balancers like nginx/haproxy/hipache talk to backend applications over plain http and as such the installation of ssl keys and certificates are not required and should **NOT** be installed in the container. The SSL configuration has to instead be done at the load balancer.

However, when using a load balancer you **MUST** set `GITLAB_HTTPS` to `true`. Additionally you will need to set the `SSL_SELF_SIGNED` option to `true` if self signed SSL certificates are in use.
However, when using a load balancer you **MUST** set `GITLAB_HTTPS` to `true`.

With this in place, you should configure the load balancer to support handling of https requests. But that is out of the scope of this document. Please refer to [Using SSL/HTTPS with HAProxy](http://seanmcgary.com/posts/using-sslhttps-with-haproxy) for information on the subject.

Expand All @@ -528,12 +529,11 @@ In summation, when using a load balancer, the docker command would look for the
docker run --name gitlab -d \
--publish 10022:22 --publish 10080:80 \
--env 'GITLAB_SSH_PORT=10022' --env 'GITLAB_PORT=443' \
--env 'GITLAB_HTTPS=true' --env 'SSL_SELF_SIGNED=true' \
--env 'GITLAB_HTTPS=true' \
--volume /srv/docker/gitlab/gitlab:/home/git/data \
sameersbn/gitlab:15.5.0
```

Again, drop the `--env 'SSL_SELF_SIGNED=true'` option if you are using CA certified SSL certificates.

In case GitLab responds to any kind of POST request (login, OAUTH, changing settings etc.) with a 422 HTTP Error, consider adding this to your reverse proxy configuration:

Expand Down Expand Up @@ -770,13 +770,15 @@ docker run --name gitlab -d [OPTIONS] \
sameersbn/gitlab:15.5.0 app:sanitize
```

#### Piwik
#### Matomo

If you want to monitor your gitlab instance with [Piwik](http://piwik.org/), there are two options to setup: `PIWIK_URL` and `PIWIK_SITE_ID`.
If you want to monitor your gitlab instance with [Matomo](https://matomo.org/), there are two options to setup: `MATOMO_URL` and `MATOMO_SITE_ID`.
These options should contain something like:

- `PIWIK_URL=piwik.example.org`
- `PIWIK_SITE_ID=42`
- `MATOMO_URL=matomo.example.org`
- `MATOMO_SITE_ID=42`

[Piwik have been changed the name to Matomo on Jan 2018](https://matomo.org/blog/2018/01/piwik-is-now-matomo/). Legacy configuration parameter `PIWIK_URL` and `PIWIK_SITE_ID` still works as fallback for corresponding parameter.

#### Available Configuration Parameters

Expand Down Expand Up @@ -928,14 +930,6 @@ Global custom hooks directory. Defaults to `/home/git/gitlab-shell/hooks`.

Sets the timeout for webhooks. Defaults to `10` seconds.

##### `GITLAB_NOTIFY_ON_BROKEN_BUILDS`

Enable or disable broken build notification emails. Defaults to `true`

##### `GITLAB_NOTIFY_PUSHER`

Add pusher to recipients list of broken build notification emails. Defaults to `false`

##### `GITLAB_REPOS_DIR`

The git repositories folder in the container. Defaults to `/home/git/data/repositories`
Expand Down Expand Up @@ -1024,14 +1018,6 @@ Enables Object Store for Artifacts that will be remote stored. Defaults to `fals

Bucket name to store the artifacts. Defaults to `artifacts`

##### `GITLAB_ARTIFACTS_OBJECT_STORE_DIRECT_UPLOAD`

Set to true to enable direct upload of Artifacts without the need of local shared storage. Defaults to `false`

##### `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`
Expand Down Expand Up @@ -1100,10 +1086,6 @@ Enables Object Store for LFS that will be remote stored. Defaults to `false`

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`
Expand Down Expand Up @@ -1168,14 +1150,6 @@ Enables Object Store for Packages that will be remote stored. Defaults to `false

Bucket name to store the packages. Defaults to `packages`

##### `GITLAB_PACKAGES_OBJECT_STORE_DIRECT_UPLOAD`

Set to true to enable direct upload of Packages without the need of local shared storage. Defaults to `false`

##### `GITLAB_PACKAGES_OBJECT_STORE_BACKGROUND_UPLOAD`

Temporary option to limit automatic upload. Defaults to `false`

##### `GITLAB_PACKAGES_OBJECT_STORE_PROXY_DOWNLOAD`

Passthrough all downloads via GitLab instead of using Redirects to Object Storage. Defaults to `false`
Expand Down Expand Up @@ -1292,10 +1266,6 @@ Enables Object Store for UPLOADS that will be remote stored. Defaults to `false`

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`
Expand Down Expand Up @@ -1504,10 +1474,6 @@ Set default path for gitaly. defaults to `/home/git/gitaly`

Set a gitaly token, blank by default.

##### `GITLAB_MONITORING_UNICORN_SAMPLER_INTERVAL`

Time between sampling of unicorn socket metrics, in seconds, defaults to `10`

##### `GITLAB_MONITORING_IP_WHITELIST`

IP whitelist to access monitoring endpoints, defaults to `0.0.0.0/8`
Expand Down Expand Up @@ -1596,10 +1562,6 @@ The value of the `worker-src` directive in the `Content-Security-Policy` header.

The value of the `report-uri` directive in the `Content-Security-Policy` header

##### `SSL_SELF_SIGNED`

Set to `true` when using self signed ssl certificates. `false` by default.

##### `SSL_CERTIFICATE_PATH`

Location of the ssl certificate. Defaults to `/home/git/data/certs/gitlab.crt`
Expand Down Expand Up @@ -1780,10 +1742,6 @@ The database database user. Defaults to `root`

The database database password. Defaults to no password

##### `DB_POOL`

The database database connection pool count. Defaults to `10`.

##### `DB_PREPARED_STATEMENTS`

Whether use database prepared statements. No defaults. But set to `false` if you want to use with [PgBouncer](https://pgbouncer.github.io/)
Expand Down Expand Up @@ -2284,13 +2242,21 @@ Sets the gid for group `git` to the specified gid. Defaults to `USERMAP_UID` if

Google Analytics ID. No defaults.

##### `MATOMO_URL`

Sets the Matomo URL. No defaults.

##### `PIWIK_URL`

Sets the Piwik URL. No defaults.
Works as Matomo URL fallback only when `MATOMO_URL` is not set. No defaults.

##### `MATOMO_SITE_ID`

Sets the Matomo site ID. No defaults.

##### `PIWIK_SITE_ID`

Sets the Piwik site ID. No defaults.
Works as Matomo URL fallback only when `MATOMO_SITE_ID` is not set. No defaults.

##### `AWS_BACKUPS`

Expand Down
22 changes: 21 additions & 1 deletion assets/runtime/config/gitaly/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ socket_path = "{{GITALY_SOCKET_PATH}}"
# The directory where Gitaly's executables are stored
bin_dir = "/usr/local/bin/"

# # Optional: The directory where Gitaly can create all files required to
# # properly operate at runtime. If not set, Gitaly will create a directory in
# # the global temporary directory. This directory must exist.
# runtime_dir = "/home/git/gitaly/run"

# # Optional: listen on a TCP socket. This is insecure (no authentication)
# listen_addr = "localhost:9999"
# tls_listen_addr = "localhost:8888
# tls_listen_addr = "localhost:8888"

# # Optional: export metrics via Prometheus
# prometheus_listen_addr = "localhost:9236"
Expand All @@ -32,6 +37,17 @@ bin_dir = "/usr/local/bin/"
# [git]
# bin_path = "/usr/bin/git"
# catfile_cache_size = 100
#
# # Set this setting to `true` to start ignoring gitconfig files installed in
# # the system. This includes both system-level (e.g. '/etc/gitconffig') and
# # global-level (e.g. `$HOME/.gitconfig`) files. This setting will become the
# # default with v16.0. If you intend to override Git configuration you can do
# # so via `[[git.config]]`. The default value is `false`.
# ignore_gitconfig = false
#
# [[git.config]]
# key = fetch.fsckObjects
# value = true

[[storage]]
name = "default"
Expand Down Expand Up @@ -87,6 +103,10 @@ dir = "{{GITLAB_GITALY_INSTALL_DIR}}/ruby"
# The directory where gitlab-shell is installed
dir = "{{GITLAB_SHELL_INSTALL_DIR}}"

[hooks]
custom_hooks_dir = "{{GITLAB_SHELL_INSTALL_DIR}}/hooks"


# # You can adjust the concurrency of each RPC endpoint
# [[concurrency]]
# rpc = "/gitaly.RepositoryService/GarbageCollect"
Expand Down
20 changes: 14 additions & 6 deletions assets/runtime/config/gitlab-shell/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,33 @@ user: git
# "http+unix://%2Fpath%2Fto%2Fsocket"
gitlab_url: "http://localhost:8080{{GITLAB_RELATIVE_URL_ROOT}}"

# When a http+unix:// is used in gitlab_url, this is the relative URL root to GitLab.
# Not used if gitlab_url is http:// or https://.
# gitlab_relative_url_root: "/"

# See installation.md#using-https for additional HTTPS configuration details.
http_settings:
# read_timeout: 300
# user: someone
# password: somepass
# ca_file: /etc/ssl/cert.pem
# ca_path: /etc/pki/tls/certs
self_signed_cert: {{SSL_SELF_SIGNED}}
#

# File used as authorized_keys for gitlab user
auth_file: "{{GITLAB_HOME}}/.ssh/authorized_keys"

# SSL certificate dir where custom certificates can be placed
# https://golang.org/pkg/crypto/x509/
# ssl_cert_dir: /opt/gitlab/embedded/ssl/certs/

# File that contains the secret key for verifying access to GitLab.
# Default is .gitlab_shell_secret in the gitlab-shell directory.
secret_file: "{{GITLAB_SHELL_INSTALL_DIR}}/.gitlab_shell_secret"

# Parent directory for global custom hook directories (pre-receive.d, update.d, post-receive.d)
# Default is hooks in the gitlab-shell directory.
custom_hooks_dir: "{{GITLAB_SHELL_INSTALL_DIR}}/hooks"
#
# The secret field supersedes the secret_file, and if set that
# file will not be read.
# secret: "supersecret"

# Log file.
# Default is gitlab-shell.log in the root directory.
Expand All @@ -42,7 +50,7 @@ log_file: "{{GITLAB_LOG_DIR}}/gitlab-shell/gitlab-shell.log"
# Log level. INFO by default
log_level: INFO

# Log format. 'text' by default
# Log format. 'json' by default, can be changed to 'text' if needed
# log_format: json

# Audit usernames.
Expand Down
11 changes: 9 additions & 2 deletions assets/runtime/config/gitlabhq/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ production:
port: {{DB_PORT}}
username: {{DB_USER}}
password: "{{DB_PASS}}"
pool: {{DB_POOL}}
prepared_statements: {{DB_PREPARED_STATEMENTS}}

# load_balancing:
# hosts:
# - host1.example.com
# - host2.example.com
# discover:
# nameserver: 1.2.3.4
# port: 8600
# record: secondary.postgresql.service.consul
# interval: 300
Loading