-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquickstart-template.json
283 lines (283 loc) · 8.9 KB
/
quickstart-template.json
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
{
"apiVersion": "v1",
"kind": "Template",
"labels": {},
"metadata": {
"annotations": {
"description": "# Java Simple Fat-jar QuickStart\n\nThis quickstarts run in a Java standalone container using the fat-jar style.\n\nThis example is implemented using very simple Java code.\nThe source code is provided in the following java file `src/main/java/io/fabric8/quickstarts/java/simple/Main.java`,\nwhich can be viewed from [github](https://github.com/fabric8io/ipaas-quickstarts/blob/master/quickstart/java/simple-fatjar/src/main/java/io/fabric8/quickstarts/java/simple/fatjar/Main.java).\n\nThis example is printing *Hello Fabric8! Here's your random string: lRaNR* to the standard output in the infinite loop.\n\n\n### Building\n\nThe example can be built with\n\n mvn clean install\n\n\n### Running the example locally\n\nThe example can be run locally using the following Maven goal:\n\n mvn exec:java\n\n\n### Running the example in fabric8\n\nIt is assumed a running Kubernetes platform is already running. If not you can find details how to [get started](http://fabric8.io/guide/getStarted/index.html).\n\nThe example can be built and deployed using a single goal:\n\n mvn -Pf8-local-deploy\n\nWhen the example runs in fabric8, you can use the OpenShift client tool to inspect the status\n\nTo list all the running pods:\n\n oc get pods\n\nThen find the name of the pod that runs this quickstart, and output the logs from the running pods with:\n\n oc logs <name of pod>\n\nYou can also use the fabric8 [web console](http://fabric8.io/guide/console.html) to manage the\nrunning pods, and view logs and much more.\n\n\n### More details\n\nYou can find more details about running this [quickstart](http://fabric8.io/guide/quickstarts/running.html) on the website. This also includes instructions how to change the Docker image user and registry.\n\n",
"iconClass": "icon-java"
},
"labels": {},
"name": "s2i-quickstart-java-simple-fatjar"
},
"parameters": [
{
"name": "APP_NAME",
"value": "s2i-quickstart-java-simple-fatjar",
"description": "Application Name"
},
{
"name": "GIT_REPO",
"required": true,
"description": "Git repository, required"
},
{
"name": "GIT_REF",
"value": "master",
"description": "Git ref to build"
},
{
"name": "SERVICE_NAME",
"value": "s2i-qs-java-simple-fatjar",
"description": "Exposed Service name"
},
{
"name": "BUILDER_VERSION",
"value": "1.2.5",
"description": "Builder version"
},
{
"name": "APP_VERSION",
"value": "2.2.64-SNAPSHOT",
"description": "Application version"
},
{
"name": "MAVEN_ARGS",
"value": "package -DskipTests -e",
"description": "Arguments passed to mvn in the build"
},
{
"name": "MAVEN_ARGS_APPEND",
"description": "Extra arguments passed to mvn, e.g. for multi-module builds"
},
{
"name": "ARTIFACT_DIR",
"description": "Maven build directory"
},
{
"generate": "expression",
"name": "BUILD_SECRET",
"description": "The secret needed to trigger a build",
"from": "[a-zA-Z0-9]{8}"
}
],
"objects": [
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "s2i-java-${APP_NAME}",
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "java",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
}
},
"spec": {
"dockerImageRepository": "fabric8/s2i-java:${BUILDER_VERSION}"
},
"status": {
"dockerImageRepository": ""
}
},
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APP_NAME}",
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "java",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
}
},
"spec": {},
"status": {
"dockerImageRepository": ""
}
},
{
"kind": "BuildConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APP_NAME}",
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "java",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
}
},
"spec": {
"triggers": [
{
"type": "GitHub",
"github": {
"secret": "${BUILD_SECRET}"
}
},
{
"type": "Generic",
"generic": {
"secret": "${BUILD_SECRET}"
}
},
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChange": {}
}
],
"source": {
"type": "Git",
"git": {
"uri": "${GIT_REPO}",
"ref": "${GIT_REF}"
}
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"name": "s2i-java-${APP_NAME}:${BUILDER_VERSION}"
},
"forcePull": true,
"env": [
{
"name": "BUILD_LOGLEVEL",
"value": "5"
},
{
"name": "ARTIFACT_DIR",
"value": "${ARTIFACT_DIR}"
},
{
"name": "MAVEN_ARGS",
"value": "${MAVEN_ARGS}"
},
{
"name": "MAVEN_ARGS_APPEND",
"value": "${MAVEN_ARGS_APPEND}"
}
]
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "${APP_NAME}:latest"
}
},
"resources": {}
},
"status": {
"lastVersion": 0
}
},
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "${APP_NAME}",
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "java",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
}
},
"spec": {
"strategy": {
"resources": {}
},
"triggers": [
{
"type": "ConfigChange"
},
{
"type": "ImageChange",
"imageChangeParams": {
"automatic": true,
"containerNames": [
"${APP_NAME}"
],
"from": {
"kind": "ImageStreamTag",
"name": "${APP_NAME}:latest"
}
}
}
],
"replicas": 1,
"selector": {
"component": "${APP_NAME}",
"container": "java",
"deploymentconfig": "${APP_NAME}",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "java",
"deploymentconfig": "${APP_NAME}",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
}
},
"spec": {
"containers": [
{
"name": "${APP_NAME}",
"image": "library/${APP_NAME}:latest",
"readinessProbe": {
"exec": {
"command": [
"/bin/bash",
"-c",
"(curl -f 127.0.0.1:8778) >/dev/null 2>&1; test $? != 7"
]
},
"initialDelaySeconds": 30,
"timeoutSeconds": 5
},
"ports": [
{
"containerPort": 8778,
"name": "jolokia",
"protocol": "TCP"
}
],
"resources": {}
}
]
}
}
},
"status": {}
}
]
}