You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: documentation/modules/ROOT/pages/01-setup.adoc
+5-3
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
= Setup
2
2
include::_attributes.adoc[]
3
3
4
-
[#prerequisite]
4
+
[[prerequisite]]
5
5
== Prerequisite CLI tools
6
6
7
7
The following CLI tools are required for running the exercises in this tutorial. Please have them installed and configured before you get started with any of the tutorial chapters.
@@ -64,10 +64,12 @@ The following CLI tools are required for running the exercises in this tutorial.
64
64
== Download Tutorial Sources
65
65
Before we start setting up the environment, let's clone the tutorial sources and set the `TUTORIAL_HOME` environment variable to point to the root directory of the tutorial:
The `work` folder in `$TUTORIAL_HOME` can be used to download the demo application resources and refer to them during the exercises. The `work` folder has a README with instructions on the source code repo and git commands to clone the sources.
After successful deployment of the service we should see a kubernetes deployment like `greeter-nsrbr-deployment` available.
66
71
67
-
After successful deployment of the service we should see a kubernetes deployment called `greeter-00001-deployment` available.
68
-
69
-
[.thumb]
70
-
image::greeter-00001.png[Greeter Service]
72
+
[NOTE]
73
+
====
74
+
* The actual deployment name may vary in your setup
75
+
====
71
76
72
77
[#basics-invoke-service]
73
78
== Invoke Service
74
-
75
79
:k8s-env: minikube
76
80
:k8s-cli: kubectl
81
+
77
82
include::ROOT:partial$invoke-service.adoc[tag=*]
78
83
79
-
.(OR)
84
+
**(OR)**
80
85
81
86
:k8s-env: minishift
82
87
:k8s-cli: oc
83
88
include::ROOT:partial$invoke-service.adoc[tag=*]
84
89
85
-
The last curl command should return a response like **Hi greeter => greeter-00001-deployment-5d696cc6c8-m65s5: 1**
90
+
The last curl command should return a response like **Hi greeter => '6fee83923a9f' : 1**
86
91
87
92
NOTE: Sometimes the response might not be returned immediately especially when the pod is coming up from dormant state, at those times try giving request again
88
93
@@ -93,14 +98,17 @@ The service-based deployment strategy that we did now will create many Knative r
When the service was invoked with `curl -H "Host:greeter.knativetutorial.example.com" $IP_ADDRESS`,you noticed that we added a **Host** header to the request with value `greeter.knativetutorial.example.com`,this FQDN is automatically assigned to your Knative service by the Knative Routes,it uses the format like `**<service-name>.<namespace>.<domain-suffix>**`.
After successful deployment of the service we should see a kubernetes deployment called `greeter-00002-deployment` available in the OpenShift dashboard:
178
+
After successful deployment of the service we should see a kubernetes deployment called `greeter-cqgcf-deployment`.
168
179
169
-
image::greeter-00002.png[Greeter Service rev2]
180
+
Now running the <<basics-show-knative-revisions,command>> will show two revisions namely `greeter-cqgcf` and `greeter-nsrbr`.
170
181
171
-
Now running the <<basics-show-knative-revisions,command>> will show two revisions namely `greeter-00001` and `greeter-0002`.
172
-
173
-
<<basics-invoke-service,Invoking Service>> will now show an output like **Namaste greeter => greeter-00002-deployment-8d9984dc8-rgzx6: 2**, where __Namaste__ is the value that we configured via environment variable in the Knative service resource file.
182
+
<<basics-invoke-service,Invoking Service>> will now show an output like **Namaste greeter => '6fee83923a9f' : 1**, where __Namaste__ is the value that we configured via environment variable in the Knative service resource file.
174
183
175
184
[#basics-pinning-revision]
176
185
== Pinning service to a revision
177
186
178
187
As you noticed that the Knative services always routes the traffic to the **latest** revision of the service deployment, thats because of the **runLatest** attribute in <<basics-service-rev2,service resource file>>.
179
188
180
-
Let us now make the greeter service use earlier revision `greeter-00001`.
189
+
Let us now make the greeter service use first revision created i.e. the one using the default `MESSAGE_PREFIX`.
181
190
182
191
[TIP]
183
192
====
184
193
You can use the get <<basics-show-knative-revisions, show knative revisions>> command to find the available revisions for the greeter service.
0 commit comments