-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Adding Kuberenetes templates and deployment guide #1962
Conversation
Pull Request Test Coverage Report for Build 7348
💛 - Coveralls |
Hi @Langhalsdino, thanks a lot for your contribution. In our team we think a lot about adding kubernetes or docker swarm support for deployment. I have a few questions and suggestions.
|
Building helm files is in general a good idea and would help to set all the variable such as docker image registry, domains, ...
I could add it to the template. I could not find any examples on how to use nuclio, do you have example models, ... such that i could test the deployment. Lastly do you know the current status of #7 , since referencing official images in the deployment templates makes it way clearer and could prepare the ground for publishing cvat as an official helm chart on helm.sh In general i am not a big fan of having growing pull requests. Therefore i would prefere if we could agree on a certain scope of this issue or maybe split it into multiple once, such that we will see them merged :) |
@Langhalsdino , a couple of examples with nuclio you can find here: https://github.com/opencv/cvat/blob/develop/serverless/deploy.sh What is the reasonable scope for the PR from your point of view? |
I am tempted to split this into two issues and PR. Basic helm chart would include a statefull set of:
The other issue would extend the functionality by adding nuclio support and GPU support for CVAT and Nuclio. What do you think about it @nmanovic |
If the plan is to use Helm, note that Nuclio supports and recommends the Helm chart deployment for production. GPU support is dependent on the provider, for example GKE automatically installs the NVIDIA device plugin daemonset but AKS and EKS require you to install it manually. Also, now that inference is in Nuclio, do we still need to have GPU support in the main CVAT container? |
I know about the plugin deamonset and i would mention it in a Readme, such that every EKS and AKS user will read it after there pods are not being scheduled :D
Thats looks awesome. Then we will not need to split this into two issues and i will just link to their helm repo and add configuration options for connecting to Nuclio.
This will probably make it a lot easier. If the roadmap of CVAT is pursuing a deeper integration of nuclio, i am happy to skipp the GPU part. Since it is different for every platform 🙈 |
That all sounds great! At some point we may also want to support a Kustomize deployment too. |
Why do you want to go for Kustomize, if there is already a helm chart? I can not see the benefits of having both. |
To clarify, I think going with Helm for this phase makes perfect sense. Ideally we'd want to support both. Kustomize is built into We can contribute the Kustomize version at a later time. |
Looks great! Thanks for the contribution. |
@Langhalsdino , should we review the PR again or it is in progress? Could you please fix codacy issues? |
Sorry i got lost in over engineering a helm chart and interrupted by upcoming exams and my thesis. I will fix codacy issues this weekend and open another PR with the helm chart later on. |
@nmanovic I fixed the the issues mentioned in codacy. Regarding the CHANGE.log file. Should i add the changes in the following section or is this done by the repo maintainers? ## [1.1.0-alpha] - 2020-06-30
### Added |
@azhavoro , could you please look at the PR? Do you have any comments? |
@Langhalsdino , sorry for the delay with our review and thanks for the contribution! |
Hi, guys. I have tried deploying nuclio on my Minikube, and tested with CVAT deployed by @Langhalsdino 's YAML templates. The automatic annotation worked well in this way. I made some changes to the YAML templates, just created a service for nuclio in cvat namespace and pointed to nuclio-dashboard service in nuclio namespace, and added no_proxy env for nuclio service to bypass cvat_proxy in |
Could you share you changes, since i would like to include them in my template :) |
Sure. Please check this PR apic-ai#1 |
@azhavoro , could you please work together with @Langhalsdino to merge the PR? I see that CI is failed. But the functionality is really important for our internal infrastructure. Take care about it. |
@jizg thank you for the PR i merged it :) |
Hey @Langhalsdino , thanks for the kubernetes templates, looking really forward to this functionality! When trying, I find that the cvat backend cannot find redis. Backend logs:
Do you know why this could be happening? Update: Here, And in the cvat_redis:
container_name: cvat_redis
image: redis:4.0-alpine
networks:
default:
aliases:
- redis In kubernetes, the service is, however, not reachable under |
@nmanovic I am unable to view the snyk security output and therefore am not sure what failed. Could you share the output with me? |
Hi @fg91 , since you send me an email regarding a different image i am assuming that you resolved the redis issue. In your email you raised the issue that hosting cvat on a specific path of a domain like If it is possible by cvat, i would investigate it further since it should be easily supported by adjusting the templates at a few places. |
7407c68
to
a29c880
Compare
I am really sorry didn't responding to your request. Based on your previous messages i changed a couple of things:
This should cover the above mentioned discussions. |
@azhavoro , need to comment or merge ASAP. |
@azhavoro If you need some assistance to setup a local dev environment or other questions, i am happy to assist. |
@Langhalsdino Great job! I tested the PR and it works for me with minor changes (my comments above). |
Does nuclio work with Kubernetes >= 1.19.x? @Langhalsdino recent commit mentioned it should work with 1.19.x. |
I tested the template with 1.9 and 1.19 and therefore deduce that everything between these versions should work. I will update the README.md to include the feedback by @azhavoro this evening. Since nuclio works for v1.7 or later according to its documentation, there should not be any compatibility issues. |
@Langhalsdino I wasn't able to get nuclio to work with Kubernetes >1.19 because it does not support Containerd. How did you host model containers without nuclio trying to build them? |
Sorry, i did not phrase this correctly, therefore this misunderstanding is my fault. I tested the deployment (part of this PR) with Kubernetes 1.19 and 1.9. Since CVAT works without nuclio this was fine for kubernetes 1.19. Since kubernetes change of using containered was around 1.18, i was suggesting to downgrade your cluster to 1.17, if you would like to use nuclio or wait for nuclio to have fixed this issue. |
LGTM |
actually no, sorry i have the pr almost ready but no time for that. don't
wait for me, when i will have time i will see if my pr is still valid.
…On Mon, Feb 22, 2021 at 10:54 PM Matt Hogan ***@***.***> wrote:
Hi, i just cloned your work. What you are doing is something different
than a template. I used your truly valuable work to build a helm chart
(working with k8s 16+ and the latest endpoints), which is working on cpu
and without further binding to nuclio. I removed some part which were not
necessary to be declared like redis, postgres and nuclio which i pull them
as a chart dependency. The result is a chart with 2 deployments, frontend
and backend.
Is someone interested on us to publish a helm chart? if yes where would be
the most suitable repo to do that ? I don't like code and chart on the same
repo.
I do have difficulties in applying the original yaml files, which needs
many changes and currently still doesn't work for me. so if you can share
the helm chart, that will be awesome!
Hi I will try to create a PR this week. i have to write the README.md and
add some script to install kind k8s sig with the ingress controllers.
Any update on this? I had plans to leverage the manifests provided in this
PR and create a Helm chart as well, but would love to re-use your
submission. I am happy to assist with any missing elements if needed. All
contributions are much appreciated!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1962 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AF5ZGSLU7UERK44N6OKQ42TTALG7XANCNFSM4PMIYBIQ>
.
|
@azhavoro, LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Langhalsdino , thanks for the great contribution!
@Langhalsdino, hi, we've just merged #3102 helm charts, which can easily replace raw k8s templates. Is there any special purpose for k8s templates or its can be removed? |
I following the document and deploy image: openvino/cvat_server:v1.7.0 in my Kubernetes v1.23.8 , and it seems work fine, but when I changed the image: openvino/cvat_server:v2.x.0 , then it showing "Could not check authorization on the server" in the brower. Can someone help me if you can success to upgrade the CVAT server image from v1.x.0 to v2.x.0 and work fine in K8s ? |
Motivation and context
The topic was raised a couple of times in issues like #1087 . Since kubernetes is widely use easy deployment into the kubernetes environment would provide great value to the community and help to get cvat to a wider audience.
Special due to changes like #1641 its now way easier to deploy cvat in a k8s environment.
How has this been tested?
I deployed this in a couple of namespaces with in our cluster (with and without nvida gpu).
Furthermore i did not do any changes to the code, therefore the only real issue was networking. Since i was following the docker-compose.yml closely there where no real challges
Checklist
develop
branchcvat-core, cvat-data and cvat-ui)
License
Feel free to contact the maintainers if that's a concern.