ric-plt/vespamgr.git
4 years agoFix NfNamingCode and remove NfcNamingCodes 36/1036/5
Roni Riska [Mon, 30 Sep 2019 06:39:12 +0000 (09:39 +0300)]
Fix NfNamingCode and remove NfcNamingCodes

NFNamingCode is read from environment variable VESMGR_NFNAMINGCODE.
If not set, the default value is "ricp".

NfcNamingCodes is an empty list.

Also add vesmgr version information log at vesmgr startup.
The version information is generated at compile time
from the container-tag.yaml file (if exists) and
from the git hash of the last commit.

Change-Id: If524e679dbba2ee56217b2e03b1daf18eb2c46fb
Signed-off-by: Roni Riska <roni.riska@nokia.com>
4 years agoFix event config: VNFName, ReportingEntityName and ID 17/1017/1
Katri Turunen [Thu, 26 Sep 2019 09:46:07 +0000 (12:46 +0300)]
Fix event config: VNFName, ReportingEntityName and ID

Vesmgr configures the Vespa event with the following values:
- VNFName: Value from env variable VESMGR_VNFNAME,
           default, if the env variable does not exist: Vespa
- ReportingEntityName: Vespa
- ReportingEntityId: system UUID read from
                     /sys/class/dmi/id/product_uuid

Change-Id: Ib25d7271be363236f24295df9d5f4e940a741360
Signed-off-by: Katri Turunen <katri.turunen@nokia.com>
4 years agoRefactor the code 14/1014/3
Roni Riska [Thu, 26 Sep 2019 05:20:44 +0000 (08:20 +0300)]
Refactor the code

Multiple code refactorings to make the code
simpler and increase the unit testing coverage.

* Golint findings are fixed.
* Xapp query function name changed from status to
  config.

The functionality is slightly changed so that
  - Vespa is started only after the xapp notification
    subscription is successful and the vesmgr has received
    the current xapp configuration from the xapp manager.
  - The vesmgr goes to the main loop after that.

Change-Id: Ie2675c0543d4e4ce0a60b92a6c06a79b9e2cb2cd
Signed-off-by: Roni Riska <roni.riska@nokia.com>
4 years agoAdd troubleshooting tools 07/1007/2
Roni Riska [Wed, 25 Sep 2019 09:28:32 +0000 (12:28 +0300)]
Add troubleshooting tools

Add some troubleshooting related commands to the container:
 - iputils-ping
 - net-tools
 - curl

Change-Id: I2bcb1c1dc7e98bcd7eb72066e4bec8e7f1ae226a
Signed-off-by: Roni Riska <roni.riska@nokia.com>
4 years agoQuery Xapp config after subscription 63/963/3
Roni Riska [Tue, 17 Sep 2019 09:56:52 +0000 (12:56 +0300)]
Query Xapp config after subscription

When the xapp notification subscription
is done vesmgr makes a query of running
xapps and recreates the vespa configuration
and starts vespa.

Vespa is not started before we have got the
configuration from the xapp manager.

Change-Id: I286fff7ed33e5704e6b9a18d1dd5358b6282bbdb
Signed-off-by: Roni Riska <roni.riska@nokia.com>
4 years agoAdd liveness probe 62/962/1
Katri Turunen [Tue, 17 Sep 2019 07:45:37 +0000 (10:45 +0300)]
Add liveness probe

Change-Id: I9c055408f76d49102a0ea14f17f2fd0d1d0a87ab
Signed-off-by: Katri Turunen <katri.turunen@nokia.com>
4 years agoConfigure xApp metrics in xApp description 60/960/3
Katri Turunen [Mon, 16 Sep 2019 05:48:18 +0000 (08:48 +0300)]
Configure xApp metrics in xApp description

Vesmgr subscribes the xApp notifications from xAppMgr. When it
receives a notification, it requests the xApp config from xAppMgr,
creates the VESPA configuration according to it, and restarts
VESPA with the new configuration.

The xApp counters should be defined in the xApp descriptor.
Vesmgr reads the counter definitions from section config->metrics.
The following fields are required:

* name - Prometheus name of the counter
* objectName - Ves collector object name
* objectInstance - Ves collector object instance

If the same counter name is defined by several xApps,
vesmgr makes the configuration based on the first definition
and ignores the latter ones, if they are conflicting.
However, VESPA reports all counters to Ves collector regardless
of the xApp exposing them.

VESPA reads the ricComponentName from Prometheus label
"kubernetes_name".

There are no more hard-coded metrics configured in this version.

Change-Id: I746c6941cebe686165aed97e223b0ec0e9c7a679
Signed-off-by: Katri Turunen <katri.turunen@nokia.com>
4 years agoRead PrimaryCollector parameters from env variables 57/857/2
Katri Turunen [Mon, 2 Sep 2019 07:28:52 +0000 (10:28 +0300)]
Read PrimaryCollector parameters from env variables

The following environment variables are expected:
VESMGR_PRICOLLECTOR_USER
VESMGR_PRICOLLECTOR_PASSWORD
VESMGR_PRICOLLECTOR_PASSPHRASE
VESMGR_PRICOLLECTOR_SERVERROOT
VESMGR_PRICOLLECTOR_TOPIC
VESMGR_PRICOLLECTOR_SECURE

Vesmgr now passes the parameters to VESPA via yaml instead of cmd line.

This commit contains also the following changes:
- Correcttion to VESPA configuration: FixAdditionalObject --> FixAdditionalObjects
- Added UT run to Dockerfile as part of the build.

Change-Id: Ib15916dba8c22a19a50da6d77e1e5a54418f2ff4
Signed-off-by: Katri Turunen <katri.turunen@nokia.com>
4 years agoAdd first version of VES agent and vesmgr 15/715/4
Katri Turunen [Thu, 15 Aug 2019 07:49:36 +0000 (10:49 +0300)]
Add first version of VES agent and vesmgr

Vesmgr starts VES agent with a hard-coded measurement
configuration.

The following parameters can be defined as environment variables:
VESMGR_HB_INTERVAL
VESMGR_MEAS_INTERVAL
VESMGR_PRICOLLECTOR_ADDR
VESMGR_PRICOLLECTOR_PORT
VESMGR_PROMETHEUS_ADDR

Change-Id: I2faf07fca10864d331d81c2c15b94b9f263402b5
Signed-off-by: Katri Turunen <katri.turunen@nokia.com>
5 years agoInitial empty repository
suresh channamallu [Tue, 14 May 2019 17:56:23 +0000 (17:56 +0000)]
Initial empty repository