Closed
Bug 561459
Opened 16 years ago
Closed 16 years ago
[amo] Install RabbitMQ
Categories
(Infrastructure & Operations Graveyard :: WebOps: Other, task)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jbalogh, Assigned: oremj)
References
()
Details
Please install the RabbitMQ server for AMO. You can get source code or rpms from http://www.rabbitmq.com/server.html. It requires Erlang.
We'll want at least one machine acting as the message broker (running rabbitmq). A backup is probably a good idea, but I'm not sure how that works yet. This is Erlang, so it's not supposed to crash anyways.
Once we have the queue running, we'll be using http://github.com/ask/celery/ to manage workers. `./manage.py celeryd` will connect to rabbitmq and wait for tasks. One celeryd creates (# of cpu cores) workers. We can start celeryd on many machines.
celeryd will run from a checkout of zamboni. It will need to connect to rabbitmq, memcached, and the database.
To get set up on my Mac, I did this:
brew install rabbitmq
rabbitmq-server
rabbitmqctl add_user jbalogh foo
rabbitmqctl add_vhost zamboni
rabbitmqctl set_permissions -p zamboni jbalogh '' '.*' '.*'
The commands are from http://ask.github.com/celery/getting-started/broker-installation.html. This is the rabbitmq admin guide: http://www.rabbitmq.com/admin-guide.html. The permissions are (configure, write, read).
The user, password, vhost, and other connection information will be configurable through zamboni's settings_local.py.
Thanks!
| Assignee | ||
Updated•16 years ago
|
Assignee: server-ops → jeremy.orem+bugs
| Reporter | ||
Comment 1•16 years ago
|
||
Munin plugins for rabbitmq: http://github.com/ask/rabbitmq-munin/
| Reporter | ||
Comment 2•16 years ago
|
||
I added our first queue task in http://github.com/jbalogh/zamboni/commit/6f7d29582b86
These are the celery settings you may want to change in settings_local.py: http://github.com/jbalogh/zamboni/commit/6f7d29582b867755fd91996f64707be548416bbf#L4R392
To start a task:
rabbitmq-server &
./manage.py celeryd &
./manage.py cron update_addon_appsupport
rabbitmy-server and celeryd should be daemonized to get this all going properly.
The cronjob adds a bunch of tasks, and they send debug output to the logs. Right now the appsupport table should be empty, and the tasks will slowly fill it up, so that's another way to check if this is going.
celeryd will have to be restarted when we update zamboni to pick up new/edited tasks. I'll look into the best way to do that.
| Reporter | ||
Comment 3•16 years ago
|
||
Oh, and http://github.com/jbalogh/zamboni/commit/c819111f2dc added celery to the requirements file.
| Reporter | ||
Comment 4•16 years ago
|
||
Celery has init.d[1] and supervisord[2] scripts in its contrib module.
[1]: http://github.com/ask/celery/tree/master/contrib/debian/init.d/
[2]: http://github.com/ask/celery/tree/master/contrib/supervisord/
| Assignee | ||
Comment 5•16 years ago
|
||
This is pretty much done. Dave Dash is working on a redhat init script for celeryd.
| Assignee | ||
Comment 6•16 years ago
|
||
I've installed the init script and it seems to be working well.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Component: Server Operations: Web Operations → WebOps: Other
Product: mozilla.org → Infrastructure & Operations
Updated•7 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•