Commit Graph

140 Commits

Author SHA1 Message Date
Robert Speicher 5acb3230ef Add specs for ChangelogOptionParser in bin/changelog 2016-10-31 14:56:20 +00:00
Robert Speicher 03b932df19 Add a bin/changelog script 2016-10-31 14:56:19 +00:00
Yorick Peterse 97731760d7
Re-organize queues to use for Sidekiq
Dumping too many jobs in the same queue (e.g. the "default" queue) is a
dangerous setup. Jobs that take a long time to process can effectively
block any other work from being performed given there are enough of
these jobs.

Furthermore it becomes harder to monitor the jobs as a single queue
could contain jobs for different workers. In such a setup the only
reliable way of getting counts per job is to iterate over all jobs in a
queue, which is a rather time consuming process.

By using separate queues for various workers we have better control over
throughput, we can add weight to queues, and we can monitor queues
better. Some workers still use the same queue whenever their work is
related. For example, the various CI pipeline workers use the same
"pipeline" queue.

This commit includes a Rails migration that moves Sidekiq jobs from the
old queues to the new ones. This migration also takes care of doing the
inverse if ever needed. This does require downtime as otherwise new jobs
could be scheduled in the old queues after this migration completes.

This commit also includes an RSpec test that blacklists the use of the
"default" queue and ensures cron workers use the "cronjob" queue.

Fixes gitlab-org/gitlab-ce#23370
2016-10-21 18:17:07 +02:00
Kamil Trzcinski 7b523eb1a1 Use ENABLE_SPRING to use it by default 2016-06-17 16:54:55 +02:00
Jacob Vosmaer 8a6776caa9 Use 'exec' in Unicorn and Sidekiq launch scripts
When running Unicorn or Sidekiq in the foreground this change removes
an intermediate /bin/sh process. This makes process supervision in the
GitLab Development Kit more reliable.

This change does not affect Omnibus-GitLab (because there we do not
use these launch scripts). Installations from source do use the launch
scripts but for the standard GitLab init script this change will not
make a difference.

Custom installations using Upstart or Systemd may be affected however,
because under certain configurations these systems count exactly how
many forks happen during process startup, and we are reducing that
number by one here.
2016-04-28 12:11:08 +02:00
Robert Speicher fdc8b05ab1 Re-generate Spring binstubs for updated version of Spring
Prevents output like this:

    Array values in the parameter are deprecated. Please use a String or nil.
    An Array was passed in from bin/rspec:3:in `load'
2016-04-22 16:00:56 -04:00
Yorick Peterse a54af831ba
Use rake db:reset instead of db:setup
Using db:reset ensures existing tables are first dropped. This in turn
ensures that we can drop tables regardless of any foreign key
constraints. While CE currently doesn't have any foreign keys EE defines
the following relation:

    remote_mirrors.project_id -> projects.id

MySQL will complain whenever you try to drop the "projects" table first
even when using "DROP TABLE ... CASCADE".
2016-04-14 15:53:54 +02:00
Jacob Vosmaer d28332cc9e Direct sidekiq boot output to log file
This behavior got lost in the previous commit.
2016-01-15 11:12:49 +01:00
Jacob Vosmaer 66f28577ad Improve bin/ launchers 2016-01-14 15:08:15 +01:00
Jacob Vosmaer f3ca92a062 Add 'resume' capability to parallel-rsync-repos 2015-12-08 15:08:22 +01:00
Jacob Vosmaer 6d2be0212c Merge branch 'master' into sync-all-repos 2015-12-08 12:35:54 +01:00
Valery Sizov 9ce8c867ee Fix mailer queue 2015-12-03 15:10:41 +02:00
Valery Sizov 40ff1318d2 Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
Jacob Vosmaer 6479b821eb Add RSYNC variable to parallel-rsync-repos 2015-10-05 18:02:12 +02:00
Jacob Vosmaer 5bcd0efe3e Add parallel-rsync-repos script and start docs 2015-09-25 18:32:02 +02:00
Dmitriy Zaporozhets 0b5d627cd4 Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g 2015-09-09 14:56:02 +02:00
Jacob Vosmaer 1081a322f1 Properly daemonize the mail_room process
The old invocation only worked by accident because we have a '&'
somewhere in the init script for expediency. When ran from a terminal,
the mail_room daemon process ended up in the session of the terminal.
This commit adds a small wrapper that tries to do the textbook
daemonization steps (double fork, setsid etc.) while also taking
care that the pidfile is written before the 'start' process exits.
2015-08-27 16:35:00 +02:00
Douwe Maan 046b283127 Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
Douwe Maan c50e5e68c7 Fix bin/mail_room. 2015-08-19 14:27:47 -07:00
Douwe Maan f3b57ce677 Update init scripts. 2015-08-19 13:58:07 -07:00
Robert Speicher 682d4b6a86 Remove Guard
None of the GitLab B.V. developers were using it.
2015-06-03 20:45:53 -04:00
Robert Speicher 11af51613d Fix bin/rails binstub 2015-05-20 19:52:08 -04:00
Robert Speicher 3601ebda79 Update spring, re-run binstubs 2015-05-20 18:39:33 -04:00
Douwe Maan 85b29f99f0 Make sure Sidekiq picks up archive_repo queue in production. 2015-04-01 14:36:17 +02:00
Jeroen van Baarsen 1446af25b1 Added binstub for guard
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-03-18 19:35:38 +01:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Cyril Rohr 5af05e3d3c Use new way of defining services on packager.io 2015-01-18 17:55:48 +00:00
Marin Jankovski 976eb7a955 Revert "Delete mailer queue" 2014-09-10 15:28:58 +02:00
Jacob Vosmaer 59d2f6db75 Wrap arguments for `[ -z` in double quotes 2014-09-08 14:28:42 +02:00
Jacob Vosmaer 494d15cfde Merge pull request #7258 from presto53/fix_init_scripts_interpreter
change bash to sh in web, background_jobs scripts
2014-09-08 14:22:53 +02:00
Pavel Novitskiy 7dd0646e0d fix bash-ism 2014-07-04 15:46:44 +04:00
Pavel Novitskiy b37247ac31 change bash to sh 2014-07-04 11:45:20 +04:00
ling.su 9c2b046454 Delete mailer queue because we don't use sidekiq_mailer gem and now the mailer queue doesn't exist any more. 2014-07-04 10:51:44 +08:00
Jacob Vosmaer 8e2752f459 Be more selective when killing stray Sidekiqs
Avoid the background_jobs script killing every process with 'sidekiq' in
its argument string (e.g. 'rake gitlab:sidekiq start') by also catching
the number (2) in 'sidekiq 2.14'.
2014-06-12 15:32:47 +02:00
Marin Jankovski 2341cefd6f Move from script to bin directory. 2014-05-27 17:14:41 +02:00
Cyril Rohr 402361afff Setup default gitlab.yml with possibility to override default url via environment variable.
This only applies to packaging with https://pkgr.io.
2014-05-06 11:34:17 +01:00
Cyril Rohr b1d68b6e9b Add .pkgr.yml file for automated packaging on https://pkgr.io 2014-05-06 11:34:17 +01:00
Jeroen van Baarsen 055937c417 Added executable file permission to binstubs 2014-02-20 12:56:22 +01:00
Jeroen van Baarsen 99dc9c6fc9 Inserted spring in the binstubs
Now possible to run:
`bin/rails`
`bin/rspec`
`bin/spinach`
`bin/rake`
2014-02-16 11:22:03 +01:00
Jeroen van Baarsen c35036c091 Rails uses bin folder we forgot to create it when upgrading 2014-02-15 21:03:10 +01:00