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

[Helm] Updated helm install docs based on new issues #6476

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## \[Unreleased]
### Added

- Multi-line text attributes supported (<https://github.com/opencv/cvat/pull/6458>)
- \[SDK\] A `DeferredTqdmProgressReporter` class, which doesn't have glitchy output
like `TqdmProgressReporter` in certain circumstances
(<https://github.com/opencv/cvat/pull/6556>)
- Updated helm deploy documentation (<https://github.com/opencv/cvat/pull/6476>)


### Changed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ helm dependency update
echo "$(minikube ip) cvat.local" | sudo tee -a /etc/hosts
```

Note for Microk8s use:
The external ip should be the ip from the cluster you are running cvat from, you can obtain it using ```microk8s config```. Make sure to add it to the hosts file as mentioned above.
```sh
echo "<your microk8s cluster ip> cvat.local" | sudo tee -a /etc/hosts
```


## Configuration
1. Create `values.override.yaml` file inside `helm-chart` directory.
1. Fill `values.override.yaml` with new parameters for chart.
Expand Down Expand Up @@ -165,7 +172,7 @@ Execute following command from repo root directory
HELM_RELEASE_NAMESPACE="<desired_namespace>" &&\
HELM_RELEASE_NAME="<release_name>" &&\
BACKEND_POD_NAME=$(kubectl get pod --namespace $HELM_RELEASE_NAMESPACE -l tier=backend,app.kubernetes.io/instance=$HELM_RELEASE_NAME -o jsonpath='{.items[0].metadata.name}') &&\
kubectl exec -it --namespace $HELM_RELEASE_NAMESPACE $BACKEND_POD_NAME -c cvat-backend-app-container -- python manage.py createsuperuser
kubectl exec -it --namespace $HELM_RELEASE_NAMESPACE $BACKEND_POD_NAME -c cvat-app-backend-server-container -- python manage.py createsuperuser
```
## FAQ

Expand Down Expand Up @@ -319,3 +326,32 @@ cvat:
claimName: my-claim-name

```

### Im receiving service unavailable errors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, that could be misleading, because there is a lot of other options exists why it is happening

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, i aggree, the wording is vague, maybe something "Website not loading after running helm install, but redis opa and postgresql are running" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thinking more like:

### Im receiving service unavailable errors
There could be multiple explanations for that, but generally that is because your ingress controller do not recieve response from backend, some possible explanations are 
1. Server is down:
  A. your volume is RWO instead of RWX
  B. your DB is not responding
2. Service do not see pod:
  A. Check labels on pods
  B. Check label selector on service
3. 
####

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good feedback, i improved it

There could be multiple explanations for that, a hint can often be found by inspecting the logs of the running pods, some possible explanations are
1. Pod multi attach errors:

This can happen when running cvat using helm chart in a production environment. Pods can get scheduled to run on different nodes, however the same volume using ReadWriteOnce can only be accessed from one node at a time. You can either change the volume access mode from ReadWriteOnce to ReadWriteMany if your volume supports it, or add pod affinity rules to all the backend pods in the cvat values.yaml file to make sure they are all scheduled on the same node like so:
```yaml
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: tier
operator: In
values:
- backend
topologyKey: "kubernetes.io/hostname"
```
2. your DB is not responding, ( database errors like health_check not found etc)

It is possible that the migrations did not run automatically, you may need to run them manually:
```sh
HELM_RELEASE_NAMESPACE="<desired_namespace>" &&\
HELM_RELEASE_NAME="<release_name>" &&\
BACKEND_POD_NAME=$(kubectl get pod --namespace $HELM_RELEASE_NAMESPACE -l tier=backend,app.kubernetes.io/instance=$HELM_RELEASE_NAME -o jsonpath='{.items[0].metadata.name}') &&\
kubectl exec -it --namespace $HELM_RELEASE_NAMESPACE $BACKEND_POD_NAME -c cvat-app-backend-server-container -- python manage.py migrate &&\
kubectl exec -it --namespace $HELM_RELEASE_NAMESPACE $BACKEND_POD_NAME -c cvat-app-backend-server-container -- python manage.py health_check
```