I'm considering a move to Elastic Beanstalk (on account of the pricing). The blockage is that I have no idea how to setup Celery on a python app (Django, in my case) deployed to the service. Has anyone managed to setup celery on Elastic Beanstalk? If so, please let me know how you managed to do it and what tools you used.
1 Answer
Use the SQS service. Read this: Celery with Amazon SQS
and this:
http://docs.celeryproject.org/en/latest/getting-started/brokers/sqs.html
6 Comments
EsseTi
did u manage to have it working? my problem is: how do i run celery on the EB?
GivP
You're not really supposed to run other services like Celery on EB. It's meant to run your main app only. You should probably run your Celery service on a separate EC2 instance. That's what I do, anyway.
Vijay Selvaraj
I am not sure if Beanstalk has changed much since this was initially posted. Looking at their docs looks like you should be able to run daemon processes with beanstalk. You can create a custom AMI with celery daemon configured. I was able to get it to work with a custom AMI using SQS as the broker.
yellowcap
There is also a way of doing this without creating a custom AMI, see my anwer to a similar question: stackoverflow.com/questions/14761468
r.bhardwaj
If a new instance boots due to auto scaling in EB then that new instance will also have celery worker running, in that case is there any chance of multiple execution of same message in SQS ?
|