You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/09/01 01:20:03 UTC

[skywalking] branch master updated: Add istio bypass adaptor setup document back (#3376)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 63b033d  Add istio bypass adaptor setup document back (#3376)
63b033d is described below

commit 63b033dfc0e80ad6b4d9efd8a6b47dc65e39ad53
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Sep 1 09:19:58 2019 +0800

    Add istio bypass adaptor setup document back (#3376)
    
    * Update document.
    
    * Enable ALS document
---
 docs/en/setup/envoy/als_setting.md               | 26 ++++++++--
 docs/en/setup/istio/README.md                    |  3 +-
 docs/en/setup/istio/yaml/01-metrictemplate.yml   | 24 +++++++++
 docs/en/setup/istio/yaml/02-skywalingadapter.yml | 26 ++++++++++
 docs/en/setup/istio/yaml/03-operator_cfg.yml     | 65 ++++++++++++++++++++++++
 5 files changed, 139 insertions(+), 5 deletions(-)

diff --git a/docs/en/setup/envoy/als_setting.md b/docs/en/setup/envoy/als_setting.md
index b57b608..0cabfdf 100644
--- a/docs/en/setup/envoy/als_setting.md
+++ b/docs/en/setup/envoy/als_setting.md
@@ -3,9 +3,29 @@ Envoy [ALS(access log service)](https://www.envoyproxy.io/docs/envoy/latest/api-
 fully logs about RPC routed, including HTTP and TCP.
 
 You need three steps to open ALS.
-1. Right now, Istio pilot hasn't supported to open ALS, so you have to change pilot codes.
-1. Open SkyWalking [envoy receiver](../backend/backend-receivers.md).
-1. Active ALS k8s-mesh analysis
+1. Open envoyAccessLogService at istio. See [more](https://github.com/istio/istio/blob/22198bd29b224139b9614fe506e5c07716928031/install/kubernetes/helm/istio/values.yaml#L179)
+on istio helm chart.
+```yaml
+    # Configure envoy gRPC access log service.
+    envoyAccessLogService:
+      enabled: false
+      host: # example: accesslog-service.istio-system
+      port: # example: 15000
+      tlsSettings:
+        mode: DISABLE # DISABLE, SIMPLE, MUTUAL, ISTIO_MUTUAL
+        clientCertificate: # example: /etc/istio/als/cert-chain.pem
+        privateKey: # example: /etc/istio/als/key.pem
+        caCertificates: # example: /etc/istio/als/root-cert.pem
+        sni: # example: als.somedomain
+        subjectAltNames: []
+        # - als.somedomain 
+      tcpKeepalive:
+        probes: 3
+        time: 10s
+        interval: 10s
+```
+2. Open SkyWalking [envoy receiver](../backend/backend-receivers.md).
+3. Active ALS k8s-mesh analysis
 ```yaml
 envoy-metric:
   default:
diff --git a/docs/en/setup/istio/README.md b/docs/en/setup/istio/README.md
index 8193403..f65b6a6 100644
--- a/docs/en/setup/istio/README.md
+++ b/docs/en/setup/istio/README.md
@@ -13,6 +13,5 @@ Follow the [deploying backend in kubernetes](../backend/backend-k8s.md) to insta
 
 ## Setup Istio to send metrics to oap
 
-Follow instructions in the [setup Istio to send metrics to oap](https://github.com/apache/skywalking-kubernetes#setup-istio-to-send-metrics-to-oap)
- to setup Istio with oap.
+The SkyWalking uses Istio bypass adapter collects metrics. Use `kubectl apply -f` with the `yaml`(s) in [the yaml folder](yaml) to setup.
  
\ No newline at end of file
diff --git a/docs/en/setup/istio/yaml/01-metrictemplate.yml b/docs/en/setup/istio/yaml/01-metrictemplate.yml
new file mode 100755
index 0000000..45e814e
--- /dev/null
+++ b/docs/en/setup/istio/yaml/01-metrictemplate.yml
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: "config.istio.io/v1alpha2"
+kind: template
+metadata:
+  name: metric
+  namespace: istio-system
+spec:
+  descriptor: "CsD3AgogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3IucHJvdG8SD2dvb2dsZS5wcm90b2J1ZiJNChFGaWxlRGVzY3JpcHRvclNldBI4CgRmaWxlGAEgAygLMiQuZ29vZ2xlLnByb3RvYnVmLkZpbGVEZXNjcmlwdG9yUHJvdG9SBGZpbGUi5AQKE0ZpbGVEZXNjcmlwdG9yUHJvdG8SEgoEbmFtZRgBIAEoCVIEbmFtZRIYCgdwYWNrYWdlGAIgASgJUgdwYWNrYWdlEh4KCmRlcGVuZGVuY3kYAyADKAlSCmRlcGVuZGVuY3kSKwoRcHVibGljX2RlcGVuZGVuY3kYCiADKAVSEHB1YmxpY0RlcGVuZGVuY3kSJwoPd2Vha19kZXBlbmRlbmN5GAsgAygFUg53ZWFrRGVwZW5kZW5jeRJDCgxtZXNzYWdlX3R5cGUYBCADKAsyIC5nb29nbGUucHJvd [...]
+---
\ No newline at end of file
diff --git a/docs/en/setup/istio/yaml/02-skywalingadapter.yml b/docs/en/setup/istio/yaml/02-skywalingadapter.yml
new file mode 100755
index 0000000..d98ef2f
--- /dev/null
+++ b/docs/en/setup/istio/yaml/02-skywalingadapter.yml
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: "config.istio.io/v1alpha2"
+kind: adapter
+metadata:
+  name: swadapter
+  namespace: istio-system
+spec:
+  description:
+  session_based: false
+  templates:
+  - metric
diff --git a/docs/en/setup/istio/yaml/03-operator_cfg.yml b/docs/en/setup/istio/yaml/03-operator_cfg.yml
new file mode 100755
index 0000000..bb73968
--- /dev/null
+++ b/docs/en/setup/istio/yaml/03-operator_cfg.yml
@@ -0,0 +1,65 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: "config.istio.io/v1alpha2"
+kind: handler
+metadata:
+ name: sw
+ namespace: istio-system
+spec:
+ adapter: swadapter
+ connection:
+   address: "oap.skywalking.svc.cluster.local:11800"
+---
+
+# instance for template metric
+apiVersion: "config.istio.io/v1alpha2"
+kind: instance
+metadata:
+ name: swmetric
+ namespace: istio-system
+spec:
+ template: metric
+ params:
+   value: request.size | 0
+   dimensions:
+     sourceService: source.workload.name | ""
+     sourceNamespace: source.workload.namespace | ""
+     sourceUID: source.uid | ""
+     destinationService: destination.workload.name | ""
+     destinationNamespace: destination.workload.namespace | ""
+     destinationUID: destination.uid | ""
+     requestMethod: request.method | ""
+     requestPath: request.path | ""
+     requestScheme: request.scheme | ""
+     requestTime: request.time
+     responseTime: response.time
+     responseCode: response.code | 200
+     reporter: conditional((context.reporter.kind | "inbound") == "outbound", "source", "destination")
+     apiProtocol: api.protocol | ""
+---
+
+# rule to dispatch to handler sw
+apiVersion: "config.istio.io/v1alpha2"
+kind: rule
+metadata:
+ name: swmetric-rule
+ namespace: istio-system
+spec:
+ actions:
+ - handler: sw.istio-system
+   instances:
+   - swmetric