forked from external-repos/noisedash
Kubernetes Manifest install
This commit is contained in:
committed by
Kevin Thomas
parent
1c3f09fcb8
commit
0618f9e8d6
17
README.md
17
README.md
@@ -34,6 +34,23 @@ docker-compose up -d
|
|||||||
|
|
||||||
(Raspberry Pi compatible images are available, see armv7 images on [Docker Hub](https://hub.docker.com/repository/docker/noisedash/noisedash))
|
(Raspberry Pi compatible images are available, see armv7 images on [Docker Hub](https://hub.docker.com/repository/docker/noisedash/noisedash))
|
||||||
|
|
||||||
|
## Kubernetes
|
||||||
|
|
||||||
|
You can apply the manifest.yaml in the kubernetes folder to install Noisedash into your Kubernetes cluster.
|
||||||
|
|
||||||
|
Optionally, uncomment the last lines in the file to also create an ingress. The ingress, commented out by default, needs to have the clusterIssuser annotation set to your cluster issuer (default: letsencrypt-prod) and the ingress class set to your Ingress class (default: Nginx)
|
||||||
|
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
$ kubectl apply -f ./kubernetes/manifest.yaml
|
||||||
|
persistentvolumeclaim/db-pvc created
|
||||||
|
persistentvolumeclaim/samples-pvc created
|
||||||
|
deployment.apps/noisedash created
|
||||||
|
service/noisedash created
|
||||||
|
configmap/noisedashcfg created
|
||||||
|
ingress.networking.k8s.io/noisedashingress created
|
||||||
|
```
|
||||||
|
|
||||||
## From Source
|
## From Source
|
||||||
|
|
||||||
Requires node 16 and npm
|
Requires node 16 and npm
|
||||||
|
|||||||
240
kubernetes/manifest.yaml
Normal file
240
kubernetes/manifest.yaml
Normal file
@@ -0,0 +1,240 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: db-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: samples-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: noisedash
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: noisedash
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: noisedash
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: noisedash
|
||||||
|
image: noisedash/noisedash:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 1432
|
||||||
|
volumeMounts:
|
||||||
|
- name: db
|
||||||
|
mountPath: /var/noisedash/db
|
||||||
|
- name: samples
|
||||||
|
mountPath: /var/noisedash/samples
|
||||||
|
- name: config
|
||||||
|
mountPath: /var/noisedash/config/default.json
|
||||||
|
subPath: config.json
|
||||||
|
volumes:
|
||||||
|
- name: db
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: db-pvc
|
||||||
|
- name: samples
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: samples-pvc
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: noisedashcfg
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: noisedash
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: noisedash
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 1432
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: noisedashcfg
|
||||||
|
data:
|
||||||
|
config.json: |
|
||||||
|
{
|
||||||
|
"Server": {
|
||||||
|
"listeningPort": 1432,
|
||||||
|
"sessionFileStorePath": "sessions",
|
||||||
|
"sampleUploadPath": "samples",
|
||||||
|
"maxSampleSize": 10737418240,
|
||||||
|
"logFile": "log/noisedash.log",
|
||||||
|
"tls": false,
|
||||||
|
"tlsKey": "certs/key.pem",
|
||||||
|
"tlsCert": "certs/cert.pem"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
kubernetes.io/ingress.class: nginx
|
||||||
|
kubernetes.io/tls-acme: "true"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||||
|
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: noisedash
|
||||||
|
name: noisedashingress
|
||||||
|
spec:
|
||||||
|
rules:
|
||||||
|
- host: noisedash.freshbrewed.science
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: noisedash
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- noisedash.freshbrewed.science
|
||||||
|
secretName: noisedash-tls
|
||||||
|
builder@DESKTOP-QADGF36:~/Workspaces/pyplanereport$
|
||||||
|
builder@DESKTOP-QADGF36:~/Workspaces/pyplanereport$ cat noiseall.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: db-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: samples-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: noisedash
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: noisedash
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: noisedash
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: noisedash
|
||||||
|
image: noisedash/noisedash:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 1432
|
||||||
|
volumeMounts:
|
||||||
|
- name: db
|
||||||
|
mountPath: /var/noisedash/db
|
||||||
|
- name: samples
|
||||||
|
mountPath: /var/noisedash/samples
|
||||||
|
- name: config
|
||||||
|
mountPath: /var/noisedash/config/default.json
|
||||||
|
subPath: config.json
|
||||||
|
volumes:
|
||||||
|
- name: db
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: db-pvc
|
||||||
|
- name: samples
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: samples-pvc
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: noisedashcfg
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: noisedash
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: noisedash
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 1432
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: noisedashcfg
|
||||||
|
data:
|
||||||
|
config.json: |
|
||||||
|
{
|
||||||
|
"Server": {
|
||||||
|
"listeningPort": 1432,
|
||||||
|
"sessionFileStorePath": "sessions",
|
||||||
|
"sampleUploadPath": "samples",
|
||||||
|
"maxSampleSize": 10737418240,
|
||||||
|
"logFile": "log/noisedash.log",
|
||||||
|
"tls": false,
|
||||||
|
"tlsKey": "certs/key.pem",
|
||||||
|
"tlsCert": "certs/cert.pem"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# ---
|
||||||
|
# apiVersion: networking.k8s.io/v1
|
||||||
|
# kind: Ingress
|
||||||
|
# metadata:
|
||||||
|
# annotations:
|
||||||
|
# cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
# kubernetes.io/ingress.class: nginx
|
||||||
|
# kubernetes.io/tls-acme: "true"
|
||||||
|
# nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
|
||||||
|
# nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
|
||||||
|
# labels:
|
||||||
|
# app.kubernetes.io/instance: noisedash
|
||||||
|
# name: noisedashingress
|
||||||
|
# spec:
|
||||||
|
# rules:
|
||||||
|
# - host: noisedash.freshbrewed.science
|
||||||
|
# http:
|
||||||
|
# paths:
|
||||||
|
# - backend:
|
||||||
|
# service:
|
||||||
|
# name: noisedash
|
||||||
|
# port:
|
||||||
|
# number: 80
|
||||||
|
# path: /
|
||||||
|
# pathType: ImplementationSpecific
|
||||||
|
# tls:
|
||||||
|
# - hosts:
|
||||||
|
# - noisedash.freshbrewed.science
|
||||||
|
# secretName: noisedash-tls
|
||||||
Reference in New Issue
Block a user