Skip to content

Commit

Permalink
Service Mesh - Istio - Parte 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanbaraldi committed Jul 21, 2020
1 parent 2b0db6c commit 9b15e4b
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 48 deletions.
42 changes: 0 additions & 42 deletions exercicios/bookinfo-gateway.yml

This file was deleted.

25 changes: 24 additions & 1 deletion exercicios/bookinfo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,27 @@ spec:
volumes:
- name: tmp
emptyDir: {}
---




---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
labels:
app: productpage
ingress: productpage
name: product
namespace: default
spec:
rules:
- host: product.rancher.dev-ops-ninja.com
http:
paths:
- backend:
serviceName: productpage
servicePort: 9080
status:
loadBalancer: {}

62 changes: 62 additions & 0 deletions exercicios/destination-rule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: productpage
spec:
host: productpage
subsets:
- name: v1
labels:
version: v1
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: reviews
spec:
host: reviews
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
- name: v3
labels:
version: v3
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: ratings
spec:
host: ratings
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
- name: v2-mysql
labels:
version: v2-mysql
- name: v2-mysql-vm
labels:
version: v2-mysql-vm
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: details
spec:
host: details
subsets:
- name: v1
labels:
version: v1
- name: v2
labels:
version: v2
16 changes: 11 additions & 5 deletions exercicios/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,15 @@ $ helm install --name mysql-operator mysql-operator



# ISTIO - ServiceMesh
# ISTIO - ServiceMesh - Parte 1

https://istio.io/latest/docs/examples/bookinfo/
Arquitetura do Istio.

Habilitar o Istio no Rancher.

Implantar a aplicação BookInfo e ver a arquitetura dela.


```sh
$ kubectl label namespace default istio-injection=enabled
Expand All @@ -313,13 +321,11 @@ $ kubectl get services

$ kubectl get pods

$ kubectl exec -it "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl productpage:9080/productpage | grep -o "<title>.*</title>"

$ kubectl apply -f bookinfo-gateway.yml

```

Gerar tráfego acessando a URL.

Acessar Kiali e Jaeger e Grafana



Expand Down
1 change: 1 addition & 0 deletions exercicios/istio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b15e4b

Please sign in to comment.