-
Notifications
You must be signed in to change notification settings - Fork 8
/
quickstart-template.json
303 lines (303 loc) · 9.59 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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
{
"apiVersion": "v1",
"kind": "Template",
"labels": {},
"metadata": {
"annotations": {
"description": "# CDI Camel QuickStart\n\nThis example shows how to work with Camel in the Java Container using CDI to configure components,\nendpoints and beans.\n\nThis example is implemented using Java code with CDI injected resources such as Camel endpoints and Java beans.\n\n### Building\n\nThe example can be built with\n\n mvn clean install\n\n### Running the example locally\n\nThe example can be run locally using the following Maven goal:\n\n mvn clean install exec:java\n\n\n### Running the example in fabric8\n\nIt is assumed that OpenShift platform is already running. If not you can find details how to [Install OpenShift at your site](https://docs.openshift.com/enterprise/3.1/install_config/install/index.html).\n\nThe example can be built and deployed using a single goal:\n\n mvn -Pf8-deploy\n\nWhen the example runs in OpenShift, 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 OpenShift [web console](https://docs.openshift.com/enterprise/3.1/getting_started/developers/developers_console.html#tutorial-video) to manage the\nrunning pods, and view logs and much more.\n\n\n### Running the example using OpenShift S2I template\n\nThe example can also be built and run using the included S2I template quickstart-template.json.\n\nThe application can be run directly by first editing the template file and populating S2I build parameters, including the required parameter GIT_REPO and then executing the command:\n\n oc new-app -f quickstart-template.json\n\nAlternatively the template file can be used to create an OpenShift application template by executing the command:\n\n oc create -f quickstart-template.json\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-cdi-camel"
},
"parameters": [
{
"name": "APP_NAME",
"value": "s2i-quickstart-cdi-camel",
"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-cdi-camel",
"description": "Exposed Service name"
},
{
"name": "BUILDER_VERSION",
"value": "1.0",
"description": "Builder version"
},
{
"name": "APP_VERSION",
"value": "2.2.0.redhat-079",
"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"
},
{
"description": "Namespace in which the Fuse ImageStreams are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
"name": "IMAGE_STREAM_NAMESPACE",
"value": "openshift",
"required": true
},
{
"generate": "expression",
"name": "BUILD_SECRET",
"description": "The secret needed to trigger a build",
"from": "[a-zA-Z0-9]{8}"
}
],
"objects": [
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"annotations": {
"prometheus.io/port": "9779",
"prometheus.io/scrape": "true"
},
"labels": {
"container": "java",
"component": "${APP_NAME}",
"provider": "s2i",
"project": "${APP_NAME}",
"version": "${APP_VERSION}",
"group": "quickstarts"
},
"name": "${SERVICE_NAME}"
},
"spec": {
"clusterIP": "None",
"deprecatedPublicIPs": [],
"ports": [
{
"port": 1
}
],
"selector": {
"container": "java",
"project": "${APP_NAME}",
"component": "${APP_NAME}",
"provider": "s2i",
"group": "quickstarts"
}
}
},
{
"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",
"namespace": "${IMAGE_STREAM_NAMESPACE}",
"name": "fis-java-openshift:${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": {}
}
]
}