Created
May 8, 2021 13:51
-
-
Save Links2004/201ceb13d28e006bdbf761fa8a4f90e2 to your computer and use it in GitHub Desktop.
running shinobi cctv in a kubernetes cluster
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
labels: | |
app: shinobi-cctv | |
name: shinobi-cctv | |
namespace: cctv | |
data: | |
conf.json: | | |
{ | |
"debugLog": false, | |
"port": 8080, | |
"passwordType": "sha256", | |
"detectorMergePamRegionTriggers": true, | |
"wallClockTimestampAsDefault": true, | |
"addStorage": [ | |
{ | |
"name": "second", | |
"path": "__DIR__/videos2" | |
} | |
], | |
"db": { | |
"host": "localhost", | |
"user": "majesticflame", | |
"password": "", | |
"database": "ccio", | |
"port": 3306 | |
}, | |
"mail": { | |
"service": "gmail", | |
"auth": { | |
"user": "[email protected]", | |
"pass": "your_password_or_app_specific_password" | |
} | |
}, | |
"cron": { | |
"key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
}, | |
"pluginKeys": {}, | |
"cpuUsageMarker": "CPU", | |
"subscriptionId": "sub_XXXXXXXXXXXX", | |
"thisIsDocker": true, | |
"ssl": {}, | |
"p2pServerList": {}, | |
"p2pTargetAuth": "", | |
"p2pApiKey": "", | |
"ip": "0.0.0.0" | |
} | |
super.json: | | |
[ | |
{ | |
"mail":"[email protected]", | |
"pass":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
} | |
] | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: shinobi | |
release: shinobi | |
name: shinobi | |
namespace: cctv | |
spec: | |
replicas: 1 | |
strategy: | |
type: Recreate | |
selector: | |
matchLabels: | |
app: shinobi | |
template: | |
metadata: | |
labels: | |
app: shinobi | |
spec: | |
initContainers: | |
- name: conf-copy | |
image: shinobisystems/shinobi:dev | |
command: | |
- "bash" | |
- "-c" | |
- | | |
cp /config/* /tmp-config/ | |
volumeMounts: | |
- mountPath: /config | |
name: config | |
- mountPath: /tmp-config | |
name: tmp-config | |
containers: | |
- name: shinobi | |
image: shinobisystems/shinobi:dev | |
env: null | |
ports: | |
- containerPort: 8080 | |
volumeMounts: | |
- mountPath: /home/Shinobi/videos | |
name: videos | |
- mountPath: /home/Shinobi/plugins | |
name: plugins | |
- mountPath: /var/lib/mysql | |
name: db | |
- mountPath: /config | |
name: tmp-config | |
- mountPath: /dev/shm | |
name: dshm | |
securityContext: | |
fsGroup: 101 | |
volumes: | |
- name: videos | |
persistentVolumeClaim: | |
claimName: pvc-shinobi-videos | |
- name: db | |
persistentVolumeClaim: | |
claimName: pvc-shinobi-db | |
- name: plugins | |
persistentVolumeClaim: | |
claimName: pvc-shinobi-plugins | |
- configMap: | |
name: shinobi-cctv | |
name: config | |
- name: tmp-config | |
emptyDir: {} | |
- name: dshm | |
emptyDir: | |
medium: Memory | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app: shinobi | |
release: shinobi | |
name: shinobi | |
namespace: cctv | |
spec: | |
ports: | |
- port: 8080 | |
protocol: TCP | |
targetPort: 8080 | |
selector: | |
app: shinobi | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment