GithubHelp home page GithubHelp logo

boilerroomtv / stash-celery-flower Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paqman85/simple-celery-flower-on-heroku

0.0 0.0 0.0 11 KB

A simple Celery Flower project to use on Heroku for monitoring / viewing Celery tasks.

License: MIT License

Procfile 100.00%

stash-celery-flower's Introduction

Monitoring Celery with Flower on Heroku

Flower is a great tool for monitoring Celery processes but sadly cannot be deployed in the same instance as your primary Heroku application. A simple solution is to run Flower on a seperate Heroku instance. This simple project will launch Flower with RabbitMQ to monitor your Celery processes from another project.

It's so simple, we can do it in only a few easy steps:

Step 1 - Get the code!

Clone this repo!

git clone https://github.com/boilerroomtv/stash-celery-flower

Step 2 - Give it a home! Create a new Heroku application

Create a Heroku app for Flower:

On the command line:

  1. Login to Herku:

heroku login

  1. Create a new app for Flower:

heroku create YOUR-DESIRED-APP-NAME-HERE

On Heroku's website

  1. Login to your Heroku account

  2. Create a new application instance from your dashboard

Step 3 - Make the Roots! Set your Broker url.

Flower needs to conenct to your Celery broker url in order to monitor your Celery Processes. This project includes RabbitMQ as a default - so feel free to use your RabbitMQ broker url (Found in the stash config vars within Heroku).

On the Command Line:

heroku config:set BROKER_URL=amqp://... -a YOUR-APP_NAME

On the Heroku Website:

  1. While in your application's dashboard, click on the settings tab.
  2. Click reveal vars button in the Config Vars section
  3. Add a new key and value -- the key is BROKER_URL and the value is the url to your Celery broker for the application you want to monitor... if RabbitMQ it would start with amqp://

Step 4 - Lock The Door! Add some Authentication

The project assumes you want to keep things simple and use Basic Authentication. We simple need to add the username and password to the environment variables.

On the Command Line:

heroku config:set FLOWER_BASIC_AUTH="username:password" -a YOUR-APP_NAME

On the Heroku Website:

  1. Add a new key and value -- the key is FLOWER_BASIC_AUTH and the value is the username and password you want to use to login to Flower. username:password

Step 5 - Deploy!

It's time to deploy!

On the Command Line:

If you don't have git set up yet: git init git status git add . git commit -m "Name your commit

Then set heroku as remote:

heroku git:remote -a YOUR-APP_NAME

And here is the command to push to heroku:

git heroku push master

You can confirm all is working well by checking heroku logs --tail -a YOUR-APP_NAME'

Step 6 - Monitor That Celery!

Now if everything worked out - you should be able to login to your application at your heroku app url and monitor your Celery processes!

stash-celery-flower's People

Contributors

paqman85 avatar jpulec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.