Skip to content

Commit 0d7e560

Browse files
author
Botium
authored
Merge pull request #20 from codeforequity-at/feature/BOT-1988-voice-create-kubernetes-yaml
BOT-1988 k8s
2 parents 2264dce + 0d9d81b commit 0d7e560

23 files changed

+777
-0
lines changed

scripts/k8s/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##k8s
2+
Some predefined kubernetes workload collection:
3+
* default: marytts+kaldi (see docker-compose.yaml)
4+
* google: just google (see docker-compose-google.yaml)
5+
* picotts picotts+kaldi (see docker-compose-picotts.yaml)
6+
7+
To use it:
8+
* replace placeholders in a dir
9+
* deploy it `kubectl apply -R -f default`
10+
* undeploy it `kubectl delete -R -f default`
11+
12+
Do not modify and commit directly. Workload files are generated from helm chat!

scripts/k8s/default/01-secrets.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# Source: botium-speech-processing/templates/01-secrets.yml
3+
apiVersion: v1
4+
kind: Secret
5+
metadata:
6+
name: botium-speech-processing-secrets
7+
labels:
8+
name: secrets
9+
app: botium-speech-processing
10+
stringData:
11+
AUTH_APIKEYS: ""
12+
BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL: ""
13+
data:
14+
BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY: ""
15+
type: Opaque
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
# Source: botium-speech-processing/templates/02-configmap.yml
3+
apiVersion: v1
4+
kind: ConfigMap
5+
metadata:
6+
name: botium-speech-processing-configmap
7+
labels:
8+
name: config
9+
app: botium-speech-processing
10+
data:
11+
BOTIUM_SPEECH_PROVIDER_TTS: "marytts"
12+
BOTIUM_SPEECH_PROVIDER_STT: "kaldi"

scripts/k8s/default/03-volumes.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# Source: botium-speech-processing/templates/03-volumes.yml
3+
apiVersion: v1
4+
kind: PersistentVolumeClaim
5+
metadata:
6+
name: botium-speech-processing-claim
7+
labels:
8+
name: botium-speech-processing-claim
9+
app: botium-speech-processing
10+
tier: frontend
11+
spec:
12+
accessModes:
13+
- ReadWriteOnce
14+
storageClassName: aws-efs
15+
resources:
16+
requests:
17+
storage: 10Gi
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
# Source: botium-speech-processing/templates/04-frontend.yml
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: frontend
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- protocol: TCP
11+
port: 56000
12+
targetPort: 56000
13+
selector:
14+
name: frontend
15+
app: botium-speech-processing
16+
---
17+
# Source: botium-speech-processing/templates/04-frontend.yml
18+
apiVersion: apps/v1
19+
kind: Deployment
20+
metadata:
21+
name: frontend
22+
labels:
23+
name: frontend
24+
app: botium-speech-processing
25+
tier: frontend
26+
spec:
27+
replicas: 1
28+
strategy:
29+
type: Recreate
30+
selector:
31+
matchLabels:
32+
name: frontend
33+
app: botium-speech-processing
34+
template:
35+
metadata:
36+
labels:
37+
name: frontend
38+
app: botium-speech-processing
39+
tier: frontend
40+
spec:
41+
volumes:
42+
- name: botium-speech-processing-storage
43+
persistentVolumeClaim:
44+
claimName: botium-speech-processing-claim
45+
containers:
46+
- name: frontend
47+
image: botium/botium-speech-frontend:latest
48+
ports:
49+
- name: frontend-56000
50+
containerPort: 56000
51+
volumeMounts:
52+
- mountPath: /app/resources
53+
name: botium-speech-processing-storage
54+
env:
55+
- name: AUTH_APIKEYS
56+
valueFrom:
57+
secretKeyRef:
58+
name: botium-speech-processing-secrets
59+
key: AUTH_APIKEYS
60+
- name: BOTIUM_SPEECH_PROVIDER_TTS
61+
valueFrom:
62+
configMapKeyRef:
63+
name: botium-speech-processing-configmap
64+
key: BOTIUM_SPEECH_PROVIDER_TTS
65+
- name: BOTIUM_SPEECH_PROVIDER_STT
66+
valueFrom:
67+
configMapKeyRef:
68+
name: botium-speech-processing-configmap
69+
key: BOTIUM_SPEECH_PROVIDER_STT
70+
- name: BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL
71+
valueFrom:
72+
secretKeyRef:
73+
name: botium-speech-processing-secrets
74+
key: BOTIUM_SPEECH_GOOGLE_CLIENT_EMAIL
75+
- name: BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY
76+
valueFrom:
77+
secretKeyRef:
78+
name: botium-speech-processing-secrets
79+
key: BOTIUM_SPEECH_GOOGLE_PRIVATE_KEY

