Skip to content

Commit 99b5174

Browse files
committed
WIP: Sync upstream config based on gitlab-foss v15.0.0
required versions of components are: - gitaly: v15.0.0 - gitlab-shell: v14.3.0 - gitlab-pages: v1.58.0 TODO: - [ ]add update process to assets/runtime/function - [ ] parameterize - [ ] re-check - [ ] check compatibility for renamed parameter
1 parent 1212255 commit 99b5174

File tree

9 files changed

+599
-314
lines changed

9 files changed

+599
-314
lines changed

assets/runtime/config/gitaly/config.toml

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
socket_path = "{{GITALY_SOCKET_PATH}}"
66

77
# The directory where Gitaly's executables are stored
8-
bin_dir = "/usr/local/bin/"
8+
bin_dir = "/home/git/gitaly/_build/bin"
9+
10+
# # Optional: The directory where Gitaly can create all files required to
11+
# # properly operate at runtime. If not set, Gitaly will create a directory in
12+
# # the global temporary directory. This directory must exist.
13+
# runtime_dir = "/home/git/gitaly/run"
914

1015
# # Optional: listen on a TCP socket. This is insecure (no authentication)
1116
# listen_addr = "localhost:9999"
12-
# tls_listen_addr = "localhost:8888
17+
# tls_listen_addr = "localhost:8888"
1318

1419
# # Optional: export metrics via Prometheus
1520
# prometheus_listen_addr = "localhost:9236"
@@ -32,6 +37,9 @@ bin_dir = "/usr/local/bin/"
3237
# [git]
3338
# bin_path = "/usr/bin/git"
3439
# catfile_cache_size = 100
40+
# [[git.config]]
41+
# key = fetch.fsckObjects
42+
# value = true
3543

3644
[[storage]]
3745
name = "default"
@@ -45,7 +53,7 @@ path = "{{GITLAB_REPOS_DIR}}"
4553
#
4654

4755
# # You can optionally configure Gitaly to output JSON-formatted log messages to stdout
48-
[logging]
56+
# [logging]
4957
# # The directory where Gitaly stores extra log files
5058
dir = "{{GITLAB_LOG_DIR}}/gitaly"
5159
# format = "json"
@@ -87,12 +95,54 @@ dir = "{{GITLAB_GITALY_INSTALL_DIR}}/ruby"
8795
# The directory where gitlab-shell is installed
8896
dir = "{{GITLAB_SHELL_INSTALL_DIR}}"
8997

90-
# # You can adjust the concurrency of each RPC endpoint
91-
# [[concurrency]]
92-
# rpc = "/gitaly.RepositoryService/GarbageCollect"
93-
# max_per_repo = 1
98+
[hooks]
99+
custom_hooks_dir = "/home/git/custom_hooks"
94100

95101
[gitlab]
96102
secret_file = "/home/git/gitlab-shell/.gitlab_shell_secret"
97-
url = "http://localhost:8181{{GITLAB_RELATIVE_URL_ROOT}}"
103+
url = "http+unix://%2Fhome%2Fgit%2Fgitlab%2Ftmp%2Fsockets%2Fgitlab-workhorse.socket"
104+
# Only needed if a UNIX socket is used in `url` and GitLab is configured to
105+
# use a relative path (e.g. /gitlab).
106+
relative_url_root = '{{GITLAB_RELATIVE_URL_ROOT}}'
107+
108+
[gitlab.http-settings]
109+
# read_timeout = 300
110+
# user = someone
111+
# password = somepass
112+
# ca_file = /etc/ssl/cert.pem
113+
# ca_path = /etc/pki/tls/certs
114+
self_signed_cert = {{SSL_SELF_SIGNED}}
98115

116+
# # You can adjust the concurrency of each RPC endpoint
117+
# [[concurrency]]
118+
# rpc = "/gitaly.RepositoryService/GarbageCollect"
119+
# max_per_repo = 1
120+
# max_queue_wait = "1m"
121+
# max_queue_size = 10
122+
123+
# [[rate_limiting]]
124+
# rpc = "/gitaly.SmartHTTPService/PostUploadPackWithSidechannel"
125+
# interval = "1m"
126+
# burst = 5
127+
128+
# Daily maintenance designates time slots to run daily to optimize and maintain
129+
# enabled storages.
130+
# [daily_maintenance]
131+
# start_hour = 23
132+
# start_minute = 30
133+
# duration = "45m"
134+
# storages = ["default"]
135+
# disabled = false
136+
137+
# [cgroups]
138+
# count = 10
139+
# mountpoint = "/sys/fs/cgroup"
140+
# hierarchy_root = "gitaly"
141+
142+
# [cgroups.memory]
143+
# enabled = true
144+
# limit = 1048576
145+
146+
# [cgroups.cpu]
147+
# enabled = true
148+
# shares = 512

assets/runtime/config/gitlab-pages/config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ auth-client-id={{GITLAB_PAGES_ACCESS_CLIENT_ID}}
22
auth-client-secret={{GITLAB_PAGES_ACCESS_CLIENT_SECRET}}
33
auth-redirect-uri={{GITLAB_PAGES_ACCESS_REDIRECT_URI}}
44
auth-secret={{GITLAB_PAGES_ACCESS_SECRET}}
5+
listen-http=:{{GITLAB_PAGES_PORT}}
6+
pages-root={{GITLAB_SHARED_DIR}}/shared/pages
7+
api-secret-key={{GITLAB_INSTALL_DIR}}/.gitlab_pages_secret
8+
pages-domain={{GITLAB_PAGES_DOMAIN}}
59
gitlab-server={{GITLAB_PAGES_ACCESS_CONTROL_SERVER}}
610
artifacts-server={{GITLAB_PAGES_ARTIFACTS_SERVER_URL}}
711
internal-gitlab-server=http://localhost:8181
8-
api-secret-key={{GITLAB_INSTALL_DIR}}/.gitlab_pages_secret

