summaryrefslogtreecommitdiff
path: root/config
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'remove-whenever-schedule' into 'master' Robert Speicher2015-12-301-8/+0
|\ | | | | | | | | | | | | Remove unused config/schedule.rb file [ci skip] See merge request !2249
| * We don't use whenever anymore. Lets remove the schedule fileJeroen van Baarsen2015-12-301-8/+0
| | | | | | | | | | | | | | | | | | **Why is this needed?** Not really needed, but having code that is not used around is confusing, so lets remove it Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | Added additional config environmental variables to help Debian packagingGabriel Mazetto2015-12-301-3/+3
|/ | | | | * GITLAB_EMAIL_FROM * GITLAB_EMAIL_DISPLAY_NAME * GITLAB_EMAIL_REPLY_TO
* reCAPTCHA is configurable through Admin Settings, no reload needed.Gabriel Mazetto2015-12-283-18/+0
|
* Merge branch 'relocate-influxdb-settings' into 'master' Yorick Peterse2015-12-282-24/+10
|\ | | | | | | | | | | | | | | | | Move InfluxDB settings to ApplicationSetting This moves the settings from the YAML files to the database. cc @sytses See merge request !2228
| * Move InfluxDB settings to ApplicationSettingrelocate-influxdb-settingsYorick Peterse2015-12-282-24/+10
| |
* | Fixed syntax in gitlab.yml.exampleYorick Peterse2015-12-281-1/+1
| |
* | Merge branch 'restart-settings-are-moved-too' into 'master' Dmitriy Zaporozhets2015-12-281-2/+2
|\ \ | |/ |/| | | | | | | | | Restart settings are moved too. See merge request !2226
| * Restart settings are moved too.Sytse Sijbrandij2015-12-281-2/+2
| |
* | Merge branch 'influxdb' into 'master' Dmitriy Zaporozhets2015-12-282-0/+78
|\ \ | | | | | | | | | | | | | | | | | | Storing of application metrics in InfluxDB This adds support for tracking metrics in InfluxDB, which in turn can be visualized using Grafana. For more information see #2936. See merge request !2042
| * | Added host option for InfluxDBinfluxdbYorick Peterse2015-12-281-0/+1
| | |
| * | Instrument all ActiveRecord model methodsYorick Peterse2015-12-171-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works by searching the raw source code for any references to commonly used ActiveRecord methods. While not bulletproof it saves us from having to list hundreds of methods by hand. It also ensures that (most) newly added methods are instrumented automatically. This _only_ instruments models defined in app/models, should a model reside somewhere else (e.g. somewhere in lib/) it _won't_ be instrumented.
| * | Only track method calls above a certain thresholdYorick Peterse2015-12-171-0/+3
| | | | | | | | | | | | | | | | | | | | | This ensures we don't end up wasting resources by tracking method calls that only take a few microseconds. By default the threshold is 10 milliseconds but this can be changed using the gitlab.yml configuration file.
| * | Instrument Gitlab::Shel and Gitlab::GitYorick Peterse2015-12-171-0/+12
| | |
| * | Use custom code for instrumenting method callsYorick Peterse2015-12-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of ActiveSupport would slow down instrumented method calls by about 180x due to: 1. ActiveSupport itself not being the fastest thing on the planet 2. caller_locations() having quite some overhead The use of caller_locations() has been removed because it's not _that_ useful since we already know the full namespace of receivers and the names of the called methods. The use of ActiveSupport has been replaced with some custom code that's generated using eval() (which can be quite a bit faster than using define_method). This new setup results in instrumented methods only being about 35-40x slower (compared to non instrumented methods).
| * | Storing of application metrics in InfluxDBYorick Peterse2015-12-172-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to write application metrics (e.g. SQL timings) to InfluxDB. These metrics can in turn be visualized using Grafana, or really anything else that can read from InfluxDB. These metrics can be used to track application performance over time, between different Ruby versions, different GitLab versions, etc. == Transaction Metrics Currently the following is tracked on a per transaction basis (a transaction is a Rails request or a single Sidekiq job): * Timings per query along with the raw (obfuscated) SQL and information about what file the query originated from. * Timings per view along with the path of the view and information about what file triggered the rendering process. * The duration of a request itself along with the controller/worker class and method name. * The duration of any instrumented method calls (more below). == Sampled Metrics Certain metrics can't be directly associated with a transaction. For example, a process' total memory usage is unrelated to any running transactions. While a transaction can result in the memory usage going up there's no accurate way to determine what transaction is to blame, this becomes especially problematic in multi-threaded environments. To solve this problem there's a separate thread that takes samples at a fixed interval. This thread (using the class Gitlab::Metrics::Sampler) currently tracks the following: * The process' total memory usage. * The number of file descriptors opened by the process. * The amount of Ruby objects (using ObjectSpace.count_objects). * GC statistics such as timings, heap slots, etc. The default/current interval is 15 seconds, any smaller interval might put too much pressure on InfluxDB (especially when running dozens of processes). == Method Instrumentation While currently not yet used methods can be instrumented to track how long they take to run. Unlike the likes of New Relic this doesn't require modifying the source code (e.g. including modules), it all happens from the outside. For example, to track `User.by_login` we'd add the following code somewhere in an initializer: Gitlab::Metrics::Instrumentation. instrument_method(User, :by_login) to instead instrument an instance method: Gitlab::Metrics::Instrumentation. instrument_instance_method(User, :save) Instrumentation for either all public model methods or a few crucial ones will be added in the near future, I simply haven't gotten to doing so just yet. == Configuration By default metrics are disabled. This means users don't have to bother setting anything up if they don't want to. Metrics can be enabled by editing one's gitlab.yml configuration file (see config/gitlab.yml.example for example settings). == Writing Data To InfluxDB Because InfluxDB is still a fairly young product I expect the worse. Data loss, unexpected reboots, the database not responding, you name it. Because of this data is _not_ written to InfluxDB directly, instead it's queued and processed by Sidekiq. This ensures that users won't notice anything when InfluxDB is giving trouble. The metrics worker can be started in a standalone manner as following: bundle exec sidekiq -q metrics The corresponding class is called MetricsWorker.
* | | Merge branch 'environment-variables-in-the-app' into 'master' Dmitriy Zaporozhets2015-12-282-1/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Environment variables in the app Fixes #3717 and #3519 ## Why environment variables? We need environmental variables, they are an expected way to configure apps https://medium.com/@kelseyhightower/12-fractured-apps-1080c73d481c#.ntrdiyu4c This causes many tools and to tutorials to make it easy to set environmental variables and harder to supply a configuration file. So even though we agree they are not ideal https://support.cloud.engineyard.com/hc/en-us/articles/205407508-Environment-Variables-and-Why-You-Shouldn-t-Use-Them the market has spoken. ## Why for GitLab the application and not for the Omnibus packages? Environmental variables are also needed by people that do not run our Omnibus packages, for example natively bundled apps (Debian apt-get) and idiomatic Docker packages (Mesos, Kubernetes, etc.). Of course it should work great with Omnibus packages too so any advise is welcome in that regard. There is an MR https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/575/diffs to be able to set any variable in gitlab.rb via environmental variables. I think both that and this MR should be merged to solve the configuration problem for both Omnibus and non-Omnibus installations. When both are merged the documentation should be crosslinked. ## Why uppercase? Need to be all cap according to Google Shell guideline: "Constants and Environment Variable Names => All caps, separated with underscores, declared at the top of the file." https://google.github.io/styleguide/shell.xml#Constants_and_Environment_Variable_Names Or as explained on http://stackoverflow.com/a/673940/613240 Keeping to this convention, you can rest assured that you don't need to know every environment variable used by UNIX tools or shells in order to avoid overwriting them. If it's your variable, lowercase it. If you export it, uppercase it. /cc @JobV @DouweM @marin @jacobvosmaer @ayufan @pravi See merge request !2215
| * | | Thanks Robert for the corrections in the environment variables docs.environment-variables-in-the-appSytse Sijbrandij2015-12-281-1/+1
| | |/ | |/|
| * | Add documentation and example file for environent variables.Sytse Sijbrandij2015-12-271-0/+9
| | |
| * | Use environment variables to configure GitLab.Sytse Sijbrandij2015-12-271-1/+1
| | |
* | | Add documentation for using reCAPTCHAadd-recaptcha-supportStan Hu2015-12-271-1/+1
| | |
* | | Add support for Google reCAPTCHA in user registration to prevent spammersStan Hu2015-12-273-0/+19
|/ /
* | Grace period support for TFAGabriel Mazetto2015-12-241-0/+1
| |
* | Hotfix for sidekiq-cron being loaded from Settingslogic with defaultsGabriel Mazetto2015-12-222-2/+6
| |
* | Merge branch 'feature/sidekiq-cron-config' into 'master' Dmitriy Zaporozhets2015-12-224-15/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sidekiq-cron configuration moved to gitlab.yml When `sidekiq-cron` was introduced, jobs configuration where placed in `schedule.yml` file. As discussed in #3928, this is not desirable. We moved it to `gitlab.yml`, exposing only the "cron" part of the configuration. See merge request !2087
| * | Sidekiq-cron configuration moved to gitlab.ymlfeature/sidekiq-cron-configGabriel Mazetto2015-12-144-15/+20
| | |
* | | Merge branch 'admin_add_identity' into 'master' Robert Speicher2015-12-211-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Allow admin to create new user identities Fixes #2442 See merge request !2077
| * | | Allow admin to create new user identitiesDrew Blessing2015-12-151-1/+1
| | | |
* | | | Merge branch 'add_email_unlock' into 'master' Robert Speicher2015-12-211-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow account unlock via email We see a lot of users get confused about what it means when your account gets locked. Many try to reset their password and are still faced with a lockout. With this change, users receive an email that allows them to unlock their account immediately. The previous behavior where the account is auto-unlocked after a time also still works. See merge request !2049
| * | | | Allow account unlock via emailDrew Blessing2015-12-141-2/+2
| |/ / /
* | | | Merge branch 'tduehr/gitlab-ce-cas-support'Douwe Maan2015-12-213-0/+27
|\ \ \ \
| * | | | add CAS authentication supporttduehr2015-12-143-0/+27
| |/ / /
* | | | Backport JIRA serviceDrew Blessing2015-12-181-1/+1
| |_|/ |/| |
* | | Fixed Rubocop offensesGabriel Mazetto2015-12-152-6/+6
|/ /
* | Merge branch 'master' into ci/persist-registration-tokenGrzegorz Bizon2015-12-141-45/+21
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (66 commits) Fix runners admin view Fix migrations Rename mention of gitlab-git-http-server to gitlab-workhorse Bump Redis requirement to 2.8 for Sidekiq 4 requirements Fix wording on runner setup page add details on how to change saml button label Fix tests Move awards back to gray panel and few improvements to sidebar Few UI improvements to new sidebar implementation Fix tests for new issuable sidebar Update changelog Implement new sidebar for merge request page Make edit link on issuable sidebar works Redesign issue page for new sidebar Move awards css to separate file Implement issuable sidebar partial Update CHANGELOG Clarify cache behavior Run builds from projects with enabled CI Use Gitlab::Git instead of Ci::Git ... Conflicts: db/schema.rb
| * \ Merge branch 'ci-project-migrate' into 'master' Kamil Trzciński2015-12-141-34/+21
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ci Project migrate - This doesn't migrate: allow_git_fetch, coverage_regex, timeout. Since this are project configuration settings I would propose to migrate them to `.gitlab-ci.yml`. - This requires offline migrations. - It simplifies database models making all CI objects to be attached to: Project. - It removes Ci::Project, but makes /ci/projects working by adding method: Project.find_by_ci_id for backward compatibility (badges, triggers). - We should add default `timeout` to Application Settings. - It misses specs. - It is based on ci-services-migrate for now. - It removes CI events. - It removes administrator CI projects overview. - It removes CI application settings. In 8.4 or 8.5 we can remove redundant tables and columns. See merge request !1987
| | * | Migrate CI::Project to ProjectKamil Trzcinski2015-12-111-34/+21
| | | |
| * | | Merge branch 'ci-services-migrate' into 'master' Kamil Trzciński2015-12-141-11/+0
| |\ \ \ | | |/ / | | | / | | |/ | |/| | | | | | | Ci Services migrate See merge request !1985
| | * Migrate CI::Services and CI::WebHooks to Services and WebHooksKamil Trzcinski2015-12-101-11/+0
| | |
* | | Add CI runners registration token reset buttonGrzegorz Bizon2015-12-111-0/+1
| | |
* | | Use new runners registration token to register CI runnersGrzegorz Bizon2015-12-111-2/+0
|/ /
* | Upgraded Sidekiq to 4.xfeature/sidekiq-4Gabriel Mazetto2015-12-101-0/+8
|/
* Merge branch 'master' into tmp-reference-pipeline-and-cachingtmp-reference-pipeline-and-cachingDouwe Maan2015-12-104-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # spec/lib/gitlab/markdown/autolink_filter_spec.rb # spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb # spec/lib/gitlab/markdown/commit_reference_filter_spec.rb # spec/lib/gitlab/markdown/cross_project_reference_spec.rb # spec/lib/gitlab/markdown/emoji_filter_spec.rb # spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb # spec/lib/gitlab/markdown/external_link_filter_spec.rb # spec/lib/gitlab/markdown/issue_reference_filter_spec.rb # spec/lib/gitlab/markdown/label_reference_filter_spec.rb # spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb # spec/lib/gitlab/markdown/redactor_filter_spec.rb # spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb # spec/lib/gitlab/markdown/relative_link_filter_spec.rb # spec/lib/gitlab/markdown/sanitization_filter_spec.rb # spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb # spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb # spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb # spec/lib/gitlab/markdown/task_list_filter_spec.rb # spec/lib/gitlab/markdown/upload_link_filter_spec.rb # spec/lib/gitlab/markdown/user_reference_filter_spec.rb
| * Use devise paranoid mode and ensure the same message is returned every timeDrew Blessing2015-12-092-2/+1
| | | | | | | | Skipped CI because it has already passed. Had to rebase due to CHANGELOG.
| * Merge branch 'master' into merge-if-greenDouwe Maan2015-12-092-2/+3
| |\ | | | | | | | | | | | | | | | # Conflicts: # app/controllers/projects/merge_requests_controller.rb # config/routes.rb
| | * Merge branch 'mr-builds' into 'master' Dmitriy Zaporozhets2015-12-091-1/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Builds tab to MR detail page ## Before ![Screen_Shot_2015-12-08_at_13.21.04](/uploads/0d26060bef78f3de076e33439b8a4789/Screen_Shot_2015-12-08_at_13.21.04.png) ## After ![Screen_Shot_2015-12-08_at_13.25.20](/uploads/be7d7fd6d4fc8c5cc366b5b3778b813a/Screen_Shot_2015-12-08_at_13.25.20.png) Fixes #3907 See merge request !2016
| | | * Move Builds tab to the endDouwe Maan2015-12-081-1/+1
| | | |
| | | * Merge branch 'master' into mr-buildsDouwe Maan2015-12-082-1/+2
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # app/controllers/projects/merge_requests_controller.rb # app/views/projects/merge_requests/widget/_heading.html.haml
| | | * | Add Builds tab to MR detail pageDouwe Maan2015-12-081-0/+1
| | | | |
| | * | | Merge branch 'issue-closing-docs' into 'master' Robert Speicher2015-12-081-1/+1
| | |\ \ \ | | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | Update documentation about automatic issue closing RE !1933 See merge request !2000