Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Celery chart for Helm #4213

Open
thedrow opened this issue Aug 18, 2017 · 21 comments
Open

Add a Celery chart for Helm #4213

thedrow opened this issue Aug 18, 2017 · 21 comments

Comments

@thedrow
Copy link
Member

thedrow commented Aug 18, 2017

Kubernetes is a very common deployment target these days.
The most common way to deploy an application to Kubernetes is using the Helm package manager.
We need to create a public chart and contribute it to the main charts repository.

@thedrow
Copy link
Member Author

thedrow commented Aug 18, 2017

See #4079 (comment) regarding implementing both the livenessProbe and the readinessProbe.

@gsemet
Copy link

gsemet commented Nov 21, 2017

+1 for a template for such chart.

@auvipy auvipy added this to the v5.0.0 milestone Dec 19, 2017
@lightclient
Copy link

Was there ever any progress on this?

@thedrow
Copy link
Member Author

thedrow commented Jan 19, 2019

Not yet. I will try to do this in the next version.

@gsemet
Copy link

gsemet commented Jan 19, 2019

For information, I did an airflow chart based on celery, but I think there could be much more in a celery chart (multi queue, autoscaler,...)

@brianwawok
Copy link

For what it's worth, a lot of us that use k8s do not like helm.

Getting a nice docker image for celery would be great and help a bunch of different use cases.

Helm is basically some yaml that would be glued on TOP of the docker image, and IMHO is not that valuable. I suspect helm will slowly die out as people move away, unless perhaps there is a big revamp that fixes all the "bad" parts of helm.

@gsemet
Copy link

gsemet commented Apr 8, 2019

The big upside of helm is the community. You need a rabbitMQ production ready in your cluster? Helm install. You need to embeded rabbit + reddis + ... in your own chart ? => helm dependency build. In short you do not reimplement everything, you reuse a lot what already exists in your own chart.

Our Airflow package embeds celery, but also reuse reddis chart for example, so that I do not have to reimplement the deployment. Same for postgresQL. And if people wants to use their own instance (DBaaS) they could without having to rewrite the deployment.

That's very underevaluated. This is what makes helm the defacto standard for the moment, not the template things others do, in a mucher simpler way (kustomize, ksonnet,...).
In short helm is:

  • template (easy to have)
  • tiller (much disliked, but helps a lot continuous deployement)
  • package reuse
  • good community and lot of good practices docs to write portable deployment recipes (charts).

Worth a try.

@brianwawok
Copy link

The problem with Helm, is the 75% problem. Often a chart solves 75% of your problem. Missing some flags that you need? Make a PR. Some new issue with a chart? Make a PR or do a local hack. It ends up taking much much more time to "fix" a chart, compared to just creating your own k8s yamls.

This is a much bigger topic than this issue, so perhaps not the right forum for it. But google around and you will see a lot of people that dipped toes in Helm have left, it does not seem to much a lot of momentum going forward.

