Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes some subtleties encountered using Openshift 4.6 #261

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion documentation/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ ifndef::workshop[]
** xref:1setup.adoc#download-tutorial-sources[Download Tutorial]
** xref:1setup.adoc#install-minikube[Install Minikube]
** xref:1setup.adoc#start-kubernetes[Start Kubernetes]
** xref:1setup.adoc#istioinstallation[Install Istio]
** xref:1setup.adoc#upstreamistioinstallation[Install Istio]
endif::workshop[]

* xref:2deploy-microservices.adoc[2. Deploy Microservices]
** xref:2deploy-microservices.adoc#createproject[Create Project]
** xref:2deploy-microservices.adoc#deploycustomer[Deploy Customer]
** xref:2deploy-microservices.adoc#deploypreference[Deploy Preference]
** xref:2deploy-microservices.adoc#deployrecommendation[Deploy Recommendation]
Expand Down
8 changes: 4 additions & 4 deletions documentation/modules/ROOT/pages/1setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include::https://raw.githubusercontent.com/redhat-developer-demos/rhd-tutorial-c
| `istioctl`
| https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-osx.tar.gz[Download]
| https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-win.zip[Download]
| https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-linux.tar.gz[Download]
| https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-linux-amd64.tar.gz[Download]
|===

include::https://raw.githubusercontent.com/redhat-developer-demos/rhd-tutorial-common/master/optional-requisites.adoc[]
Expand Down Expand Up @@ -43,7 +43,7 @@ include::https://raw.githubusercontent.com/redhat-developer-demos/rhd-tutorial-c
[#upstreamistioinstallation]
== Istio Installation

[tabs, subs="attributes+,+macros"]
[tabs, subs="attributes+,+macros"]
====
Minikube::
+
Expand All @@ -56,7 +56,7 @@ Minikube::
curl -L https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-osx.tar.gz | tar xz

# Fedora/RHEL:
curl -L https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-linux.tar.gz | tar xz
curl -L https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-linux-amd64.tar.gz | tar xz

# Windows
curl -L https://github.com/istio/istio/releases/download/{istio-version}/istio-{istio-version}-win.zip
Expand Down Expand Up @@ -142,4 +142,4 @@ kiali-774f655f6c-sv7nv 1/1 Running 0 18m
prometheus-9db548fb6-vhwhc 3/3 Running 0 57m
----
--
====
====
91 changes: 88 additions & 3 deletions documentation/modules/ROOT/pages/2deploy-microservices.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ oc login -u user$WORKSHOP_USER -p openshift {ocpurl}
----
endif::workshop[]

[#deploycustomer]
== Deploy customer

[#createproject]
== Create the `tutorial` project
Make sure you are logged in

[.console-input]
Expand All @@ -41,6 +40,26 @@ kubectl create namespace tutorial{namespace-suffix}
kubectl config set-context $(kubectl config current-context) --namespace=tutorial{namespace-suffix}
----

=== ServiceMemberRoll (only in OpenShift)
When working with OpenShift, you need to either:

1. add your project to one of the ServiceMemberRoll in the `istio-system` namespace
2. create a ServiceMember in the `tutorial` project.

If you opt for the first option, you might have to wait a bit for the Mesh service to enroll your
project.

If you're in a hurry, create a ServiceMember in the `tutorial` project:

1. from the "Installed operators", select the `tutorial` project from the Project drop-down
2. click on the "Istio Service Mesh Member"
3. click on the "Create ServiceMeshMember" button
4. open the "Control Plane Ref"
5. select the `istio-system` as the Namespace
6. click on the "Create" button

[#deploycustomer]
== Deploy customer
Start deploying the microservice projects, starting with customer

Make sure `istioctl` is in your `PATH`:
Expand All @@ -67,11 +86,27 @@ NOTE: You will deploy docker images that were previously built for this tutorial

If you *have not built* the images on your own then let's deploy the customer pod with its sidecar using the already built images for this tutorial:

[tabs]
====
Minikube::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f <(istioctl kube-inject -f link:{github-repo}/{customer-repo}/kubernetes/Deployment.yml[{customer-repo}/kubernetes/Deployment.yml]) -n tutorial{namespace-suffix}
----
--
OpenShift::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f link:{github-repo}/{customer-repo}/kubernetes/Deployment.yml[{customer-repo}/kubernetes/Deployment.yml] -n tutorial{namespace-suffix}
----
--
====

[.console-input]
[source,bash,subs="+macros,+attributes"]
Expand Down Expand Up @@ -103,11 +138,29 @@ kubectl get pods -w -n tutorial{namespace-suffix}
kubectl get svc istio-ingressgateway -n istio-system
----

[tabs]
====
Minikube::
+
--
[.console-output]
[source,bash,subs="attributes+,+macros"]
----
istio-ingressgateway LoadBalancer 10.101.82.250 <pending> 15020:31582/TCP,80:31380/TCP,443:31390/TCP,31400:31400/TCP,15029:30818/TCP,15030:32542/TCP,15031:30106/TCP,15032:32284/TCP,15443:31080/TCP 19m
----
--

OpenShift::
+
--
[.console-output]
[source,bash,subs="attributes+,+macros"]
----
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istio-ingressgateway ClusterIP 172.21.17.3 <none> 15021/TCP,80/TCP,443/TCP,15443/TCP 41m
----
--
====

[tabs]
====
Expand Down Expand Up @@ -195,11 +248,27 @@ NOTE: You will deploy docker images that were previously built for this tutorial

If you *have not built* the images on your own then let's deploy the customer pod with its sidecar using the already built images for this tutorial:

[tabs]
====
Minikube::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f <(istioctl kube-inject -f link:{github-repo}/{preference-repo}/kubernetes/Deployment.yml[{preference-repo}/kubernetes/Deployment.yml]) -n tutorial{namespace-suffix}
----
--
OpenShift::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f link:{github-repo}/{preference-repo}/kubernetes/Deployment.yml[{preference-repo}/kubernetes/Deployment.yml] -n tutorial{namespace-suffix}
----
--
====

[.console-input]
[source,bash,subs="+macros,+attributes"]
Expand Down Expand Up @@ -262,11 +331,27 @@ NOTE: You will deploy docker images that were previously built for this tutorial

If you *have not built* the images on your own then let's deploy the customer pod with its sidecar using the already built images for this tutorial:

[tabs]
====
Minikube::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f <(istioctl kube-inject -f link:{github-repo}/{recommendation-repo}/kubernetes/Deployment.yml[{recommendation-repo}/kubernetes/Deployment.yml]) -n tutorial{namespace-suffix}
----
--
OpenShift::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f link:{github-repo}/{recommendation-repo}/kubernetes/Deployment.yml[{recommendation-repo}/kubernetes/Deployment.yml] -n tutorial{namespace-suffix}
----
--
====

[.console-input]
[source,bash,subs="+macros,+attributes"]
Expand Down
16 changes: 16 additions & 0 deletions documentation/modules/ROOT/pages/4simple-routerules.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,27 @@ If you *have not built* the images on your own then let's deploy the customer po

== Deploy Recommendation microservice V2 using an existing image

[tabs]
====
Minikube::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f <(istioctl kube-inject -f link:{github-repo}/{recommendation-repo}/kubernetes/Deployment-v2.yml[{recommendation-repo}/kubernetes/Deployment-v2.yml]) -n tutorial{namespace-suffix}
----
--
OpenShift::
+
--
[.console-input]
[source,bash,subs="+macros,+attributes"]
----
kubectl apply -f link:{github-repo}/{recommendation-repo}/kubernetes/Deployment-v2.yml[{recommendation-repo}/kubernetes/Deployment-v2.yml] -n tutorial{namespace-suffix}
----
--
====

=== Wait for v2 to be deployed

Expand Down
16 changes: 16 additions & 0 deletions documentation/modules/ROOT/pages/8egress.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,27 @@ NOTE: You will deploy docker images that were previously built for this tutorial

If you *have not built* the images on your own then let's deploy the customer pod with its sidecar using the already built images for this tutorial:

[tabs]
====
Minikube::
+
--
[.console-input]
[source,bash, subs="+macros,+attributes"]
----
kubectl apply -f <(istioctl kube-inject -f link:{github-repo}/{recommendation-repo}/kubernetes/Deployment-v3.yml[{recommendation-repo}/kubernetes/Deployment-v3.yml]) -n tutorial
----
--
OpenShift::
+
--
[.console-input]
[source,bash, subs="+macros,+attributes"]
----
kubectl apply -f link:{github-repo}/{recommendation-repo}/kubernetes/Deployment-v3.yml[{recommendation-repo}/kubernetes/Deployment-v3.yml] -n tutorial
----
--
====

[.console-input]
[source,bash,subs="+macros,+attributes"]
Expand Down
12 changes: 11 additions & 1 deletion generate_docs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#!/bin/sh
docker run -v `pwd`:/antora --rm -t antora/antora:2.2.0 --pull --stacktrace site-gh-pages.yml
open gh-pages/istio-tutorial/1.1.x/index.html
INDEX_BASE=gh-pages/istio-tutorial/1.6.x/index.html
case $(uname) in
Linux )
xdg-open "$INDEX_BASE"
;;
Darwin )
open "$INDEX_BASE"
;;
* )
;;
esac