summaryrefslogtreecommitdiffstats
path: root/docs/tracing.rst
blob: 35b36aaadf7f65318970fee396ed59bfb6b52937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.. This work is licensed under a Creative Commons Attribution 4.0 International
.. License.
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV, Authors of Clover

.. _tracing:

#######
Tracing
#######

************
Installation
************

Currently, we use the Jaeger tracing all-in-one Kubernetes template for development and testing,
which uses in-memory storage. It can be deployed to the istio-system namespace with the
following command::

    kubectl apply -n istio-system -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml

Alternatively, both Prometheus and Jaeger can be installed in combination with the
Clover container using the command::

    $ sudo docker run --rm \
    -v ~/.kube/config:/root/.kube/config \
    opnfv/clover \
    /bin/bash -c '/home/opnfv/repos/clover/samples/scenarios/view.sh'

The standard Jaeger REST port is at 16686. To make this service available outside of the
Kubernetes cluster via any node IP in the cluster, use the following command::

    kubectl expose -n istio-system deployment jaeger-deployment --port=16686 --type=NodePort

Kubernetes will expose the Jaeger service on another port from 30000-32767 and the assignment can
be found with::

    kubectl get svc -n istio-system

An example listing from the command above is shown below where the Jaeger service is exposed
externally on port 30888 in this case::

    istio-system   jaeger-deployment   NodePort  10.104.113.94  <none> 16686:30888/TCP

Jaeger will be accessible using the host IP of any node in Kubernetes cluster and port provided.
With this method, the Jaeger UI will also be available from a remote host. If external access is
required to Jaeger but restricted to cluster localhost(s), an alternate method is to use the
**port-forward** command in the foreground, as shown below::

    kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686

********
Validate
********

The script in ``clover/tracing`` validates Jaeger installation::

    python clover/tracing/validate.py

It validates the installation with the following criteria:

#. Existence of Jaeger all-in-one deployment using Kubernetes
#. Jaeger service is accessible using IP address and port configured in installation steps
#. Optionally, if Jaeger can retrieve service listing for default Istio components
   (istio-ingress, istio-mixer). At least one HTTP request must be sent to istio-ingress
   after initial Jaeger deployment for this validation to function.