Either way - To use helm you need a good docker image. For me to create my own deployment yaml, I need a good docker image. So the next step in either case is to create good docker images ;) If people want to ALSO create a helm chart - more power to them (but I won't use it). But I might indeed consider a docker image if made well.

@gsemet
Copy link

gsemet commented Apr 8, 2019

I agree. Making a docker image is not difficult (we do have celery in several docker images here). BUT making a generic one is really tricky indeed.

@ClementGautier
Copy link

ClementGautier commented Apr 8, 2019

👋 Helm user here. I must say that having a helm chart ease a lot the deployment (I just hit this issue while trying to package a big app that use celery). I would have loved to see an actively maintained chart with production ready examples and real life feedbacks ^^"

I might draft one in the following days and, if it doesn't get too uggly, I might open source it if you don't might (I would be happy to share ownership as I have no experience whatsoever with celery). Also, if you consider publishing a chart, I highly suggest hosting your own repo and publish your chart on https://hub.helm.sh/ (So you don't need to go through all the validation process of publishing under the helm/kubernetes organization on github).

Edit: Don't get me wrong: I'm also not very happy with the state of helm as it is now, like many helm users but the draft for helm v3 dropping tiller and moving to an operator pattern will hopefully make everyone happy :D

@desaintmartin
Copy link

desaintmartin commented Apr 9, 2019

As a maintainer for Helm Charts like redis, rabbitmq, etc, and heavy user of celery deployed using helm (currently ~100 celery pods running in prod), here are my two five cents:

1/ A good docker image is a must-have and comes before a good helm chart. A good Docker image does not necessarily means complex; it can be a few lines long.
2/ People are using more and more helm, in fact it seems like it is becoming the de-facto standard to deploy things in kube
3/ Helm itself is far from perfect and writing templates of yaml using even-weirder-than-jinja2-language can be a pain in the ass for complex things, but it should improve with helm 3.
4/ Helm charts are currently centralized in charts.git but are going to be decentralized soon (link already given here)
5/ I would be happy to review a celery helm chart either in charts.git or in a celery-controlled repository.

Edit: after some discussion with some member here, I realize that to use celery, one has to package its code onto the docker image, so one needs to rebuild for each project/commit the docker image. In this case, maybe all that Celery can do is create a base "abstract" image to be "inherited" by custom-celery-image-with-code that would just do some pip install. Or maybe there is no possible generic "celery" Docker at all...

@auvipy auvipy modified the milestones: v5.0.0, 4.6 May 10, 2019
@auvipy auvipy self-assigned this Oct 29, 2019
@gautamp8
Copy link

Is there any progress/update on this?

I was wondering if Celery would like to see the adopt operator pattern in addition to the Helm chart. Let me know if I should create a separate issue for the same.

I built a very much POC(https://github.com/brainbreaker/Celery-Kubernetes-Operator) of Celery operator for solving the manual steps needed to manage celery clusters at my work.

There's also a discussion going on at celery/ceps#24 for the same. I'm willing to commit a certain number of hours every week to build a production-ready version of the Operator. But I'd need inputs from the community around what will be the requirements, production use cases/opportunities that the operator needs to solve.

I also presented this operator POC in my recent talk at EuroPython 2020(Slides link - https://bit.ly/europython20-ppt) around automating the management of Kubernetes infra while staying in the Python ecosystem.

@thedrow
Copy link
Member Author

thedrow commented Jul 26, 2020

Is there any progress/update on this?

I was wondering if Celery would like to see the adopt operator pattern in addition to the Helm chart. Let me know if I should create a separate issue for the same.

I built a very much POC(https://github.com/brainbreaker/Celery-Kubernetes-Operator) of Celery operator for solving the manual steps needed to manage celery clusters at my work.

There's also a discussion going on at celery/ceps#24 for the same. I'm willing to commit a certain number of hours every week to build a production-ready version of the Operator. But I'd need inputs from the community around what will be the requirements, production use cases/opportunities that the operator needs to solve.

I also presented this operator POC in my recent talk at EuroPython 2020(Slides link - https://bit.ly/europython20-ppt) around automating the management of Kubernetes infra while staying in the Python ecosystem.

Yes, we're planning to replace celery multi which is very primitive with a concept of a controller.
The purpose of the controller is to be able to manage the deployment on multiple platforms. You can read more about it in celery/ceps#27.

@Brainbreaker If you have experience with Celery and you need that kind of thing at work I suggest you help us.
We're working on the next generation of Celery.

@auvipy
Copy link
Member

auvipy commented Jul 27, 2020

Is there any progress/update on this?

I was wondering if Celery would like to see the adopt operator pattern in addition to the Helm chart. Let me know if I should create a separate issue for the same.

I built a very much POC(https://github.com/brainbreaker/Celery-Kubernetes-Operator) of Celery operator for solving the manual steps needed to manage celery clusters at my work.

There's also a discussion going on at celery/ceps#24 for the same. I'm willing to commit a certain number of hours every week to build a production-ready version of the Operator. But I'd need inputs from the community around what will be the requirements, production use cases/opportunities that the operator needs to solve.

I also presented this operator POC in my recent talk at EuroPython 2020(Slides link - https://bit.ly/europython20-ppt) around automating the management of Kubernetes infra while staying in the Python ecosystem.

I am checking your work. feel free to ping if you want me to collaborate on that effort

@gautamp8
Copy link

@Brainbreaker If you have experience with Celery and you need that kind of thing at work I suggest you help us.
We're working on the next generation of Celery.

I'd love to. I'm not an expert with Celery internals right now but willing to explore and learn. We use it at our work for various asynchronous workloads and there are pain points of managing all the workers, flower, and scaling things across multiple celery use cases.

I am checking your work. feel free to ping if you want me to collaborate on that effort

Thanks, @auvipy. Code is certainly not the best quality right now so please bear with that. I'll definitely need your inputs.

@thedrow Also, please correct me if I'm understanding wrong - The Controller concept we're introducing in Celery 5 will be platform agnostic, and then we'll provide packages(Platform manager), one of which could be the Kubernetes Operator which will be using that controller internally.

@auvipy
Copy link
Member

auvipy commented Jul 28, 2020

@Brainbreaker If you have experience with Celery and you need that kind of thing at work I suggest you help us.
We're working on the next generation of Celery.

I'd love to. I'm not an expert with Celery internals right now but willing to explore and learn. We use it at our work for various asynchronous workloads and there are pain points of managing all the workers, flower, and scaling things across multiple celery use cases.

I am checking your work. feel free to ping if you want me to collaborate on that effort

Thanks, @auvipy. Code is certainly not the best quality right now so please bear with that. I'll definitely need your inputs.

@thedrow Also, please correct me if I'm understanding wrong - The Controller concept we're introducing in Celery 5 will be platform agnostic, and then we'll provide packages(Platform manager), one of which could be the Kubernetes Operator which will be using that controller internally.

you can currently start with celery 4.4.x and later when the celery 5 enters in rc1 stage we can move the effort to that. (I expect 6-8 months more around)

@thedrow
Copy link
Member Author

thedrow commented Jul 28, 2020

@Brainbreaker If you have experience with Celery and you need that kind of thing at work I suggest you help us.
We're working on the next generation of Celery.

I'd love to. I'm not an expert with Celery internals right now but willing to explore and learn. We use it at our work for various asynchronous workloads and there are pain points of managing all the workers, flower, and scaling things across multiple celery use cases.

I am checking your work. feel free to ping if you want me to collaborate on that effort

Thanks, @auvipy. Code is certainly not the best quality right now so please bear with that. I'll definitely need your inputs.
@thedrow Also, please correct me if I'm understanding wrong - The Controller concept we're introducing in Celery 5 will be platform agnostic, and then we'll provide packages(Platform manager), one of which could be the Kubernetes Operator which will be using that controller internally.

you can currently start with celery 4.4.x and later when the celery 5 enters in rc1 stage we can move the effort to that. (I expect 6-8 months more around)

No actually we're close to releasing an RC.
Celery 5 drops Python 2 support which already provides plenty of things that can go wrong and provides a new CLI.
We'll get async one Celery 6 and proceed from there.

@thedrow
Copy link
Member Author

thedrow commented Jul 28, 2020

@Brainbreaker If you have experience with Celery and you need that kind of thing at work I suggest you help us.
We're working on the next generation of Celery.

I'd love to. I'm not an expert with Celery internals right now but willing to explore and learn. We use it at our work for various asynchronous workloads and there are pain points of managing all the workers, flower, and scaling things across multiple celery use cases.

I am checking your work. feel free to ping if you want me to collaborate on that effort

Thanks, @auvipy. Code is certainly not the best quality right now so please bear with that. I'll definitely need your inputs.

@thedrow Also, please correct me if I'm understanding wrong - The Controller concept we're introducing in Celery 5 will be platform agnostic, and then we'll provide packages(Platform manager), one of which could be the Kubernetes Operator which will be using that controller internally.

I was actually thinking that the Controller becomes a Kubernetes Operator when it is deployed in k8s.
You need to install the platform manager for k8s and that's it.

@auvipy auvipy modified the milestones: 4.6, 5.1.0 Dec 30, 2020
@auvipy auvipy removed this from the 5.1.0 milestone Feb 18, 2021
@auvipy auvipy added this to the 6.0.0 milestone Feb 18, 2021
@auvipy
Copy link
Member

auvipy commented Feb 18, 2021

after some discussion with some member here, I realize that to use celery, one has to package its code onto the docker image, so one needs to rebuild for each project/commit the docker image. In this case, maybe all that Celery can do is create a base "abstract" image to be "inherited" by custom-celery-image-with-code that would just do some pip install. Or maybe there is no possible generic "celery" Docker at all...

this is what we should investigate too.

@gsemet
Copy link

gsemet commented Feb 18, 2021

you can easily gitsync your code pretty easily, we do that for airflow.

@dilipk8
Copy link

dilipk8 commented Jan 19, 2024

Is there any official Celery helm chart ? Or Any celery helm chart /Kubernetes yamls that can be used to deploy Celery on Kubernetes ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants