-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheclipse-theia.sh
60 lines (58 loc) · 1.23 KB
/
eclipse-theia.sh
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
#!/bin/bash
#
# Startet die Eclipse Theia - eine browserbasierte IDE.
#
# Dateiablage
# in Container - /home/project
# in VM - /home/ubuntu/data/project
#
# Zugriff auf VM (via Netzwerkadapter Overlay Netzwerk von Kubernetes)
# - ssh ubuntu@10.244.0.1
# Password steht in Einfuehrungseite unter Accessing.
#
cat <<%EOF% | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: eclipse-theia
spec:
type: LoadBalancer
ports:
- port: 3000
nodePort: 32400
selector:
app: eclipse-theia
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: eclipse-theia
name: eclipse-theia
spec:
selector:
matchLabels:
app: eclipse-theia
replicas: 1
template:
metadata:
labels:
app: eclipse-theia
spec:
containers:
- image: theiaide/theia
imagePullPolicy: IfNotPresent
name: eclipse-theia
ports:
- containerPort: 3000
# Volumes im Container
volumeMounts:
- mountPath: "/home/project"
subPath: project
name: "eclipse-theia-storage"
# Volumes in Host
volumes:
- name: eclipse-theia-storage
persistentVolumeClaim:
claimName: data-claim
%EOF%