scripts/k8s/default/05-stt_en.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# Source: botium-speech-processing/templates/05-stt_en.yml
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: stt-en
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- protocol: TCP
11+
port: 80
12+
targetPort: 80
13+
selector:
14+
name: stt-en
15+
app: botium-speech-processing
16+
---
17+
# Source: botium-speech-processing/templates/05-stt_en.yml
18+
apiVersion: apps/v1
19+
kind: Deployment
20+
metadata:
21+
name: stt-en
22+
labels:
23+
name: stt-en
24+
app: botium-speech-processing
25+
tier: stt-en
26+
spec:
27+
replicas: 1
28+
strategy:
29+
type: Recreate
30+
selector:
31+
matchLabels:
32+
name: stt-en
33+
app: botium-speech-processing
34+
template:
35+
metadata:
36+
labels:
37+
name: stt-en
38+
app: botium-speech-processing
39+
tier: stt-en
40+
spec:
41+
volumes:
42+
- name: botium-speech-processing-storage
43+
persistentVolumeClaim:
44+
claimName: botium-speech-processing-claim
45+
containers:
46+
- name: stt-en
47+
image: botium/botium-speech-kaldi-en:latest
48+
ports:
49+
- name: stt-en
50+
containerPort: 80
51+
volumeMounts:
52+
- mountPath: /opt/logs
53+
name: botium-speech-processing-storage

scripts/k8s/default/06-stt_de.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
# Source: botium-speech-processing/templates/06-stt_de.yml
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: stt-de
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- protocol: TCP
11+
port: 80
12+
targetPort: 80
13+
selector:
14+
name: stt-de
15+
app: botium-speech-processing
16+
---
17+
# Source: botium-speech-processing/templates/06-stt_de.yml
18+
apiVersion: apps/v1
19+
kind: Deployment
20+
metadata:
21+
name: stt-de
22+
labels:
23+
name: stt-de
24+
app: botium-speech-processing
25+
tier: stt-de
26+
spec:
27+
replicas: 1
28+
strategy:
29+
type: Recreate
30+
selector:
31+
matchLabels:
32+
name: stt-de
33+
app: botium-speech-processing
34+
template:
35+
metadata:
36+
labels:
37+
name: stt-de
38+
app: botium-speech-processing
39+
tier: stt-de
40+
spec:
41+
volumes:
42+
- name: botium-speech-processing-storage
43+
persistentVolumeClaim:
44+
claimName: botium-speech-processing-claim
45+
containers:
46+
- name: stt-de
47+
image: botium/botium-speech-kaldi-de:latest
48+
volumeMounts:
49+
- mountPath: /opt/logs
50+
name: botium-speech-processing-storage

scripts/k8s/default/07-tts.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
# Source: botium-speech-processing/templates/07-tts.yml
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: tts
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- protocol: TCP
11+
port: 59125
12+
targetPort: 59125
13+
selector:
14+
name: tts
15+
app: botium-speech-processing
16+
---
17+
# Source: botium-speech-processing/templates/07-tts.yml
18+
apiVersion: apps/v1
19+
kind: Deployment
20+
metadata:
21+
name: tts
22+
labels:
23+
name: tts
24+
app: botium-speech-processing
25+
tier: tts
26+
spec:
27+
replicas: 1
28+
strategy:
29+
type: Recreate
30+
selector:
31+
matchLabels:
32+
name: tts
33+
app: botium-speech-processing
34+
template:
35+
metadata:
36+
labels:
37+
name: tts
38+
app: botium-speech-processing
39+
tier: tts
40+
spec:
41+
containers:
42+
- name: tts
43+
image: botium/botium-speech-marytts:latest

scripts/k8s/default/08-dictate.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
# Source: botium-speech-processing/templates/08-dictate.yml
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: dictate
7+
spec:
8+
type: ClusterIP
9+
ports:
10+
- protocol: TCP
11+
port: 56100
12+
targetPort: 56100
13+
selector:
14+
name: dictate
15+
app: botium-speech-processing
16+
---
17+
# Source: botium-speech-processing/templates/08-dictate.yml
18+
apiVersion: apps/v1
19+
kind: Deployment
20+
metadata:
21+
name: dictate
22+
labels:
23+
name: dictate
24+
app: botium-speech-processing
25+
tier: dictate
26+
spec:
27+
replicas: 1
28+
strategy:
29+
type: Recreate
30+
selector:
31+
matchLabels:
32+
name: dictate
33+
app: botium-speech-processing
34+
template:
35+
metadata:
36+
labels:
37+
name: dictate
38+
app: botium-speech-processing
39+
tier: dictate
40+
spec:
41+
containers:
42+
- name: dictate
43+
image: botium/botium-speech-dictate:latest
44+
ports:
45+
- name: dictate-56100
46+
containerPort: 56100

scripts/k8s/default/09-ingress.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# Source: botium-speech-processing/templates/09-ingress.yml
3+
apiVersion: extensions/v1beta1
4+
kind: Ingress
5+
metadata:
6+
name: speech-processing-ingress
7+
annotations:
8+
kubernetes.io/ingress.class: nginx
9+
spec:
10+
rules:
11+
- http:
12+
paths:
13+
- path: /
14+
backend:
15+
serviceName: frontend
16+
servicePort: 56000
17+
- path: /tts
18+
backend:
19+
serviceName: tts
20+
servicePort: 59125
21+
host: FQDN-Placeholder

0 commit comments

Comments
 (0)