summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/logging.rst136
-rw-r--r--docs/release/release-notes/index.rst2
-rw-r--r--docs/release/release-notes/release-notes.rst (renamed from docs/release/release-notes/Fraser-release-notes.rst)201
-rw-r--r--docs/release/userguide/Fraser-userguide.rst81
-rw-r--r--docs/release/userguide/index.rst2
-rw-r--r--docs/release/userguide/userguide.rst64
-rw-r--r--requirements.txt2
7 files changed, 304 insertions, 184 deletions
diff --git a/docs/logging.rst b/docs/logging.rst
index 196ba40..05f3f5b 100644
--- a/docs/logging.rst
+++ b/docs/logging.rst
@@ -26,3 +26,139 @@ It validates the installation with the following criterias
#. existence of fluented pod
#. fluentd input is configured correctly
#. TBD
+
+**************************
+Understanding how it works
+**************************
+
+In clover stack, Istio is configured to automatically gather logs for services
+in a mesh. More specificly, it is configured in `Mixer`_::
+
+- when to log
+- what to log
+- where to log
+
+.. _Mixer: https://istio.io/docs/concepts/policy-and-control/mixer.html
+
+When to log
+===========
+
+Istio defines when to log by creating a custom resource ``rule``. For example:
+
+.. code-block:: yaml
+
+ apiVersion: "config.istio.io/v1alpha2"
+ kind: rule
+ metadata:
+ name: newlogtofluentd
+ namespace: istio-system
+ spec:
+ match: "true" # match for all requests
+ actions:
+ - handler: handler.fluentd
+ instances:
+ - newlog.logentry
+
+This rule specifies that all instances of ``newlog.logentry`` that matches the
+expression will be handled by the specified handler ``handler.fluentd``. We
+shall explain ``instances`` and ``handler`` later. The expression ``true`` means
+whenever a request arrive at Mixer, it will trigger the actions defined belows.
+
+``rule`` is a custom resource definition from `Istio installation`_.
+
+.. code-block:: yaml
+
+ # Rule to send logentry instances to the fluentd handler
+ kind: CustomResourceDefinition
+ apiVersion: apiextensions.k8s.io/v1beta1
+ metadata:
+ name: rules.config.istio.io
+ labels:
+ package: istio.io.mixer
+ istio: core
+ spec:
+ group: config.istio.io
+ names:
+ kind: rule
+ plural: rules
+ singular: rule
+ scope: Namespaced
+ version: v1alpha2
+
+.. _Istio installation: https://github.com/istio/istio/blob/master/install/kubernetes/templates/istio-mixer.yaml.tmpl
+
+What to log
+===========
+
+The instance defines what content to be logged.
+
+> A (request) instance is the result of applying request attributes to the
+> template mapping. The mapping is specified as an instance configuration.
+
+For example:
+
+.. code-block:: yaml
+
+ # Configuration for logentry instances
+ apiVersion: "config.istio.io/v1alpha2"
+ kind: logentry
+ metadata:
+ name: newlog
+ namespace: istio-system
+ spec:
+ severity: '"info"'
+ timestamp: request.time
+ variables:
+ source: source.labels["app"] | source.service | "unknown"
+ user: source.user | "unknown"
+ destination: destination.labels["app"] | destination.service | "unknown"
+ responseCode: response.code | 0
+ responseSize: response.size | 0
+ latency: response.duration | "0ms"
+ monitored_resource_type: '"UNSPECIFIED"'
+
+The keys under ``spec`` should conform to the template. To learn what fields
+are available and valid type, you may need to reference the corresponding
+template, in this case, `Log Entry template`_.
+
+The values of each field could be either `Istio attributes`_ or an expression.
+
+> A given Istio deployment has a fixed vocabulary of attributes that it
+> understands. The specific vocabulary is determined by the set of attribute
+> producers being used in the deployment. The primary attribute producer in
+> Istio is Envoy, although Mixer and services can also introduce attributes.
+
+Refer to the `Attribute Vocabulary`_ to learn the full set.
+
+By the way, ``logentry`` is also a custom resource definition created by Istio.
+
+.. _Istio attributes: https://istio.io/docs/concepts/policy-and-control/attributes.html
+.. _Attribute Vocabulary: https://istio.io/docs/reference/config/mixer/attribute-vocabulary.html
+.. _Log Entry template: https://istio.io/docs/reference/config/template/logentry.html
+
+Where to log
+============
+
+For log, the handler defines where these information will be handled, in this
+example, a fluentd daemon on fluentd-es.logging:24224.
+
+.. code-block:: yaml
+
+ # Configuration for a fluentd handler
+ apiVersion: "config.istio.io/v1alpha2"
+ kind: fluentd
+ metadata:
+ name: handler
+ namespace: istio-system
+ spec:
+ address: "fluentd-es.logging:24224"
+
+In this example, handlers (``handler.fluentd``) configure `Adapters`_
+(``fluentd``) to handle the data delivered from the created instances
+(``newlog.logentry``).
+
+An adapter only accepts instance of specified kind. For example,
+`fluentd adapter`_ accepts logentry but not other kinds.
+
+.. _Adapters: https://istio.io/docs/concepts/policy-and-control/mixer.html#adapters
+.. _fluentd adapter: https://istio.io/docs/reference/config/adapters/fluentd.html
diff --git a/docs/release/release-notes/index.rst b/docs/release/release-notes/index.rst
index 1c41113..c7f8f6c 100644
--- a/docs/release/release-notes/index.rst
+++ b/docs/release/release-notes/index.rst
@@ -12,4 +12,4 @@ OPNFV Clover Design Specification
.. toctree::
:maxdepth: 1
- Fraser-release-notes
+ release-notes
diff --git a/docs/release/release-notes/Fraser-release-notes.rst b/docs/release/release-notes/release-notes.rst
index 3e864fb..f345f61 100644
--- a/docs/release/release-notes/Fraser-release-notes.rst
+++ b/docs/release/release-notes/release-notes.rst
@@ -1,100 +1,101 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. SPDX-License-Identifier CC-BY-4.0
-.. (c) optionally add copywriters name
-
-
-This document provides the release notes for Fraser of OPNFV Clover.
-
-.. contents::
- :depth: 3
- :local:
-
-
-Version history
----------------
-
-+--------------------+--------------------+--------------------+--------------------+
-| **Date** | **Ver.** | **Author** | **Comment** |
-| | | | |
-+--------------------+--------------------+--------------------+--------------------+
-| 2018-03-14 | Fraser 1.0 | Stephen Wong | First draft |
-| | | | |
-+--------------------+--------------------+--------------------+--------------------+
-
-Important notes
-===============
-
-The OPNFV Clover project for Fraser can ONLY be run on Kubernetes version 1.9.3 or
-above
-
-Summary
-=======
-
-Clover provides tools to help run cloud native virtual network functions. These
-tools include service-mesh and associated policy-based-routing config (via
-Istio), logging (via fluentd), monitoring (via Prometheus), and tracing (via
-OpenTracing and Jaeger).
-
-Release Data
-============
-
-+--------------------------------------+--------------------------------------+
-| **Project** | Clover |
-| | |
-+--------------------------------------+--------------------------------------+
-| **Repo/commit-ID** | |
-| | |
-+--------------------------------------+--------------------------------------+
-| **Release designation** | Fraser |
-| | |
-+--------------------------------------+--------------------------------------+
-| **Release date** | 2018-04-xx |
-| | |
-+--------------------------------------+--------------------------------------+
-| **Purpose of the delivery** | OPNFV Fraser release |
-| | |
-+--------------------------------------+--------------------------------------+
-
-Version change
-^^^^^^^^^^^^^^^^
-
-Module version changes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Fraser marks the first release of OPNFV Clover
-
-Document version changes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Fraser marks the first release of OPNFV Clover
-
-Reason for version
-^^^^^^^^^^^^^^^^^^^^
-
-Feature additions
-~~~~~~~~~~~~~~~~~~~~~~~
-<None> (no backlog)
-
-Bug corrections
-~~~~~~~~~~~~~~~~~~~~~
-<None>
-
-Known Limitations, Issues and Workarounds
-=========================================
-
-System Limitations
-^^^^^^^^^^^^^^^^^^^^
-TBD
-
-Known issues
-^^^^^^^^^^^^^^^
-TBD
-
-Workarounds
-^^^^^^^^^^^^^^^^^
-
-Test Result
-===========
-
-
-References
-==========
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. SPDX-License-Identifier CC-BY-4.0
+.. (c) Authors of Clover
+
+
+This document provides Clover project's release notes for the OPNFV Fraser release.
+
+.. contents::
+ :depth: 3
+ :local:
+
+
+Version history
+---------------
+
++--------------------+--------------------+--------------------+--------------------+
+| **Date** | **Ver.** | **Author** | **Comment** |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+| 2018-03-14 | Fraser 1.0 | Stephen Wong | First draft |
+| | | | |
++--------------------+--------------------+--------------------+--------------------+
+
+Important notes
+===============
+
+The Clover project for OPNFV Fraser can ONLY be run on Kubernetes version 1.9 or
+later
+
+Summary
+=======
+
+Clover Fraser release provides tools for installation and validation of various
+upstream cloud native projects including Istio, fluentd, Jaegar, and Prometheus.
+In addition, the Fraser release also includes a sample VNF, its Kubernetes
+manifest, simple tools to validate route rules from Istio, as well as an
+example A-B testing framework.
+
+Release Data
+============
+
++--------------------------------------+--------------------------------------+
+| **Project** | Clover |
+| | |
++--------------------------------------+--------------------------------------+
+| **Repo/commit-ID** | |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release designation** | Fraser |
+| | |
++--------------------------------------+--------------------------------------+
+| **Release date** | 2018-04-27
+| | |
++--------------------------------------+--------------------------------------+
+| **Purpose of the delivery** | OPNFV Fraser release |
+| | |
++--------------------------------------+--------------------------------------+
+
+Version change
+^^^^^^^^^^^^^^^^
+
+Module version changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+OPNFV Fraser marks the first release for Clover
+
+Document version changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+OPNFV Fraser marks the first release for Clover
+
+Reason for version
+^^^^^^^^^^^^^^^^^^^^
+
+Feature additions
+~~~~~~~~~~~~~~~~~~~~~~~
+<None> (no backlog)
+
+Bug corrections
+~~~~~~~~~~~~~~~~~~~~~
+<None>
+
+Known Limitations, Issues and Workarounds
+=========================================
+
+System Limitations
+^^^^^^^^^^^^^^^^^^^^
+TBD
+
+Known issues
+^^^^^^^^^^^^^^^
+TBD
+
+Workarounds
+^^^^^^^^^^^^^^^^^
+
+Test Result
+===========
+
+
+References
+==========
diff --git a/docs/release/userguide/Fraser-userguide.rst b/docs/release/userguide/Fraser-userguide.rst
deleted file mode 100644
index 243c4e1..0000000
--- a/docs/release/userguide/Fraser-userguide.rst
+++ /dev/null
@@ -1,81 +0,0 @@
-.. This work is licensed under a Creative Commons Attribution 4.0 International License.
-.. http://creativecommons.org/licenses/by/4.0
-.. SPDX-License-Identifier CC-BY-4.0
-.. (c) optionally add copywriters name
-
-
-================================================================
-Clover User Guide (Fraser Release)
-================================================================
-
-This document provides the user guide for Fraser release of Clover.
-
-.. contents::
- :depth: 3
- :local:
-
-
-Description
-===========
-
-Project Clover was established to investigate best practice to implement,
-build, deploy, and operate virtual network functions as cloud native
-applications. "Cloud native" has a ever evolving and expanding definition,
-and in Clover, the focus is effectively running and operating VNFs built
-in a micro-service design pattern running on Docker containers and
-orchestrated by Kubernetes.
-
-The strength of cloud native applications is their operablity and
-scalability. Essential to achieve these qualities is the use of service
-mesh. As such, in Fraser release, Clover's emphasis is on demonstrating
-running a sample micro-service composed VNF on Istio, the service mesh
-platform of Clover's choice in Fraser, and how to maximize visibility
-of this sample running in a service mesh.
-
-What is in Fraser?
-==================
-
- * a sample micro-service composed VNF
-
- * logging module: fluentd and elasticsearch Kubernetes manifests,
- installation validation, log data correlation in datastore
-
- * tracing module: jaeger Kubernetes manifest, installation validation,
- jaegar tracing query tools, trace data correlation in datastore
-
- * monitoring module: prometheus Kubernetes manifest, installation
- validation, prometheous query tools for Istio related metrics,
- metrics correlation in datastore
-
- * Istio route-rules and circuit breaking sample yaml and validation
- tools
-
- * Test scripts
-
- * Reference for a demo shown during ONS
-
-Usage
-=====
-
- * each modules (service mesh, logging, tracing, monitoring) are Python
- modules with their own set of library calls / API exposed. The descriptions
- of these library calls are under doc/developer (TBD)
-
- * tools directory contains Python tools for generic use
- python clover_validate_route_rules.py -s <service name> -n <number of tests>
- [more TBD]
-
- * an example scenario:
- - version 2 (v2) of a micro-service component is deployed
- - Istio route rule is applied to send 50% traffic to v2
- - Clover tool validates traffic conformance with route rules
- - user specify via yaml the "success" expectation of v2 (latency,
- performance, session loss...etc)
- - Clover tool validates sessions conformance with user defined expectations
- - The "commit" action is invoked to move 100% traffic to v2
- - Clover tool validates traffic conformance with route rules
- - A fault is injected for the path to the extra service of v2 which adds
- a one second delay onto the path
- - The same A-B testing script is invoked, this time, performance
- test now fails
- - The "rollback" action is invoked to move 100% traffic back to v1
diff --git a/docs/release/userguide/index.rst b/docs/release/userguide/index.rst
index 41fcb1f..672c62c 100644
--- a/docs/release/userguide/index.rst
+++ b/docs/release/userguide/index.rst
@@ -10,4 +10,4 @@ OPNFV Clover Design Specification
.. toctree::
:maxdepth: 1
- Fraser-userguide
+ userguide
diff --git a/docs/release/userguide/userguide.rst b/docs/release/userguide/userguide.rst
new file mode 100644
index 0000000..c01886e
--- /dev/null
+++ b/docs/release/userguide/userguide.rst
@@ -0,0 +1,64 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. SPDX-License-Identifier CC-BY-4.0
+.. (c) Authors of Clover
+
+
+================================================================
+Clover User Guide (Fraser Release)
+================================================================
+
+This document provides the Clover user guide for OPNFV Fraser release.
+
+.. contents::
+ :depth: 3
+ :local:
+
+
+Description
+===========
+
+As project Clover's first release, Fraser release includes installation
+and simple validation of foundational upstream projects including Istio,
+fluentd, Jaeger, and Prometheus. Clover Fraser release also provides a
+sample VNF which follows micro-service design pattern, its Kubernetes
+manifest, and an automatic scipt to demonstrate a sample A-B testing use
+case using the sample VNF running on Istio with trace data exposed to
+Jaeger running in istio-system namespace.
+
+What is in Fraser?
+==================
+
+ * a sample micro-service composed VNF
+
+ * logging module: fluentd and elasticsearch Kubernetes manifests,
+ and fluentd installation validation
+
+ * tracing module: jaeger Kubernetes manifest, installation validation,
+ jaegar tracing query tools, module for trace data output to datastore
+
+ * monitoring module: prometheus Kubernetes manifest, installation
+ validation, sample Prometheous query of Istio related metrics
+
+ * Istio route-rules sample yaml and validation tools
+
+ * Test scripts
+
+ * Sample code for an A-B testing demo shown during ONS
+
+Usage
+=====
+
+ * Python modules to validate installation of fluentd, Jaeger, and
+ Prometheus
+
+ * Installation and deployment of a sample VNF
+ - VNF designed and implemented with micro-service design pattern
+ - tested and validated via Istio service mesh tools
+
+ * sample tool to validate Istio route rules:
+ tools/python clover_validate_route_rules.py -s <service name> -t <test id>
+
+ * an example use case: A-B testing:
+ test/fraser_a_b_test.py -t yaml/fraser_a_b_test.yaml -p <tracing port num>
+ *** detail procedure to run sample A-B testing at docs/configguide/...
diff --git a/requirements.txt b/requirements.txt
index 4df7b7b..f40583f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-kubernetes>=1.0.0 # Apache-2.0
+kubernetes>=5.0.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
sh # MIT
xtesting # Apache-2.0