Advertisement
arogov

gitlab.rb

Feb 21st, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.21 KB | None | 0 0
  1. ################################################################################
  2. ## Prometheus
  3. ##! Docs: https://docs.gitlab.com/ce/administration/monitoring/prometheus/
  4. ################################################################################
  5.  
  6. # prometheus['enable'] = true
  7. # prometheus['monitor_kubernetes'] = true
  8. # prometheus['username'] = 'gitlab-prometheus'
  9. # prometheus['uid'] = nil
  10. # prometheus['gid'] = nil
  11. # prometheus['shell'] = '/bin/sh'
  12. # prometheus['home'] = '/var/opt/gitlab/prometheus'
  13. # prometheus['log_directory'] = '/var/log/gitlab/prometheus'
  14. # prometheus['rules_files'] = ['/var/opt/gitlab/prometheus/rules/*.rules']
  15. # prometheus['scrape_interval'] = 15
  16. # prometheus['scrape_timeout'] = 15
  17. # prometheus['chunk_encoding_version'] = 2
  18. #
  19. ### Custom scrape configs
  20. #
  21. # Prometheus can scrape additional jobs via scrape_configs. The default automatically
  22. # includes all of the exporters supported by the omnibus config.
  23. #
  24. # See: https://prometheus.io/docs/operating/configuration/#<scrape_config>
  25. #
  26. # Example:
  27. #
  28. # prometheus['scrape_configs'] = [
  29. # {
  30. # 'job_name': 'example',
  31. # 'static_configs' => [
  32. # 'targets' => ['hostname:port'],
  33. # ],
  34. # },
  35. # ]
  36. #
  37. ### Prometheus Memory Management
  38. #
  39. # Prometheus needs to be configured for how much memory is used.
  40. # * This sets the target heap size.
  41. # * This value accounts for approximately 2/3 of the memory used by the server.
  42. # * The recommended memory is 4kb per unique metrics time-series.
  43. # See: https://prometheus.io/docs/operating/storage/#memory-usage
  44. #
  45. # prometheus['target_heap_size'] = (
  46. # # Use 25mb + 2% of total memory for Prometheus memory.
  47. # 26_214_400 + (node['memory']['total'].to_i * 1024 * 0.02 )
  48. # ).to_i
  49. #
  50. # prometheus['flags'] = {
  51. # 'storage.local.path' => "#{node['gitlab']['prometheus']['home']}/data",
  52. # 'storage.local.chunk-encoding-version' => user_config['chunk-encoding-version'],
  53. # 'storage.local.target-heap-size' => node['gitlab']['prometheus']['target-heap-size'],
  54. # 'config.file' => "#{node['gitlab']['prometheus']['home']}/prometheus.yml"
  55. # }
  56.  
  57. ##! Advanced settings. Should be changed only if absolutely needed.
  58. # prometheus['listen_address'] = 'localhost:9090'
  59.  
  60. ################################################################################
  61. ## GitLab Workhorse
  62. ##! Docs: https://gitlab.com/gitlab-org/gitlab-workhorse/blob/master/README.md
  63. ################################################################################
  64.  
  65. # gitlab_workhorse['enable'] = true
  66. # gitlab_workhorse['ha'] = false
  67. # gitlab_workhorse['listen_network'] = "unix"
  68. # gitlab_workhorse['listen_umask'] = 000
  69. # gitlab_workhorse['listen_addr'] = "/var/opt/gitlab/gitlab-workhorse/socket"
  70. # gitlab_workhorse['auth_backend'] = "http://localhost:8080"
  71.  
  72. ##! the empty string is the default in gitlab-workhorse option parser
  73. # gitlab_workhorse['auth_socket'] = "''"
  74.  
  75. ##! put an empty string on the command line
  76. # gitlab_workhorse['pprof_listen_addr'] = "''"
  77.  
  78. # gitlab_workhorse['prometheus_listen_addr'] = "localhost:9229"
  79.  
  80. # gitlab_workhorse['dir'] = "/var/opt/gitlab/gitlab-workhorse"
  81. # gitlab_workhorse['log_directory'] = "/var/log/gitlab/gitlab-workhorse"
  82. # gitlab_workhorse['proxy_headers_timeout'] = "1m0s"
  83.  
  84. ##! limit number of concurrent API requests, defaults to 0 which is unlimited
  85. # gitlab_workhorse['api_limit'] = 0
  86.  
  87. ##! limit number of API requests allowed to be queued, defaults to 0 which
  88. ##! disables queuing
  89. # gitlab_workhorse['api_queue_limit'] = 0
  90.  
  91. ##! duration after which we timeout requests if they sit too long in the queue
  92. # gitlab_workhorse['api_queue_duration'] = "30s"
  93.  
  94. ##! Long polling duration for job requesting for runners
  95. # gitlab_workhorse['api_ci_long_polling_duration'] = "60s"
  96.  
  97. ##! Log format: default is text, can also be json or none.
  98. # gitlab_workhorse['log_format'] = "json"
  99.  
  100. # gitlab_workhorse['env'] = {
  101. # 'PATH' => "/opt/gitlab/bin:/opt/gitlab/embedded/bin:/bin:/usr/bin"
  102. # }
  103.  
  104. ################################################################################
  105. ## GitLab Unicorn
  106. ##! Tweak unicorn settings.
  107. ##! Docs: https://docs.gitlab.com/omnibus/settings/unicorn.html
  108. ################################################################################
  109.  
  110. # unicorn['worker_timeout'] = 60
  111. ###! Minimum worker_processes is 2 at this moment
  112. ###! See https://gitlab.com/gitlab-org/gitlab-ce/issues/18771
  113. # unicorn['worker_processes'] = 2
  114.  
  115. ### Advanced settings
  116. # unicorn['listen'] = 'localhost'
  117. # unicorn['port'] = 8080
  118. # unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
  119. # unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid'
  120. # unicorn['tcp_nopush'] = true
  121. # unicorn['backlog_socket'] = 1024
  122.  
  123. ###! **Make sure somaxconn is equal or higher then backlog_socket**
  124. # unicorn['somaxconn'] = 1024
  125.  
  126. ###! **We do not recommend changing this setting**
  127. # unicorn['log_directory'] = "/var/log/gitlab/unicorn"
  128.  
  129. ### **Only change these settings if you understand well what they mean**
  130. ###! Docs: https://about.gitlab.com/2015/06/05/how-gitlab-uses-unicorn-and-unicorn-worker-killer/
  131. ###! https://github.com/kzk/unicorn-worker-killer
  132. # unicorn['worker_memory_limit_min'] = "400 * 1 << 20"
  133. # unicorn['worker_memory_limit_max'] = "650 * 1 << 20"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement