Skip to content

Commit 5601991

Browse files
committed
feat: add poll enrich eip module and upgrade knative to v0.4.0
- added new module to demonstrate pollEnrich EIP with - organized redundant instructions into partials - upgraded instructions to setup Knative v0.4.0 fixes #42, #35
1 parent 0474364 commit 5601991

13 files changed

Lines changed: 278 additions & 79 deletions

File tree

documentation/modules/ROOT/pages/03scaling.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ We will now send some load to the greeter service. The command below sends 50 c
337337
----
338338
hey -z 10s -c 50 -t 0 \
339339
-host "greeter.knativetutorial.example.com" \
340-
"http://${IP_ADDRESS}"
340+
"http://pass:[${IP_ADDRESS}]"
341341
----
342342

343343
After youÄ've successfully run this small load test, you will notice the number of greeter service pods will have scaled to 5 automatically. You can also view the same via OpenShift dashboard as shown below:

documentation/modules/ROOT/pages/05eventing/eventing.adoc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,10 @@ You have completed the xref:ROOT:04build/build.adoc[Build] or xref:ROOT:04build/
2121
[#eventing-watch-logs]
2222
== Watching Logs
2323

24+
:kube-ns: knativetutorial
25+
:kube-svc: event-greeter
2426
include::partial$watching-logs.adoc[]
2527

26-
[TIP]
27-
====
28-
* Using stern with the command `stern -n knativetutorial event-greeter`, to filter the logs further add `-c user-container` to the stern command.
29-
30-
[source,bash,subs="+macros,+attributes"]
31-
----
32-
stern -n knativetutorial -c user-container event-greeter
33-
----
34-
====
35-
3628
The logs will have the output like below printing every minute.
3729

3830
[source]

documentation/modules/ROOT/pages/_attributes.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
:build-repo: 04-build
88
:eventing-repo: 05-eventing
99
:experimental:
10-
:knative-version: v0.3.0
11-
:knative-serving-repo: https://github.com/knative/serving/releases/download
10+
:knative-version: v0.4.0
11+
:knative-serving-uri: https://github.com/knative/serving
12+
:knative-serving-repo: {knative-serving-uri}/releases/download
1213
:knative-build-repo: https://github.com/knative/build/releases/download
1314
:knative-eventing-repo: https://github.com/knative/eventing/releases/download
1415
:knative-sources-repo: https://github.com/knative/eventing-sources/releases/download
Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1+
[kube-ns='knativetutorial']
2+
[kube-svc='']
3+
14
Since it is a Cron job source, it would have started to emit events every minute. We can watch the logs of the service to see the messages delivered.
25

36
The logs could be watched using the command:
47

58
[source,bash,subs="+macros,+attributes"]
69
----
7-
kubectl logs -n knativetutorial -f <pod-name> -c user-container
10+
kubectl logs -n {kube-ns} -f <pod-name> -c user-container
811
----
912

1013
.(OR)
1114

1215
[source,bash,subs="+macros,+attributes"]
1316
----
14-
oc logs -n knativetutorial -f <pod-name> -c user-container
15-
----
17+
oc logs -n {kube-ns} -f <pod-name> -c user-container
18+
----
19+
20+
[TIP]
21+
====
22+
* Using stern with the command `stern -n {kube-ns} {kube-svc}`, to filter the logs further add `-c user-container` to the stern command.
23+
24+
[source,bash,subs="+macros,+attributes"]
25+
----
26+
stern -n {kube-ns} -c user-container {kube-svc}
27+
----
28+
====

documentation/modules/ROOT/pages/faq.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[#faq-q1]
44
== How to access the Knative services ?
55

6-
When looking up the IP address to use for accessing your app, you need to look up the NodePort for the **istio-ingressgateway** well as the IP address used for minishift. You can use the following command to look up the value to use for the {IP_ADDRESS} placeholder used in the sample
6+
When looking up the IP address to use for accessing your app, you need to look up the NodePort for the **istio-ingressgateway** well as the IP address used for minishift. You can use the following command to look up the value to use for the pass:[{IP_ADDRESS}] placeholder used in the sample
77
[source,bash,linenums]
88
----
99
#!/bin/bash

documentation/modules/ROOT/pages/setup.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The `work` folder in `$TUTORIAL_HOME` can be used to download the demo applicati
8686
8787
This tutorial was developed and tested with:
8888
89-
- Knative `v0.3.0`
89+
- Knative `v0.4.0`
9090
- minikube `v0.34.1`
9191
- OpenShift `v3.11`
9292
- minishift `v1.30.0+186b034`
@@ -162,6 +162,7 @@ knative-ingressgateway-75644679c7-5xwx6 1/1 Running 0 6h27m
162162
[source,bash,subs="+macros,+attributes"]
163163
----
164164
kubectl apply --filename {knative-serving-repo}/{knative-version}/serving.yaml
165+
kubectl apply --filename https://raw.githubusercontent.com/knative/serving/{knative-version}/third_party/config/build/clusterrole.yaml
165166
----
166167

167168
[NOTE]
@@ -190,7 +191,7 @@ webhook-6d9568d-htxlt 1/1 Running 0 6h33m
190191

191192
[source,bash,subs="+macros,+attributes"]
192193
----
193-
kubectl apply --filename {knative-build-repo}/{knative-version}/release.yaml
194+
kubectl apply --filename {knative-build-repo}/{knative-version}/build.yaml
194195
----
195196

196197
[NOTE]
@@ -218,6 +219,7 @@ build-webhook-6bb747665f-trjxg 1/1 Running 0 6h32m
218219
[source,bash,subs="+macros,+attributes"]
219220
----
220221
kubectl apply --filename {knative-eventing-repo}/{knative-version}/release.yaml
222+
kubectl apply --filename {knative-eventing-repo}/{knative-version}/in-memory-channel.yaml
221223
kubectl apply --filename {knative-sources-repo}/{knative-version}/release.yaml
222224
----
223225

31 KB
Loading

documentation/modules/camelk/nav.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,16 @@
1616
*** xref:camelk:getting-started.adoc#gs-test-cartoon-messages-mover[Testing Route]
1717
***** xref:camelk:getting-started.adoc#gs-test-data[Upload Test Data]
1818
***** xref:camelk:getting-started.adoc#gs-invoke-service[Invoke service]
19-
*** xref:camelk:getting-started.adoc#gs-cleanup[Cleanup]
19+
*** xref:camelk:getting-started.adoc#gs-cleanup[Cleanup]
20+
** xref:camelk:poll-enrich.adoc[s3 File Downloader]
21+
*** xref:camelk:poll-enrich.adoc#pe-prereq[Prerequisite]
22+
*** xref:camelk:poll-enrich.adoc#pe-overview[Demo Overview]
23+
*** xref:camelk:poll-enrich.adoc#pe-deployment[Deployment]
24+
**** xref:camelk:poll-enrich.adoc#pe-make-s3-data-bucket[Create data s3 bucket]
25+
**** xref:camelk:poll-enrich.adoc#pe-make-s3-top-bucket[Create top s3 bucket]
26+
**** xref:camelk:poll-enrich.adoc#pe-cartoon-messages-downloader[Deploy Camel Route]
27+
*** xref:camelk:poll-enrich.adoc#pe-watch-logs[Watching Logs]
28+
*** xref:camelk:poll-enrich.adoc#pe-test-cartoon-messages-downloader[Testing Route]
29+
***** xref:camelk:poll-enrich.adoc#pe-test-data[Upload Test Data]
30+
***** xref:camelk:poll-enrich.adoc#pe-invoke-service[Invoke service]
31+
*** xref:camelk:poll-enrich.adoc#pe-cleanup[Cleanup]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[svc-name='']
2+
[file-name='']
3+
4+
#tag::set-svc-url[]
5+
[source,bash,subs="+macros,+attributes"]
6+
----
7+
SVC_URL=`kubectl -n knativetutorial get ksvc {svc-name} -ojsonpath='{.status.domain}'`
8+
----
9+
10+
.(OR)
11+
12+
[source,bash,subs="+macros,+attributes"]
13+
----
14+
SVC_URL=`oc -n knativetutorial get ksvc {svc-name} -ojsonpath='{.status.domain}'`
15+
----
16+
#end::set-svc-url[]
17+
18+
#tag::invoke-svc[]
19+
20+
[source,bash,subs="+macros,+attributes"]
21+
----
22+
curl -v -H pass:["Host:${SVC_URL}"] -H 'fileName: {file-name}' $IP_ADDRESS
23+
----
24+
25+
.(OR)
26+
27+
[source,bash,subs="+macros,+attributes"]
28+
----
29+
http pass:[$IP_ADDRESS "Host:${SVC_URL}"] 'fileName: {file-name}'
30+
----
31+
#end::invoke-svc[]
Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
1+
[kube-ns='']
2+
3+
#tag::wait-with-kubectl[]
4+
5+
[NOTE]
6+
====
7+
It may take few minutes for pods to come up, you can watch the status of the pods as shown below.
8+
You can use kbd:[CTRL + c ] to terminate the watch
9+
====
10+
11+
[source,bash,subs="+macros,+attributes"]
12+
----
13+
kubectl -n {kube-ns} get pods -w
14+
----
15+
.(OR)
16+
[source,bash,subs="+macros,+attributes"]
17+
----
18+
oc -n {kube-ns} get pods -w
19+
----
20+
21+
#end::wait-with-kubectl[]
22+
23+
#tag::wait-with-timeout[]
24+
125
Wait for the pods to be running:
226

327
[source,bash,subs="+macros,+attributes"]
428
----
5-
timeout 300 "kubectl get pods -n knativetutorial 2>&1 | grep -v -E '(Running|Completed|STATUS)'"
29+
timeout 300 "kubectl get pods -n {kube-ns} 2>&1 | grep -v -E '(Running|Completed|STATUS)'"
630
----
731

832
.(OR)
933

1034
[source,bash,subs="+macros,+attributes"]
1135
----
12-
timeout 300 "oc get pods -n knativetutorial 2>&1 | grep -v -E '(Running|Completed|STATUS)'"
13-
----
36+
timeout 300 "oc get pods -n {kube-ns} 2>&1 | grep -v -E '(Running|Completed|STATUS)'"
37+
----
38+
#end::wait-with-timeout[]
39+

0 commit comments

Comments
 (0)