[ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = CN stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = BeiJing localityName = Locality Name (eg, city) localityName_default = BeiJIng organizationName = Organization Name (eg, company) organizationName_default = ccops commonName = Common Name (e.g. server FQDN or YOUR name) commonName_max = 64 commonName_default = GitLab CA Test
[ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = CN stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = BeiJing localityName = Locality Name (eg, city) localityName_default = BeiJing organizationName = Organization Name (eg, company) organizationName_default = ccops commonName = Common Name (e.g. server FQDN or YOUR name) commonName_max = 64 commonName_default = gitaly-2.ccops.cc
# If you run a separate monitoring node you can disable these services alertmanager['enable']=false prometheus['enable']=false
# Prevent database migrations from running on upgrade automatically gitlab_rails['auto_migrate']=false
# Enable only the Gitaly service gitaly['enable']=true
# Configure the gitlab-shell API callback URL. Without this, `git push` will # fail. This can be your 'front door' GitLab URL or an internal load # balancer. # Don't forget to copy `/etc/gitlab/gitlab-secrets.json` from web server to Gitaly server gitlab_rails['internal_api_url']=''# gitlab对外域名
# Make Gitaly accept connections on all network interfaces. You must use # firewalls to restrict access to this address/port. # Comment out following line if you only want to support TLS connections gitaly['tls_listen_addr']="0.0.0.0:9999" gitaly['certificate_path']="/etc/gitlab/ssl/server-1.pem" gitaly['key_path']="/etc/gitlab/ssl/server.key"
# Enable service discovery for Prometheus consul['enable']=false consul['monitoring_service_discovery']=false
# Set the network addresses that the exporters will listen on for monitoring gitaly['prometheus_listen_addr']="0.0.0.0:9236"
# Gitaly Auth Token # Should be the same as praefect_internal_token gitaly['auth_token']='LYIddgqhn91vykzAxxxxxxxDtLSTnO' gitlab_shell['secret_token']='vIH3gfTSXbxxxxxxx3ZH7DDVX17YJ'
external_url'https://gitlab-tst.ccops.cc' self_signed_cert='true' gitlab_rails['time_zone']='Beijing' runtime_dir='/dev/shm' # Enable Prometheus metrics access to Praefect. You must use firewalls # to restrict access to this address/port.
### Webhook Settings ###! Number of seconds to wait for HTTP response after sending webhook HTTP POST ###! request (default: 10) gitlab_rails['webhook_timeout']=20
### LDAP Settings ###! Docs: https://docs.gitlab.com/omnibus/settings/ldap.html ###! **Be careful not to break the indentation in the ldap_servers block. It is ###! in yaml format and the spaces must be retained. Using tabs will not work.** gitlab_rails['ldap_enabled']=false
gitlab_rails['ldap_servers']=YAML.load<<-'EOS'# remember to close this block with 'EOS' below main: label:'LDAP' host:'' port:389 uid:'' method:'plain'# "tls" or "ssl" or "plain" bind_dn:'' password:'' active_directory:true allow_username_or_email_login:false base:'' active_directory:true allow_username_or_email_login:false base:'' user_filter:'' group_base:'' admin_group:'' sync_ssh_keys:false EOS
# Gitaly and GitLab use two shared secrets for authentication, one to authenticate gRPC requests # # to Gitaly, and a second for authentication callbacks from GitLab-Shell to the GitLab internal API. # # The following two values must be the same as their respective values # # of the Gitaly setup gitaly['auth_token']='LYIddgqhn91vykzA8O908MQ7GDtLSTnO' gitlab_shell['secret_token']='vIH3gfTSXbb4XNR3LznY3ZH7DDVX17YJ'
# git_data_dirs get configured for the Praefect virtual storage # Address is Interal Load Balancer for Praefect # Token is praefect_external_token git_data_dirs({ 'default'=> { 'gitaly_address'=>'tls://gitaly-1.ccops.cc:9999', 'gitaly_token'=>'LYIddgqhn91vykzA8O908MQ7GDtLSTnO' }, 'storage1'=> { 'gitaly_address'=>'tls://gitaly-2.ccops.cc:9999', 'gitaly_token'=>'LYIddgqhn91vykzA8O908MQ7GDtLSTnO' }, 'storage2'=> { 'gitaly_address'=>'tls://gitaly-3.ccops.cc:9999', 'gitaly_token'=>'LYIddgqhn91vykzA8O908MQ7GDtLSTnO' }, }) ## Disable components that will not be on the GitLab application server roles ['application_role'] gitaly['enable']=false nginx['enable']=true nginx['ssl_certificate']="/etc/gitlab/ssl/gitlab-tst.ccops.ccm.crt" nginx['ssl_certificate_key']="/etc/gitlab/ssl/gitlab-tst.ccops.cc.key" nginx['ssl_protocols']="TLSv1 TLSv1.1 TLSv1.2 TLSv1.3" nginx['ssl_ciphers']="ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-S HA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4" nginx['listen_addresses']= ['0.0.0.0'] nginx['redirect_http_to_https']=true web_server['external_users']= ['nginx'] nginx['client_max_body_size']='5000m' nginx['real_ip_trusted_addresses']= [ '0.0.0.0/0' ] nginx['real_ip_header']='X-Forwarded-For' nginx['real_ip_recursive']='on'
# Set the network addresses that the exporters used for monitoring will listen on gitlab_workhorse['prometheus_listen_addr']='0.0.0.0:9229' sidekiq['listen_address']="0.0.0.0" puma['listen']='0.0.0.0' puma['exporter_enabled']=true puma['exporter_address']="0.0.0.0" puma['worker_timeout']=600 gitlab_rails['env']= { 'GITLAB_RAILS_RACK_TIMEOUT'=>600 } # Set number of Sidekiq threads per queue process to the recommend number of 10 sidekiq['max_concurrency']=25
# Add the monitoring node's IP address to the monitoring whitelist and allow it to # scrape the NGINX metrics. Replace placeholder `monitoring.gitlab.example.com` with # the address and/or subnets gathered from the monitoring node gitlab_rails['monitoring_whitelist']= ['10.0.0.0/8','127.0.0.0/8','172.0.0.0/8'] #nginx['status']['options']['allow'] = ['10.0.0.0/8', '127.0.0.0/8','172.0.0.0/8']
# note the 'https' below #external_url "https://gitlab.xpaas.lenovo.com" letsencrypt['enable']=false
################################################################################ ## GitLab Logging ###! Docs: https://docs.gitlab.com/omnibus/settings/logs.html ################################################################################ logging['svlogd_size']=200*1024*1024# rotate after 200 MB of log data logging['svlogd_num']=30# keep 30 rotated log files logging['svlogd_timeout']=24*60*60# rotate after 24 hours logging['svlogd_filter']="gzip"# compress logs with gzip logging['svlogd_udp']=nil# transmit log messages via UDP logging['svlogd_prefix']=nil# custom prefix for log messages #logging['logrotate_frequency'] = "daily" # rotate logs daily logging['logrotate_size']="500M"# do not rotate by size by default logging['logrotate_rotate']=30# keep 30 rotated logs logging['logrotate_compress']="compress"# see 'man logrotate' logging['logrotate_method']="copytruncate"# see 'man logrotate' #logging['logrotate_postrotate'] = nil # no postrotate command by default # logging['logrotate_dateformat'] = nil # use date extensions for rotated files rather than numbers e.g. a value of "-%Y-%m-%d" would give rotated files like production.log-2016-03-09.gz ################################################################################ ## Logrotate ##! Docs: https://docs.gitlab.com/omnibus/settings/logs.html#logrotate ##! You can disable built in logrotate feature. ################################################################################ logrotate['enable']=true
tailf /data/gitlab/logs/gitlab-rails/production.log GRPC::Unavailable (14:failed to connect to all addresses. debug_error_string:{"created":"@1654766155.243770117","description":"Failed to pick subchannel","file":"src/core/ext/filters/client_channel/client_channel.cc","file_line":3093,"referenced_errors":[{"created":"@1654766155.243766927","description":"failed to connect to all addresses","file":"src/core/lib/transport/error_utils.cc","file_line":163,"grpc_status":14}]}):
6 证书问题
1
could not create GitLab API client:
7 跳转
如果配置 external_url 是 https,那么访问无法通过 http 请求访问
8 error while dialing: dial tcp: lookup gitaly-d.ccops on 10.1.1.1:53: no such host
使用 dns 解析,没通过 hosts 解析,需要 dns 添加 gitaly-d.ccops 解析