attilagyorffy.com

Running the Gitlab Resque worker on Ubuntu startup

Introduction

Attila Györffy

Attila Györffy

I'm a Ruby/JS dev/trainer with a focus on quality. An ex-Londoner, @terracycle, @ubxd, @lastfm. Follow me at http://twitter.com/attilagyorffy


ubuntu resque gitlab foreman upstart

Running the Gitlab Resque worker on Ubuntu startup

Posted by Attila Györffy on .
Featured

ubuntu resque gitlab foreman upstart

Running the Gitlab Resque worker on Ubuntu startup

Posted by Attila Györffy on .

Perhaps you're also running the Gitlab web front-end via Nginx and Passenger like I do.

You would still want to run the Resque workers in the background. Now the Gitlab project has a Procfile that can be used to export process files to init and upstart scripts.

In order to export the worker process and make sure it will be run automatically ion startup, you would want to run the following:

$ sudo bundle exec foreman export upstart /etc/init --user gitlab --app gitlab --procfile ./Procfile.production --concurrency worker=1

Doing so will allow you to automatically start and stop gitlab workers via Ubuntu's upstart scripts, like the following:

$ sudo start gitlab
gitlab start/running

$ sudo stop gitlab
gitlab stop/waiting

Foreman also allows you to manage individual process types, so the following will also work:

$ sudo start gitlab-worker
gitlab-worker start/running

$ sudo stop gitlab-worker
gitlab-worker stop/waiting
Attila Györffy

Attila Györffy

https://attilagyorffy.com

I'm a Ruby/JS dev/trainer with a focus on quality. An ex-Londoner, @terracycle, @ubxd, @lastfm. Follow me at http://twitter.com/attilagyorffy

View Comments...