-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbCluster.yml
196 lines (196 loc) · 4.33 KB
/
dbCluster.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-claim
spec:
storageClassName: local-storage
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
name: db-module-mariadb
labels:
app: mariadb
spec:
replicas: 1
selector:
matchLabels:
app: mariadb
template:
metadata:
labels:
app: mariadb
spec:
containers:
- image: mariadb:10.4 #Version des Images für Apache
name: mariadb
ports:
- containerPort: 3306 #Ports auf denen MariaDB ansprechbar ist
name: maria-zugang
env:
- name: MYSQL_DATABASE
value: db
- name: MYSQL_ROOT_PASSWORD
value: beakerx
- name: MYSQL_USER
value: beakerx
- name: MYSQL_PASSWORD
value: beakerx
# Volumes in Container
volumeMounts:
- mountPath: /var/lib/mysql/columnstore #Rootverzeichniss
subPath: mariadb
name: mariadb-data
# Volumes in Host
volumes:
- name: mariadb-data
persistentVolumeClaim:
claimName: data-claim #Verweis auf den PersistentVolume
---
apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
name: db-module-phpmyadmin
labels:
app: phpmyadmin
spec:
replicas: 1
selector:
matchLabels:
app: phpmyadmin
template:
metadata:
labels:
app: phpmyadmin
spec:
containers:
- image: phpmyadmin/phpmyadmin:4.8 #Version des Images für phpmyadmin
name: phpmyadmin
ports:
- containerPort: 80 #Ports auf denen phpmyadmin ansprechbar ist
name: phpmyadmin
env:
- name: PMA_HOST #definieren der MriaDB Server Adresse, hier mit internem DNS Namen
value: "mariadb"
# Volumes in Container
volumeMounts:
- mountPath: /etc/phpmyadmin/config.user.inc.php # Configfile siehe https://hub.docker.com/r/phpmyadmin/phpmyadmin/
subPath: myphpadmin
name: phpmyadmin-data
#Volumes in Host
volumes:
- name: phpmyadmin-data
persistentVolumeClaim:
claimName: data-claim #Verweis auf den PersistentVolume
---
apiVersion: apps/v1 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
name: db-module-beakerx
labels:
app: beakerx
spec:
replicas: 1
selector:
matchLabels:
app: beakerx
template:
metadata:
labels:
app: beakerx
spec:
containers:
- image: beakerx/beakerx #Version des Images für beakerx
name: beakerx
command: [ "start-notebook.sh", "--NotebookApp.token=''" ]
ports:
- containerPort: 8888 #Ports auf denen Beakerx / Jupyter ansprechbar ist
name: beakerx
# Volumes in Container
volumeMounts:
- mountPath: /home/beakerx/work #Notebooks und Settings
subPath: beakerx
name: jupyter-data
# Volumes in Host
volumes:
- name: jupyter-data # Volumesbeschreibung
persistentVolumeClaim:
claimName: data-claim
---
apiVersion: v1
kind: Service
metadata:
name: beakerx
spec:
selector:
app: beakerx
ports:
- port: 8888
protocol: TCP
targetPort: 8888
---
apiVersion: v1
kind: Service
metadata:
name: phpmyadmin
spec:
selector:
app: phpmyadmin
ports:
- port: 8080
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: mariadb
spec:
selector:
app: mariadb
ports:
- protocol: TCP
port: 3306
targetPort: 3306
---
apiVersion: v1
kind: Service
metadata:
name: beakerx-internal
spec:
type: LoadBalancer
selector:
app: beakerx
ports:
- port: 8888
protocol: TCP
targetPort: 8888
---
apiVersion: v1
kind: Service
metadata:
name: phpmyadmin-internal
spec:
type: LoadBalancer
selector:
app: phpmyadmin
ports:
- port: 8080
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: mariadb-internal
spec:
type: LoadBalancer
selector:
app: mariadb
ports:
- protocol: TCP
port: 3306
targetPort: 3306