Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
service1
service2
.gitignore
README-old.adoc
README.adoc
build1.sh
build2.sh

README.adoc

PLAYING WITH ISTIO

== Cleanup old installation

=== Delete Istio on minishift:

oc delete -f install/kubernetes/istio-demo-auth.yaml

=== Delete minishift:

minishift delete rm -rf ~.minishift/ rm -rf ~/.kube

=== Reset docker
In the docker preferences : reset to factory defaults



== Install minishift:

brew install openshift-cli brew install kubernetes-cli brew cask install minishift

minishift profile set istio-tutorial minishift config set memory 8GB minishift config set cpus 3 minishift config set vm-driver virtualbox # or kvm, for Fedora minishift config set image-caching true minishift config set openshift-version v3.11.0 minishift addon enable admin-user minishift addon enable anyuid

minishift start minishift ssh — sudo setenforce 0

== Installing Minishift and Istio

cd curl -L https://git.io/getLatestIstio | sh - export PATH="$PATH:~/istio-1.0.6/bin" cd ~/istio-1.0.6/

oc apply -f install/kubernetes/helm/istio/templates/crds.yaml oc apply -f install/kubernetes/istio-demo.yaml oc project istio-system oc expose svc istio-ingressgateway oc expose svc servicegraph oc expose svc grafana oc expose svc prometheus oc expose svc tracing oc get svc -n istio-system oc get pods -n istio-system

== Setup environment
eval $(minishift oc-env)
eval $(minishift docker-env)
oc login $(minishift ip):8443 -u admin -p admin


== Login op openshift

minishift console (a browser is started, login as admin/admin)

== Test: Build images
/build2.sh
== Test: Deploy own sample pods

oc apply -f <(istioctl kube-inject -f service1/openshift-scripts/deployconfig.yml ) -n tutorial oc create -f service1/openshift-scripts/service.yml -n tutorial oc expose service service1 -n tutorial oc get route -n tutorial oc get pods -w -n tutorial

oc apply -f <(istioctl kube-inject -f service2/openshift-scripts/deployconfig.yml ) -n tutorial oc create -f service2/openshift-scripts/service.yml -n tutorial oc expose service service2 -n tutorial oc get route -n tutorial oc get pods -w -n tutorial

test apps

curl service1.$(minishift ip).nip.io/rest

== Run tutorial samples

oc new-project tutorial oc adm policy add-scc-to-user privileged -z default -n tutorial

cd ~/git git clone https://github.com/redhat-developer-demos/istio-tutorial cd istio-tutorial

cd customer/java/springboot mvn clean package docker build -t example/customer . docker images | grep customer oc apply -f <(istioctl kube-inject -f ../../kubernetes/Deployment.yml) -n tutorial oc create -f ../../kubernetes/Service.yml -n tutorial oc expose service customer -n tutorial oc get route -n tutorial oc get pods -w -n tutorial

build preference

cd ../../.. cd preference/java/springboot mvn clean package docker build -t example/preference:v1 . docker images | grep preference oc apply -f <(istioctl kube-inject -f ../../kubernetes/Deployment.yml) -n tutorial oc create -f ../../kubernetes/Service.yml

build recommendations

cd ../../.. cd recommendation/java/vertx mvn clean package docker build -t example/recommendation:v1 . docker images | grep recommendation

oc apply -f <(istioctl kube-inject -f ../../kubernetes/Deployment.yml) -n tutorial oc create -f ../../kubernetes/Service.yml -n tutorial oc get pods -w

test apps

curl customer-tutorial.$(minishift ip).nip.io

== Delete the sample pods

oc delete -f service1/openshift-scripts/service.yml -n myproject oc delete -f service1/openshift-scripts/deployconfig.yml -n myproject oc delete routes service1 oc delete -f service2/openshift-scripts/service.yml -n myproject oc delete -f service2/openshift-scripts/deployconfig.yml -n myproject

== Delete Istio on minishift:

oc delete -f install/kubernetes/istio-demo-auth.yaml

== Delete minishift:

minishift delete rm -rf ~.minishift/ rm -rf ~/.kube

== References:
link:https://github.com/redhat-developer-demos/istio-tutorial[https://github.com/redhat-developer-demos/istio-tutorial] +
link:https://istio.io/docs/setup/kubernetes/quick-start[https://istio.io/docs/setup/kubernetes/quick-start/] +
link:https://medium.com/devopslinks/istio-step-by-step-part-01-introduction-to-istio-b9fd0df30a9e[https://medium.com/devopslinks/istio-step-by-step-part-01-introduction-to-istio-b9fd0df30a9e] +
link:https://developers.redhat.com/books/introducing-istio-service-mesh-microservices/[https://developers.redhat.com/books/introducing-istio-service-mesh-microservices/]
You can’t perform that action at this time.