diff --git a/images/bookinfo-sample-arch.png b/images/bookinfo-sample-arch.png new file mode 100644 index 000000000..8ebc407da Binary files /dev/null and b/images/bookinfo-sample-arch.png differ diff --git a/images/bookinfo-sample.jpg b/images/bookinfo-sample.jpg new file mode 100644 index 000000000..1da732ed9 Binary files /dev/null and b/images/bookinfo-sample.jpg differ diff --git a/images/istio-grafana.jpg b/images/istio-grafana.jpg index e8786848d..e72be8159 100644 Binary files a/images/istio-grafana.jpg and b/images/istio-grafana.jpg differ diff --git a/images/istio-prometheus.jpg b/images/istio-prometheus.jpg index 68296dea1..d034f6f15 100644 Binary files a/images/istio-prometheus.jpg and b/images/istio-prometheus.jpg differ diff --git a/images/istio-servicegraph.jpg b/images/istio-servicegraph.jpg new file mode 100644 index 000000000..eedbd64d4 Binary files /dev/null and b/images/istio-servicegraph.jpg differ diff --git a/images/istio-zipkin.jpg b/images/istio-zipkin.jpg index f2abb1a69..f24f29f5f 100644 Binary files a/images/istio-zipkin.jpg and b/images/istio-zipkin.jpg differ diff --git a/usecases/istio-installation.md b/usecases/istio-installation.md index 388f4c6e9..9f1aba316 100644 --- a/usecases/istio-installation.md +++ b/usecases/istio-installation.md @@ -6,11 +6,9 @@ ## 安装环境 -CentOS 7.3.1611 - -Docker 1.12.6 - -Kubernetes 1.6.0 +- CentOS 7.3.1611 +- Docker 1.12.6 +- Kubernetes 1.6.0 ## 安装 @@ -164,7 +162,7 @@ kubectl apply -f install/kubernetes/addons/servicegraph.yaml kubectl apply -f install/kubernetes/addons/zipkin.yaml ``` -在traefik ingress中增加增加以上几个服务的配置。 +在traefik ingress中增加增加以上几个服务的配置,同时增加istio-ingress配置。 ```Yaml - host: grafana.istio.io @@ -195,22 +193,15 @@ kubectl apply -f install/kubernetes/addons/zipkin.yaml backend: serviceName: zipkin servicePort: 9411 + - host: ingress.istio.io + http: + paths: + - path: / + backend: + serviceName: istio-ingress + servicePort: 80 ``` -Grafana页面 - -![Istio Grafana界面](../images/istio-grafana.jpg) - -Prometheus页面 - -![Prometheus页面](../images/istio-prometheus.jpg) - -Zipkin页面 - -![Zipkin页面](../images/istio-zipkin.jpg) - - - ## 测试 我们使用Istio提供的测试应用[bookinfo](https://istio.io/docs/samples/bookinfo.html)微服务来进行测试。 @@ -226,6 +217,10 @@ istio/examples-bookinfo-reviews-v3 istio/examples-bookinfo-productpage-v1 ``` +该应用架构图如下: + +![BookInfo Sample应用架构图](../images/bookinfo-sample-arch.png) + **部署应用** ``` @@ -234,9 +229,49 @@ kubectl create -f <(istioctl kube-inject -f samples/apps/bookinfo/bookinfo.yaml) `Istio kube-inject`命令会在`bookinfo.yaml`文件中增加Envoy sidecar信息。参考:https://istio.io/docs/reference/commands/istioctl.html#istioctl-kube-inject -## 问题 +在本机的`/etc/hosts`下增加VIP节点和`ingress.istio.io`的对应信息。具体步骤参考:[边缘节点配置](../practice/edge-node-configuration.md) -在bookinfo部署后没有在Grafana、Prometheus、ServiceGraph和Zipkin中看到结果。 +在浏览器中访问http://ingress.istio.io/productpage + +![BookInfo Sample页面](../images/bookinfo-sample.jpg) + +## 监控 + +不断刷新productpage页面,将可以在以下几个监控中看到如下界面。 + +**Grafana页面** + +http://grafana.istio.io + +![Istio Grafana界面](../images/istio-grafana.jpg) + +**Prometheus页面** + +http://prometheus.istio.io + +![Prometheus页面](../images/istio-prometheus.jpg) + +**Zipkin页面** + +http://zipkin.istio.io + +![Zipkin页面](../images/istio-zipkin.jpg) + +**ServiceGraph页面** + +http://servicegraph.istio.io/dotviz + +可以用来查看服务间的依赖关系。 + +访问http://servicegraph.istio.io/graph可以获得json格式的返回结果。 + +![ServiceGraph页面](../images/istio-servicegraph.jpg) + +## 更进一步 + +BookInfo示例中有三个版本的`reviews`,可以使用istio来配置路由请求,将流量分摊到不同版本的应用上。参考[Configuring Request Routing](https://istio.io/docs/tasks/request-routing.html)。 + +还有一些更高级的功能,我们后续将进一步探索。 ## 参考