Merge "[SO] heatbridge implemention to populate AAI with openstack provider network...
[so.git] / docs / developer_info / Working_with_so_monitoring.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright 2017 Huawei Technologies Co., Ltd.
4
5 Working with SO Monitoring
6 ==========================
7
8 After the SO code is fully deployed, certain changes needs to be made in order to access the so-monitoring ui.
9
10 1. Change the service type to NodePort
11 ---------------------------------------
12
13 By default, the type of the so monitoring service is ClusterIP, which makes the Service only reachable from within the cluster.
14 This is changed to NodePort, which is used to expose the service at a static port . Hence we will be able to contact the NodePort Service, from outside the cluster, by requesting <NodeIP>:<NodePort>.
15
16 Command used to get the service configuration of so monitoring is:
17
18 **sudo kubectl edit svc so-monitoring -n onap**
19
20 .. image:: ../images/nodeport.png
21
22 2. Add the credentials to login
23 --------------------------------
24
25 The override.yaml needs to be added with the login credentials, that is the username and the password in encrypted form.
26
27 .. code-block:: bash
28
29  spring:
30    main:
31      allow-bean-definition-overriding: true
32    security:
33      usercredentials:
34      -                                         
35        username: gui
36        password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke'
37        role: GUI-Client
38
39 This override.yaml can be directly edited in case of local setup using docker.
40
41 When deploying in any environment  using OOM, then after deployment the configmap needs to be edited. As configmap is the one reading the override.yaml.
42
43 **Note** : Before deployment , if we add these changes in override.yaml ,then it may give parsing error in configmap while deployment. And after deployment the permissions on override.yaml don't allow us to edit it. So the best option is to edit the configmap using the below command and restart the pod. 
44
45 **kubectl -n onap edit configmap dev-so-monitoring-app-configmap**
46
47 .. image:: ../images/configmap.png
48
49 Special care needs to be given to the indentation. spring needs to be inline with the mso already present and others added accordingly.
50
51 3. Login to SO Monitoring
52 -------------------------
53
54 We need to first identify the external port which its mapped to using the following command : 
55
56 **sudo kubectl -n onap get svc | grep so-monitoring**
57
58 .. image:: ../images/nodemap.png
59
60 Then access the UI of so monitoring , for example by  http://<IP>:30224/ 
61
62 username : gui,
63 password: password1$
64
65
66 .. image:: ../images/ui.png
67
68
69
70