-
Notifications
You must be signed in to change notification settings - Fork 7
/
quickstart-template.json
271 lines (271 loc) · 9.01 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
{
"apiVersion": "v1",
"kind": "Template",
"labels": {},
"metadata": {
"annotations": {
"description": "# Karaf Camel Log QuickStart\n\nThis quickstart shows a simple Apache Camel application that logs a message to the server log every 5th second.\n\nThis example is implemented using solely the XML DSL (there is no Java code). The source code is provided in the following XML file `src/main/resources/OSGI-INF/blueprint/camel-log.xml`.\nIt also shows how Karaf assembly files can be overriden using resources from `src/main/resources/assembly/`. The included sample log file `etc/org.ops4j.pax.logging.cfg` sets the log level to DEBUG. \n\n\n### Building\n\nThe example can be built with\n\n mvn clean install\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-karaf-camel-log"
},
"parameters": [
{
"name": "APP_NAME",
"value": "s2i-quickstart-karaf-camel-log",
"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-karaf-camel-log",
"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": "install -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": [
{
"kind": "ImageStream",
"apiVersion": "v1",
"metadata": {
"name": "${APP_NAME}",
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "karaf",
"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": "karaf",
"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-karaf-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": "karaf",
"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": "karaf",
"deploymentconfig": "${APP_NAME}",
"group": "quickstarts",
"project": "${APP_NAME}",
"provider": "s2i",
"version": "${APP_VERSION}"
},
"template": {
"metadata": {
"creationTimestamp": null,
"labels": {
"component": "${APP_NAME}",
"container": "karaf",
"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": 8181,
"name": "http"
},
{
"containerPort": 8778,
"name": "jolokia"
}
],
"resources": {}
}
]
}
}
},
"status": {}
}
]
}