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 .. Modifications Copyright (c) 2020 Nokia
6 Working with SO Monitoring
7 ==========================
9 Starting from Guilin release SO Monitoring uses https and NodePort service during communication with operator.
10 Certificates used for communication are generated automatically using AAF and certInitializer, when SO Monitoring
11 is deployed using OOM. For that reason, no additional tasks are needed in order to access the SO Monitoring ui,
12 when the SO is fully deployed.
14 SO Monitoring contains also pre-installed certs which can be used in local development environment. **They are
15 for development purpose only!**
17 1. Credentials to login and initial setup
18 ---------------------------------------------
20 Defalut credentials and certs of SO Monitoring, if you want to develop SO Monitoring out of ONAP cluster,
21 are stored in the app. Credentials are as follows:
27 allow-bean-definition-overriding: true
32 password: '$2a$10$ndkDhATUid4a3g0JJVRv2esX4rtB.vzCn7iBhKyR1qZ/wDdvNzjTS'
35 Username - demo. Password (**demo123456!**) is bcrypted.
38 This setup is overridden by the override.yaml file which is stored in the OOM project.
39 Override.yaml file can be edited directly in case of local ONAP setup. This file is loaded into
40 container through configmap.
42 **Note** : If you want to change config stored in override.yaml on working deployment, you have to edit k8s
43 configmap. Due to insufficient permissions it is not possible directly in the container. After that pod have
46 **kubectl -n onap edit configmap dev-so-monitoring-app-configmap**
48 .. image:: ../images/configmap.png
50 Special care needs to be given to the indentation. Spring needs to be inline with the mso already present and others
53 **Attention! The default setup of the OOM makes SO Monitoring password is being automatically generated during ONAP
54 deployment and injected through k8s secret**
57 2. Setup, retrieve and edit default SO Monitoring password
58 ----------------------------------------------------------
60 Automatic generation of password for SO Monitoring during ONAP deployment can be overriden. In result, password
61 can be set up manually. Such case requires to edit ONAP config file, template of which is stored in
62 **oom/kubernetes/onap/values.yaml** file.
64 .. image:: ../images/so-monitoring-config.png
66 Following lines presented in fig. has to be uncommented.
68 If customized file is used, following code has to be paste under the SO config (be aware of indentation):
80 Alternative way (**not recommended**) is to add password entry in the **oom/kubernetes/so/components/so-monitoring/values.yaml**
90 To retrieve actual password for SO Monitoring on existing ONAP install, run the following command:
92 **kubectl get secret -n onap dev-so-monitoring-app-user-creds -o json | jq -r .data.password | base64 --decode**
94 .. image:: ../images/so-monitoring-password.png
96 To change actual password on existing ONAP install, **dev-so-monitoring-app-user-creds** secret has to be modified.
98 **kubectl edit secret -n onap dev-so-monitoring-app-user-creds**
100 .. image:: ../images/so-monitoring-secret.png
102 Edit password entry, which has to be given in base64 form. Base64 form of password can be obtained by running:
104 **echo 'YOUR_PASSWORD' | base64**
106 .. image:: ../images/so-monitorring-base64-password.png
108 Once, password was edited, pod has to be restarted.
111 3. Login to SO Monitoring
112 -------------------------
114 Identify the external port which is mapped to SO Monitoring using the following command. The default port is 30224 :
116 **sudo kubectl -n onap get svc | grep so-monitoring**
118 .. image:: ../images/nodemap.png
120 Then access the UI of SO Monitoring, for example by https://<IP>:30224/
122 .. image:: ../images/ui.png
124 4. Hiding the SO Monitoring service (ClusterIP)
125 ---------------------------------------
127 The SO Monitoring service is set to the NodePort type. It is used to expose the service at a static port.
128 Hence there is possibility to contact the NodePort Service, from outside cluster, by requesting <NodeIP>:<NodePort>.
130 In order to make the service only reachable from within the cluster, ClusterIP service has to be set.
132 Command used to edit the service configuration of SO Monitoring is:
134 **sudo kubectl edit svc so-monitoring -n onap**
136 .. image:: ../images/nodeport.png