Skip to content

Repository files navigation

Shinobi CCTV Application Deployment on Kubernetes

Kubernetes Docker MySQL NFS

Overview

Deployed the Shinobi CCTV application on a Kubernetes cluster with a connected MySQL database. The setup includes NFS-backed PersistentVolumes for the application, database, and livestreams — each with 5GB allocated — along with Kubernetes Secrets for credential management and full post-deployment configuration.

Architecture

Architecture Diagram

The deployment consists of:

  • NFS PersistentVolumes for Shinobi app data, MySQL data, and livestream storage (5GB each)
  • PersistentVolumeClaims bound to each PV
  • Kubernetes Secret storing Shinobi application credentials
  • MySQL Deployment + ClusterIP Service
  • Shinobi Deployment + Service
  • Post-deployment configuration via exec into the Shinobi pod

Tech Stack

Layer Technology
Container orchestration Kubernetes
Application Shinobi CCTV
Database MySQL
Storage NFS PersistentVolumes (5GB each)
Credential management Kubernetes Secrets
Networking Kubernetes Services (ClusterIP)

What Was Built

1. NFS PersistentVolumes

  • Created 3 PVs using NFS as the storage backend — one each for Shinobi app data, MySQL data, and Shinobi livestreams
  • Each volume allocated 5GB storage capacity

2. PersistentVolumeClaims

  • Deployed PVCs for Shinobi, MySQL, and Streams
  • Each PVC bound to its corresponding NFS PV

3. Kubernetes Secret

  • Stored Shinobi application credentials securely as a Kubernetes Secret
  • Referenced in the Shinobi Deployment via secretKeyRef

4. MySQL Deployment + Service

  • Deployed MySQL with the PVC mounted for data persistence
  • Exposed internally via ClusterIP Service

5. Shinobi Deployment + Service

  • Deployed Shinobi CCTV application with PVCs mounted for app data and livestreams
  • Connected to MySQL via environment variables
  • Exposed via Kubernetes Service

6. Post-deployment configuration

  • Exec'd into the Shinobi pod to complete application prerequisites
  • See instructions.txt for the full setup steps

Project Structure

03-shinobiApplication-DEVOPS/
├── secret.yaml             (Shinobi credentials)
├── deployments-services.yaml   (MySQL + Shinobi Deployments + Services)
├── persistent-volumes.yaml (PV's for MySQL + Shinobi)
├── persistent-volume-claims.yaml (PVC's for MySQL + Shinobi logs/streams)
└── README.md

Post-Deployment Setup

After deploying all manifests, exec into the Shinobi pod to complete configuration:

kubectl exec -it <shinobi-pod-name> -- /bin/bash

Refer to instructions.txt in this repo for the full list of commands to run inside the pod.

Key Learnings

  • Configuring NFS-backed PersistentVolumes in Kubernetes for stateful applications
  • Managing multiple PVCs for different storage concerns within the same application
  • Connecting a CCTV application to a MySQL backend via Kubernetes-native networking
  • Post-deployment configuration via kubectl exec for applications that require runtime setup

About

Shinobi CCTV app deployed on Kubernetes — NFS PersistentVolumes for app, database and livestreams, MySQL backend, Kubernetes Secrets, full post-deployment config via kubectl exec.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors