diff --git a/documentation/modules/ROOT/nav.adoc b/documentation/modules/ROOT/nav.adoc index 228734a0..9bc815fb 100644 --- a/documentation/modules/ROOT/nav.adoc +++ b/documentation/modules/ROOT/nav.adoc @@ -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] diff --git a/documentation/modules/ROOT/pages/1setup.adoc b/documentation/modules/ROOT/pages/1setup.adoc index 98412733..87602638 100644 --- a/documentation/modules/ROOT/pages/1setup.adoc +++ b/documentation/modules/ROOT/pages/1setup.adoc @@ -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[] @@ -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:: + @@ -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 @@ -142,4 +142,4 @@ kiali-774f655f6c-sv7nv 1/1 Running 0 18m prometheus-9db548fb6-vhwhc 3/3 Running 0 57m ---- -- -==== \ No newline at end of file +==== diff --git a/documentation/modules/ROOT/pages/2deploy-microservices.adoc b/documentation/modules/ROOT/pages/2deploy-microservices.adoc index 5126c758..82ac9ced 100644 --- a/documentation/modules/ROOT/pages/2deploy-microservices.adoc +++ b/documentation/modules/ROOT/pages/2deploy-microservices.adoc @@ -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] @@ -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`: @@ -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"] @@ -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 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 15021/TCP,80/TCP,443/TCP,15443/TCP 41m +---- +-- +==== [tabs] ==== @@ -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"] @@ -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"] diff --git a/documentation/modules/ROOT/pages/4simple-routerules.adoc b/documentation/modules/ROOT/pages/4simple-routerules.adoc index cd586318..314446a4 100644 --- a/documentation/modules/ROOT/pages/4simple-routerules.adoc +++ b/documentation/modules/ROOT/pages/4simple-routerules.adoc @@ -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 diff --git a/documentation/modules/ROOT/pages/8egress.adoc b/documentation/modules/ROOT/pages/8egress.adoc index 59fe0fa9..55ba4deb 100644 --- a/documentation/modules/ROOT/pages/8egress.adoc +++ b/documentation/modules/ROOT/pages/8egress.adoc @@ -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"] diff --git a/generate_docs.sh b/generate_docs.sh index 63a72b8a..60478388 100755 --- a/generate_docs.sh +++ b/generate_docs.sh @@ -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