kube/camtiler
2024-08-03 06:04:27 +03:00
..
.gitignore Initial commit 2022-08-25 11:22:50 +03:00
application.yml doc: Reword backlink warning 2024-08-03 04:27:31 +03:00
camera-tiler.yml camtiler: Fix scheduling issues 2022-12-23 23:32:18 +02:00
cameras.graphviz.svg camtiler: unify to cam.k-space.ee 2024-08-03 06:04:27 +03:00
ingress.yml camtiler: unify to cam.k-space.ee 2024-08-03 06:04:27 +03:00
logmower.yml fix(camtiler): add temporary ingress for camtiler dedicated s3 2024-02-22 12:43:20 +02:00
mongodb-support.yml Initial commit 2022-08-25 11:22:50 +03:00
mongodb.yml argo config drift: camtiler 2024-08-03 06:04:24 +03:00
mongoexpress.yml Initial commit 2022-08-25 11:22:50 +03:00
network-policies.yml argo config drift: camtiler 2024-08-03 06:04:24 +03:00
networkpolicy-base.yml Initial commit 2022-08-25 11:22:50 +03:00
README.md camtiler: unify to cam.k-space.ee 2024-08-03 06:04:27 +03:00

Cameras

Camtiler is the umbrella name for our homegrown camera surveilance system.

Everything besides Cameras is deployed with Kubernetes.

Components

cameras.graphviz.svg

📸 Camera

Cameras are listed in application.yml as kind: Camera.

Two types of camera hosts:

camera-tiler (cam.k-space.ee/tiled)

Out-of-bound, connects to cameras and streams to web browser.

One instance per every camera

camera-operator

Functionally the same as a kubernetes deployment for camera-tiler.

Operator/deployer for camera-tiler.

camera-motion-detect

Connects to cameras, on motion writes events to Mongo and frames to S3.

cam.k-space.ee (logmower)

Fetches motion-detect events from mongo. Fetches referenced images from S3 (minio).

camtiler-event-broker

MitM between motion-detect -> mongo. Appends S3 URLs to the response.

Kubernetes commands

Apply changes:

kubectl apply -n camtiler \
  -f application.yml \
  -f minio.yml \
  -f mongoexpress.yml \
  -f mongodb-support.yml \
  -f camera-tiler.yml \
  -f logmower.yml \
  -f ingress.yml \
  -f network-policies.yml \
  -f networkpolicy-base.yml

Deploy changes:

kubectl -n camtiler rollout restart deployment.apps/camtiler

Initialize secrets:

kubectl create secret generic -n camtiler mongodb-application-readwrite-password --from-literal="password=$(cat /dev/urandom | base64 | head -c 30)"
kubectl create secret generic -n camtiler mongodb-application-readonly-password --from-literal="password=$(cat /dev/urandom | base64 | head -c 30)"
kubectl create secret generic -n camtiler minio-secrets \
    --from-literal="MINIO_ROOT_USER=root" \
    --from-literal="MINIO_ROOT_PASSWORD=$(cat /dev/urandom | base64 | head -c 30)"
kubectl -n camtiler create secret generic camera-secrets \
    --from-literal=username=... \
    --from-literal=password=...

Restart all deployments:

for j in $(kubectl get deployments -n camtiler -o name); do kubectl rollout restart -n camtiler $j; done