assets/runtime/config/gitlab-shell/config.yml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ user: git
1313
# only listen on a Unix domain socket. For Unix domain sockets use
1414
# "http+unix://<urlquoted-path-to-socket>", e.g.
1515
# "http+unix://%2Fpath%2Fto%2Fsocket"
16-
gitlab_url: "http://localhost:8080{{GITLAB_RELATIVE_URL_ROOT}}"
16+
gitlab_url: "http+unix://%2Fhome%2Fgit%2Fgitlab%2Ftmp%2Fsockets%2Fgitlab-workhorse.socket"
17+
18+
# When a http+unix:// is used in gitlab_url, this is the relative URL root to GitLab.
19+
# Not used if gitlab_url is http:// or https://.
20+
# gitlab_relative_url_root: "/"
1721

1822
# See installation.md#using-https for additional HTTPS configuration details.
1923
http_settings:
@@ -22,18 +26,22 @@ http_settings:
2226
# password: somepass
2327
# ca_file: /etc/ssl/cert.pem
2428
# ca_path: /etc/pki/tls/certs
25-
self_signed_cert: {{SSL_SELF_SIGNED}}
29+
#
2630

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

34+
# SSL certificate dir where custom certificates can be placed
35+
# https://golang.org/pkg/crypto/x509/
36+
# ssl_cert_dir: /opt/gitlab/embedded/ssl/certs/
37+
3038
# File that contains the secret key for verifying access to GitLab.
3139
# Default is .gitlab_shell_secret in the gitlab-shell directory.
3240
secret_file: "{{GITLAB_SHELL_INSTALL_DIR}}/.gitlab_shell_secret"
33-
34-
# Parent directory for global custom hook directories (pre-receive.d, update.d, post-receive.d)
35-
# Default is hooks in the gitlab-shell directory.
36-
custom_hooks_dir: "{{GITLAB_SHELL_INSTALL_DIR}}/hooks"
41+
#
42+
# The secret field supersedes the secret_file, and if set that
43+
# file will not be read.
44+
# secret: "supersecret"
3745

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

45-
# Log format. 'text' by default
53+
# Log format. 'json' by default, can be changed to 'text' if needed
4654
# log_format: json
4755

4856
# Audit usernames.
@@ -53,3 +61,31 @@ audit_usernames: false
5361
# Distributed Tracing. GitLab-Shell has distributed tracing instrumentation.
5462
# For more details, visit https://docs.gitlab.com/ee/development/distributed_tracing.html
5563
# gitlab_tracing: opentracing://driver
64+
65+
# This section configures the built-in SSH server. Ignored when running on OpenSSH.
66+
sshd:
67+
# Address which the SSH server listens on. Defaults to [::]:22.
68+
listen: "[::]:22"
69+
# Set to true if gitlab-sshd is being fronted by a load balancer that implements
70+
# the PROXY protocol.
71+
proxy_protocol: false
72+
# Proxy protocol policy ("use", "require", "reject", "ignore"), "use" is the default value
73+
# Values: https://github.com/pires/go-proxyproto/blob/195fedcfbfc1be163f3a0d507fac1709e9d81fed/policy.go#L20
74+
proxy_policy: "use"
75+
# Address which the server listens on HTTP for monitoring/health checks. Defaults to localhost:9122.
76+
web_listen: "localhost:9122"
77+
# Maximum number of concurrent sessions allowed on a single SSH connection. Defaults to 10.
78+
concurrent_sessions_limit: 10
79+
# Sets an interval after which server will send keepalive message to a client
80+
client_alive_interval: 15
81+
# The server waits for this time (in seconds) for the ongoing connections to complete before shutting down. Defaults to 10.
82+
grace_period: 10
83+
# The endpoint that returns 200 OK if the server is ready to receive incoming connections; otherwise, it returns 503 Service Unavailable. Defaults to "/start".
84+
readiness_probe: "/start"
85+
# The endpoint that returns 200 OK if the server is alive. Defaults to "/health".
86+
liveness_probe: "/health"
87+
# SSH host key files.
88+
host_key_files:
89+
- /run/secrets/ssh-hostkeys/ssh_host_rsa_key
90+
- /run/secrets/ssh-hostkeys/ssh_host_ecdsa_key
91+
- /run/secrets/ssh-hostkeys/ssh_host_ed25519_key

assets/runtime/config/gitlabhq/database.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ production:
66
adapter: postgresql
77
encoding: {{DB_ENCODING}}
88
database: {{DB_NAME}}
9-
host: {{DB_HOST}}
10-
port: {{DB_PORT}}
119
username: {{DB_USER}}
1210
password: "{{DB_PASS}}"
13-
pool: {{DB_POOL}}
14-
prepared_statements: {{DB_PREPARED_STATEMENTS}}
15-
11+
host: {{DB_HOST}}
12+
# load_balancing:
13+
# hosts:
14+
# - host1.example.com
15+
# - host2.example.com
16+
# discover:
17+
# nameserver: 1.2.3.4
18+
# port: 8600
19+
# record: secondary.postgresql.service.consul
20+
# interval: 300

0 commit comments

Comments
 (0)