kristof jó gyerek

This commit is contained in:
root 2021-11-23 02:10:41 +01:00
parent 7755488789
commit 8e7baa1e74
8 changed files with 160 additions and 113 deletions

View File

@ -1,31 +1,15 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: birbnetes-nfs-activemq
namespace: birbnetes
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle
nfs:
server: 192.168.100.3
path: /srv/kubedata/birbnetes/activemq
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: activemq-pv-claim
labels:
app: activemq
namespace: birbnetes
spec:
accessModes:
- ReadWriteMany
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 10Gi
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
@ -56,6 +40,13 @@ spec:
envFrom:
- configMapRef:
name: activemq-config
resources:
requests:
memory: "1024Mi"
cpu: "500m"
limits:
memory: "4069Mi"
cpu: "2000m"
volumes:
- name: activemq-volume
persistentVolumeClaim:
@ -98,7 +89,6 @@ spec:
- name: activemq-mqtt
port: 1883
targetPort: 1883
nodePort: 30075
protocol: TCP
selector:
app: activemq

View File

@ -1,61 +1,31 @@
apiVersion: v1
kind: Service
metadata:
name: grafana
namespace: birbnetes
spec:
type: NodePort
ports:
- name: grafana
port: 3000
targetPort: 3000
nodePort: 30070
protocol: TCP
selector:
app: grafana
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: grafana-nfs-pv
namespace: birbnetes
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle
nfs:
server: 192.168.122.20
path: /srv/birbdata/grafana
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafana-nfs-pvc
name: grafana-pvc
namespace: birbnetes
spec:
accessModes:
- ReadWriteMany
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storage: 5Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
labels:
app: grafana
namespace: birbnetes
data:
GF_SERVER_ROOT_URL: "https://luna.sch.bme.hu:30070/"
GF_SERVER_ROOT_URL: "https://birbfana.k8s.kmlabz.com/"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: birbnetes
labels:
app: grafana
spec:
selector:
matchLabels:
@ -67,10 +37,12 @@ spec:
labels:
app: grafana
spec:
securityContext:
fsGroup: 472
volumes:
- name: data
persistentVolumeClaim:
claimName: grafana-nfs-pvc
claimName: grafana-pvc
containers:
- name: grafana
volumeMounts:
@ -82,3 +54,17 @@ spec:
name: grafana
ports:
- containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: grafana
spec:
selector:
app: grafana
ports:
- name: grafana
protocol: TCP
port: 80
targetPort: 3000

76
input-influx.yml Normal file
View File

@ -0,0 +1,76 @@
apiVersion: v1
kind: Service
metadata:
name: input-influx
namespace: birbnetes
spec:
type: ClusterIP
ports:
- port: 8086
targetPort: 8086
protocol: TCP
selector:
app: input-influx
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: input-influxdb
namespace: birbnetes
spec:
selector:
matchLabels:
app: input-influx
strategy:
type: Recreate
replicas: 1
template:
metadata:
labels:
app: input-influx
spec:
containers:
- name: input-influx
image: influxdb
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 8086
envFrom:
- configMapRef:
name: input-influx-config
volumeMounts:
- mountPath: /var/lib/influxdb
name: input-influx-storage
volumes:
- name: input-influx-storage
persistentVolumeClaim:
claimName: input-influx-storage-pv-claim
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: input-influx-storage-pv-claim
labels:
app: input-influx
namespace: birbnetes
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
---
apiVersion: v1
kind: ConfigMap
metadata:
name: input-influx-config
labels:
app: input-influx
namespace: birbnetes
data:
INFLUXDB_DB: input-service
INFLUXDB_USER: output-service
INFLUXDB_USER_PASSWORD: input-service-supersecret
INFLUXDB_READ_USER: grafana
INFLUXDB_READ_USER_PASSWORD: CorrectHorseBatteryStaple

38
input-redis.yaml Normal file
View File

@ -0,0 +1,38 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: input-redis
namespace: birbnetes
labels:
app: input-redis
spec:
selector:
matchLabels:
app: input-redis
strategy:
type: Recreate
template:
metadata:
labels:
app: input-redis
spec:
containers:
- name: input-redis
image: redis
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: input-redis
spec:
selector:
app: input-redis
ports:
- name: input-redis
protocol: TCP
port: 6379
targetPort: 6379

View File

@ -1,19 +1,4 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: birbnetes-nfs-model-minio
namespace: birbnetes
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle
nfs:
server: 192.168.100.3
path: /srv/kubedata/birbnetes/model_minio
---
apiVersion: v1
kind: Service
metadata:
name: model-minio
@ -30,14 +15,15 @@ spec:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: birbnetes-nfs-model-minio
name: pvc-minio-model
namespace: birbnetes
spec:
storageClassName: longhorn
accessModes:
- ReadWriteMany
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storage: 3Gi
---
apiVersion: v1
kind: ConfigMap
@ -69,13 +55,13 @@ spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: birbnetes-nfs-model-minio
claimName: pvc-minio-model
containers:
- name: model-minio
volumeMounts:
- name: data
- name: data
mountPath: "/data"
image: minio/minio:RELEASE.2020-03-25T07-03-04Z
image: minio/minio:latest
args:
- server
- /data

View File

@ -46,21 +46,6 @@ spec:
persistentVolumeClaim:
claimName: output-influx-storage-pv-claim
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: birbnetes-nfs-output-influx
namespace: birbnetes
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Recycle
nfs:
server: 192.168.100.3
path: /srv/kubedata/birbnetes/outflux
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
@ -69,11 +54,12 @@ metadata:
app: output-influx
namespace: birbnetes
spec:
storageClassName: longhorn
accessModes:
- ReadWriteMany
- ReadWriteOnce
resources:
requests:
storage: 10Gi
storage: 2Gi
---
apiVersion: v1
kind: ConfigMap

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install --set persistence.size=10Gi birb-rabbitmq bitnami/rabbitmq --namespace birbnetes
helm install --set persistence.size=2Gi birb-rabbitmq bitnami/rabbitmq --namespace birbnetes
echo "Password : $(kubectl get secret --namespace birbnetes birb-rabbitmq -o jsonpath="{.data.rabbitmq-password}" | base64 --decode)"

View File

@ -1,19 +1,4 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: birbnetes-nfs-storage-minio
namespace: birbnetes
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Recycle
nfs:
server: 192.168.100.3
path: /srv/kubedata/birbnetes/storage_minio
---
apiVersion: v1
kind: Service
metadata:
name: minio-service
@ -73,9 +58,9 @@ spec:
containers:
- name: minio
volumeMounts:
- name: data
- name: data
mountPath: "/data"
image: minio/minio:RELEASE.2020-03-25T07-03-04Z
image: minio/minio:latest
args:
- server
- /data