Skip to content

Commit 2bb8c7d

Browse files
committed
Added OpenShift Che template che_debug.json that exposes JPDA port
1 parent b365c35 commit 2bb8c7d

File tree

2 files changed

+295
-1
lines changed

2 files changed

+295
-1
lines changed

che.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
{
163163
"name": "${APPLICATION_NAME}",
164164
"image": "${CHE_SERVER_DOCKER_IMAGE}",
165-
"imagePullPolicy": "IfNotPresent",
165+
"imagePullPolicy": "Always",
166166
"privileged": true,
167167
"livenessProbe": {
168168
"tcpSocket": {

che_debug.json

Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
{
2+
"kind": "Template",
3+
"apiVersion": "v1",
4+
"metadata": {
5+
"annotations": {
6+
"description": "Application template for Eclipse Che",
7+
"iconClass" : "icon-openjdk",
8+
"tags" : "eclipse,che,java,angular,ide",
9+
"version" : "5.0.0"
10+
},
11+
"name": "eclipse-che"
12+
},
13+
"labels": {
14+
"template": "eclipse-che",
15+
"xpaas" : "5.0.0"
16+
},
17+
"parameters": [
18+
{
19+
"description": "The name for the application.",
20+
"name": "APPLICATION_NAME",
21+
"value": "che-host",
22+
"required": true
23+
},
24+
{
25+
"description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
26+
"name": "HOSTNAME_HTTP",
27+
"value": "che.openshift.local",
28+
"required": false
29+
},
30+
{
31+
"description": "Name of the che-server Docker image.",
32+
"name": "CHE_SERVER_DOCKER_IMAGE",
33+
"value": "codenvy/che-server:5.0.0-latest",
34+
"required": true
35+
},
36+
{
37+
"description": "Url of the OpenShift API",
38+
"name": "CHE_OPENSHIFT_ENDPOINT",
39+
"value": "",
40+
"required": true
41+
},
42+
{
43+
"description": "OpenShift username",
44+
"name": "CHE_OPENSHIFT_USERNAME",
45+
"value": "openshift-dev",
46+
"required": true
47+
},
48+
{
49+
"description": "OpenShift userpassword.",
50+
"name": "CHE_OPENSHIFT_PASSWORD",
51+
"value": "devel",
52+
"required": true
53+
},
54+
{
55+
"description": "OpenShift project.",
56+
"name": "CHE_OPENSHIFT_PROJECT",
57+
"value": "eclipse-che",
58+
"required": true
59+
},
60+
{
61+
"description": "OpenShift service account name.",
62+
"name": "CHE_OPENSHIFT_SERVICEACCOUNTNAME",
63+
"value": "cheserviceaccount",
64+
"required": true
65+
},
66+
{
67+
"description": "Che log level (INFO or DEBUG)",
68+
"name": "CHE_LOG_LEVEL",
69+
"value": "INFO",
70+
"required": false
71+
},
72+
{
73+
"description": "IP of the host docker0 bridge. This IP is used by che-server to communicate with che workspaces",
74+
"name": "DOCKER0_BRIDGE_IP",
75+
"value": "172.17.0.1",
76+
"required": true
77+
}
78+
],
79+
"objects": [
80+
{
81+
"kind": "Service",
82+
"apiVersion": "v1",
83+
"spec": {
84+
"type": "NodePort",
85+
"ports": [
86+
{
87+
"port": 8080,
88+
"targetPort": 8080,
89+
"protocol": "TCP",
90+
"name": "tomcat"
91+
},
92+
{
93+
"port": 8000,
94+
"targetPort": 8000,
95+
"protocol": "TCP",
96+
"name": "tomcat-debug"
97+
}
98+
],
99+
"selector": {
100+
"deploymentConfig": "${APPLICATION_NAME}"
101+
}
102+
},
103+
"metadata": {
104+
"name": "${APPLICATION_NAME}",
105+
"labels": {
106+
"application": "${APPLICATION_NAME}"
107+
},
108+
"annotations": {
109+
"description": "Che http port."
110+
}
111+
}
112+
},
113+
{
114+
"kind": "Route",
115+
"apiVersion": "v1",
116+
"id": "${APPLICATION_NAME}-http",
117+
"metadata": {
118+
"name": "${APPLICATION_NAME}",
119+
"labels": {
120+
"application": "${APPLICATION_NAME}"
121+
},
122+
"annotations": {
123+
"description": "Route for application's http service."
124+
}
125+
},
126+
"spec": {
127+
"host": "${HOSTNAME_HTTP}",
128+
"to": {
129+
"name": "${APPLICATION_NAME}"
130+
},
131+
"port": {
132+
"targetPort": "tomcat"
133+
}
134+
}
135+
},
136+
{
137+
"kind": "DeploymentConfig",
138+
"apiVersion": "v1",
139+
"metadata": {
140+
"name": "${APPLICATION_NAME}",
141+
"labels": {
142+
"application": "${APPLICATION_NAME}"
143+
}
144+
},
145+
"spec": {
146+
"strategy": {
147+
"type": "Recreate"
148+
},
149+
"triggers": [
150+
{
151+
"type": "ConfigChange"
152+
}
153+
],
154+
"replicas": 1,
155+
"selector": {
156+
"deploymentConfig": "${APPLICATION_NAME}"
157+
},
158+
"template": {
159+
"metadata": {
160+
"name": "${APPLICATION_NAME}",
161+
"labels": {
162+
"deploymentConfig": "${APPLICATION_NAME}",
163+
"application": "${APPLICATION_NAME}"
164+
}
165+
},
166+
"spec": {
167+
"terminationGracePeriodSeconds": 75,
168+
"containers": [
169+
{
170+
"name": "${APPLICATION_NAME}",
171+
"image": "${CHE_SERVER_DOCKER_IMAGE}",
172+
"imagePullPolicy": "Always",
173+
"privileged": true,
174+
"livenessProbe": {
175+
"tcpSocket": {
176+
"port": 8080
177+
},
178+
"initialDelaySeconds": 5,
179+
"timeoutSeconds": 1
180+
},
181+
"readinessProbe": {
182+
"tcpSocket": {
183+
"port": 8080
184+
},
185+
"initialDelaySeconds": 5,
186+
"timeoutSeconds": 1
187+
},
188+
"volumeMounts": [
189+
{
190+
"name": "che-conf-volume",
191+
"mountPath": "/conf",
192+
"readOnly": false
193+
},
194+
{
195+
"name": "docker-socket-volume",
196+
"mountPath": "/var/run/docker.sock",
197+
"readOnly": false
198+
},
199+
{
200+
"name": "che-data-volume",
201+
"mountPath": "/data"
202+
}
203+
],
204+
"ports": [
205+
{
206+
"name": "http",
207+
"containerPort": 8080,
208+
"protocol": "TCP"
209+
}
210+
],
211+
"env": [
212+
{
213+
"name": "CHE_DOCKER_MACHINE_HOST_EXTERNAL",
214+
"value": "${HOSTNAME_HTTP}"
215+
},
216+
{
217+
"name": "CHE_WORKSPACE_STORAGE",
218+
"value": "/home/user/che/workspaces"
219+
},
220+
{
221+
"name": "CHE_WORKSPACE_STORAGE_CREATE_FOLDERS",
222+
"value": "false"
223+
},
224+
{
225+
"name": "CHE_LOCAL_CONF_DIR",
226+
"value": "/etc/conf"
227+
},
228+
{
229+
"name": "CHE_OPENSHIFT_ENDPOINT",
230+
"value": "${CHE_OPENSHIFT_ENDPOINT}"
231+
},
232+
{
233+
"name": "CHE_OPENSHIFT_USERNAME",
234+
"value": "${CHE_OPENSHIFT_USERNAME}"
235+
},
236+
{
237+
"name": "CHE_OPENSHIFT_PASSWORD",
238+
"value": "${CHE_OPENSHIFT_PASSWORD}"
239+
},
240+
{
241+
"name": "CHE_OPENSHIFT_PROJECT",
242+
"value": "${CHE_OPENSHIFT_PROJECT}"
243+
},
244+
{
245+
"name": "CHE_OPENSHIFT_SERVICEACCOUNTNAME",
246+
"value": "${CHE_OPENSHIFT_SERVICEACCOUNTNAME}"
247+
},
248+
{
249+
"name": "CHE_IP",
250+
"value": "${DOCKER0_BRIDGE_IP}"
251+
},
252+
{
253+
"name": "CHE_LOG_LEVEL",
254+
"value": "${CHE_LOG_LEVEL}"
255+
},
256+
{
257+
"name": "CHE_DEBUG_SERVER",
258+
"value": "true"
259+
}
260+
],
261+
"args": [],
262+
"securityContext": {
263+
"privileged": true,
264+
"runAsUser": 0
265+
}
266+
}
267+
],
268+
"volumes": [
269+
{
270+
"name": "che-conf-volume",
271+
"hostPath": {
272+
"path": "/etc/conf"
273+
}
274+
},
275+
{
276+
"name": "docker-socket-volume",
277+
"hostPath": {
278+
"path": "/var/run/docker.sock"
279+
}
280+
},
281+
{
282+
"name": "che-data-volume",
283+
"hostPath": {
284+
"path": "/home/user/che"
285+
}
286+
}
287+
],
288+
"serviceAccountName": "${CHE_OPENSHIFT_SERVICEACCOUNTNAME}"
289+
}
290+
}
291+
}
292+
}
293+
]
294+
}

0 commit comments

Comments
 (0)