[PMSH] Add ip to example event
[dcaegen2.git] / docs / sections / services / tca-cdap / troubleshoot.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Troubleshooting Steps
5 =====================
6
7 To support K8S deployment, TCA is packaged using CDAP SDK as base container. Deployment of TCA is done using cloudify blueprint which gets executed part of DCAE bootstrap container during ONAP/DCAE installation. 
8
9 The logs for TCA are accessible through CDAP GUI which is exposed on 11011/http. To enable external cluster access, a K8S nodeport is required.
10
11 Prior to El-Alto release, 32010 nodeport was assigned by default to enable logs/validation. In El-Alto reason for security reasons,  nodeport is no longer enabled by default under ONAP/DCAE deployment.
12
13
14 Enable Nodeport
15 ---------------
16
17 Following procedure can be used to enable nodeport for troubleshooting purpose.
18
19
20 Update existing TCA service to change the service type from ClusterIP to NodePort by editing service definition
21     .. code-block:: bash
22
23         kubectl edit services -n onap dcae-tca-analytics
24
25 * Change type from ClusterIP to NodePort
26 * Set nodePort: 32010
27 * Set externalTrafficPolicy: Cluster
28
29 Once modified, save and exit. K8s will redeploy the TCA service and nodeport 32010 will be available for access.
30
31 Following is an example
32
33 Original service definition  
34
35     .. code-block:: bash
36
37             spec:
38               clusterIP: 10.43.62.180
39               ports:
40               - name: port-t-11011
41                 port: 11011
42                 protocol: TCP
43                 targetPort: 11011
44               selector:
45                 app: dcae-tca-analytics
46               sessionAffinity: None
47               type: ClusterIP
48             status:
49               loadBalancer: {}
50
51
52 Modified service definition to expose NodePort
53
54     .. code-block:: bash
55
56             spec:
57               clusterIP: 10.43.62.180
58               externalTrafficPolicy: Cluster
59               ports:
60               - name: port-t-11011
61                 nodePort: 32010
62                 port: 11011
63                 protocol: TCP
64                 targetPort: 11011
65               selector:
66                 app: dcae-tca-analytics
67               sessionAffinity: None
68               type: NodePort
69             status:
70               loadBalancer: {}
71
72
73
74 - Verify if updates done are reflected in K8S
75
76         .. code-block:: bash
77
78           kubectl get svc -n onap | grep dcae-tca-analytics
79           dcae-tca-analytics          NodePort       10.43.62.180    <none>                                 11011:32010/TCP                       83
80
81
82 - CDAP GUI can now be accessed using **http://<k8snodeip>:32010**
83
84 - Verify if following TCA process are in "RUNNING" state under **http://<k8snodeip>:32010/oldcdap/ns/cdap_tca_hi_lo/apps/dcae-tca/overview/programs**
85
86            * TCADMaaPMRPublisherWorker 
87            * TCADMaaPMRSubscriberWorker
88            * TCAVESCollectorFlow 
89
90
91 - Under each process, logs can be viewed (or downloaded) by clicking on "Logs" tab