Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Library

Precondition

  • Server flavor : 8 vCPU / 30GB RAM / 100GB HDD
  • Server OS : Ubuntu 16.04

...

  • Verify that all docker containers are up :
No Format
root@hv-ves-sim:~# docker ps -a
CONTAINER ID        IMAGE                                                       COMMAND                  CREATED             STATUS                    PORTS                                                                            NAMES
5a4c5011bfeb        nexus3.onap.org:10003/onap/ves-hv-collector-xnf-simulator   "./run-java.sh run..."   27 seconds ago      Up 27 seconds             0.0.0.0:6062->6062/tcp                                                           hv-ves_sim_xnf-simulator_1
ad910797eb72        nexus3.onap.org:10003/onap/ves-hv-collector:latest          "./run-java.sh run..."   28 seconds ago      Up 27 seconds (healthy)   0.0.0.0:6060-6061->6060-6061/tcp                                                 hv-ves_sim_ves-hv-collector_1
db196f77fd8e        wurstmeister/kafka                                          "start-kafka.sh"         28 seconds ago      Up 28 seconds             0.0.0.0:9092->9092/tcp                                                           hv-ves_sim_kafka_1
e8713cceb027        progrium/consul                                             "/bin/start -serve..."   30 seconds ago      Up 28 seconds             53/tcp, 53/udp, 8300-8302/tcp, 8400/tcp, 8301-8302/udp, 0.0.0.0:8500->8500/tcp   hv-ves_sim_consul_1
5440e045d0a3        wurstmeister/zookeeper                                      "/bin/sh -c '/usr/..."   30 seconds ago      Up 30 seconds             22/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2181->2181/tcp                               hv-ves_sim_zookeeper_1
root@hv-ves-sim:~#
  • Verify HV-VES configuration from HV-VES docker container :
No Format
root@hv-ves-sim:~# docker exec -ti ad910797eb72 bash
root@ad910797eb72:/opt/ves-hv-collector# curl http://consul:8500/v1/kv/veshv-config
[{"CreateIndex":5,"ModifyIndex":5,"LockIndex":0,"Key":"veshv-config","Flags":0,"Value":"eyJrYWZrYUJvb3RzdHJhcFNlcnZlcnMiOiAia2Fma2E6OTA5MiIsInJvdXRpbmciOlt7ImZyb21Eb21haW4iOjExLCJ0b1RvcGljIjoidmVzX2h2UmFuTWVhcyJ9XX0="}]

...

  • Start HV-VES container log :
No Format
root@hv-ves-sim:~# docker logs --tail 0 -f ad910797eb7
  • Start Kafka consumer log :
No Format
root@hv-ves-sim:~# docker exec -ti db196f77fd8e sh
/ # kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ves_hvRanMeas
  • Send message using simulator.sh script :
No Format
root@hvhv-ves-sim:~# hv-ves_sim/simulator.sh send hv-ves_sim/samples/xnf-valid-messages-request.json
{"response":"Request accepted"}

...

  • Check Kafka consumer log :
No Format
root@hv-ves-sim:~# docker exec -ti db196f77fd8e sh
/ # kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ves_hvRanMeas

?
sample-version
                *sample-version2sample-version:sample-version@???9H???9Rsample-nf-naming-codeZsample-nfc-naming-codebsample-reporting-entity-idjsample-reporting-entity-namersample-source-idzsample-source-namec
a
sample/uri8873???
?    ???????????????????????    ?????/???????a???????

...

No Format
root@rancher:~# kubectl -n onap get pods | grep hv-ves
dep-dcae-hv-ves-collector-6ddbb546c8-v5gv4      2/2       Running            0          1d
root@rancher:~#
  • Check if xNF simulator is up :
No Format
root@hv-ves-sim:~/hv-ves_sim# docker ps -a
CONTAINER ID        IMAGE                                                                                              COMMAND                  CREATED             STATUS              PORTS                    NAMES
eb946d45cc01        nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-xnf-simulator:latest   "./run-java.sh run..."   24 hours ago        Up 24 hours         0.0.0.0:6062->6062/tcp   brave_bartik
root@hv-ves-sim:~/hv-ves_sim#
  • Forward Kafka pod port to node one :
No Format
root@rancher:~# kubectl -n onap port-forward dev-message-router-kafka-7d75bf94bc-77jbf 9092:9092
Forwarding from 127.0.0.1:9092 -> 9092
  • Forward HV-VES simulator 9092 port to the node from previous step :
No Format
root@hv-ves-sim:~# ssh -L 9092:localhost:9092 10.183.34.151
  • Send event from xNF simulator :
No Format
root@hv-ves-sim:~/cd hv-ves_sim#sim ; ./simulator.sh send ./samples/single_xnf-simulator-smaller-valid-request.json
6447df9c-b044-47bb-a1c2-77b6d21b9c9d
root@hv-ves-sim:~/hv-ves_sim#
  • Check HV-VES log :
No Format
root@rancher:~# kubectl -n onap logs dep-dcae-hv-ves-collector-6ddbb546c8-v5gv4 dcae-hv-ves-collector -f --tail=4
p.dcae.collectors.veshv.impl.socket.NettyTcpServer | 2018-09-27T10:00:39.020Z | INFO  | Handling connection from /10.42.0.1:56454 |  | reactor-tcp-server-epoll-14
p.dcae.collectors.veshv.impl.socket.NettyTcpServer | 2018-09-27T10:01:39.028Z | INFO  | Idle timeout of 60 s reached. Closing connection from /10.42.0.1:56454... |  | reactor-tcp-server-epoll-14
p.dcae.collectors.veshv.impl.socket.NettyTcpServer | 2018-09-27T10:01:39.029Z | INFO  | Connection from /10.42.0.1:56454 has been closed |  | reactor-tcp-server-epoll-14
p.dcae.collectors.veshv.impl.socket.NettyTcpServer | 2018-09-27T10:01:39.029Z | DEBUG | Channel (/10.42.0.1:56454) closed successfully. |  | reactor-tcp-server-epoll-14
  • Check Kafka topic content :

Casablanca

No Format
root@hv-ves-sim:~/hv-ves_sim# kafkacat kafkacat -C -b localhost:9092 -t HV_VES_PERF3GPP -D "" -o -1 -c 1

?
sample-versionperf3gpp *
perf3GPP222sample-event-name:sample-event-type@????H????Rsample-nf-naming-codeZsample-nfc-naming-codebsample-nf-vendor-namejsample-reporting-entity-idrsample-reporting-entity-namezsample-source-id?sample-xnf-name?    UTC+02:00?7.0.2test test test
root@hv-ves-sim:~/hv-ves_sim# 
  • Decode message from Kafka topic :
No Format
root@hv-ves-sim:~/hv-ves_sim/proto# 

Dublin onward

No Format
kafkacat -C -b localhostmessage-router-kafka:9092 -t HV_VES_PERF3GPP -D ""X security.protocol=SASL_PLAINTEXT -o -1X sasl.mechanisms=PLAIN -c 1 | protoc --decode_raw --proto_path=/root/hv-ves_sim/proto/
1 {
  1: "sample-version"
  2: "perf3gpp"
  3: 1
  4: 1
  5: "perf3GPP22"
  6: "sample-event-name"
  7: "sample-event-type"
  8: 1539263857
  9: 1539263857
  10: "sample-nf-naming-code"
  11: "sample-nfc-naming-code"
  12: "sample-nf-vendor-name"
  13: "sample-reporting-entity-id"
  14: "sample-reporting-entity-name"
  15: "sample-source-id"
  16: "sample-xnf-name"
  17: "UTC+02:00"
  18: "7.0.2"
}
2: "test test test"
root@hv-ves-sim:~/hv-ves_sim/proto#

HV-VES xNF message simulation from shell

  • Prepare HV-VES VesEvent message in hex dump format :
No Format
root@hv-ves-sim:~/hv-ves_sim/proto# cat hvves_event 
commonEventHeader: {
        versionX sasl.username=admin -X sasl.password=admin_secret -D "" -o -1 -c 1

?
sample-versionperf3gpp *
perf3GPP222sample-event-name:sample-event-type@????H????Rsample-nf-naming-codeZsample-nfc-naming-codebsample-nf-vendor-namejsample-reporting-entity-idrsample-reporting-entity-namezsample-source-id?sample-xnf-name?    UTC+02:00?7.0.2test test test 
  • Decode message from Kafka topic :

Casablanca

No Format
kafkacat -C -b localhost:9092 -t HV_VES_PERF3GPP -D "" -o -1 -c 1 | protoc --decode_raw
1 {
  1: "sample-version"
        eventName2: "sample-event-nameperf3gpp"
  3: 1
    domain4: "perf3gpp"1
        eventId5: "perf3GPP22"
  6: "sample-event-name"
    eventType7: "sample-event-type"
  8: 1539263857
  9: 1539263857
  nfcNamingCode10: "sample-nfcnf-naming-code"
        nfNamingCode11: "sample-nfnfc-naming-code"
        nfVendorName12: "sample-nf-vendor-name"
        sourceId13: "sample-reporting-sourceentity-id"
        sourceName: "sample-xnf14: "sample-reporting-entity-name"
        reportingEntityId15: "sample-reportingsource-entity-id"
        reportingEntityName16: "sample-reporting-entityxnf-name"
  17: "UTC+02:00"
    priority18: 1
        startEpochMicrosec: 1539263857
        lastEpochMicrosec: 1539263857
        timeZoneOffset: "UTC+02:00"
        sequence"7.0.2"
}
2: "test test test"

Dublin onward

No Format
kafkacat -C -b message-router-kafka:9092 -t HV_VES_PERF3GPP -X security.protocol=SASL_PLAINTEXT -X sasl.mechanisms=PLAIN -X sasl.username=admin -X sasl.password=admin_secret -D "" -o -1 -c 1 | protoc --decode_raw
1 {
  1: "sample-version"
  2: "perf3gpp"
  3: 1
  4: 1
    vesEventListenerVersion5: "7.0.2perf3GPP22"
 } eventFields6: "test test test"

root@hv-ves-sim:~/hv-ves_sim/proto# echo -n "\x`cat hvves_event | protoc -I=/root/hv-ves_sim/proto VesEvent.proto --encode=VesEvent | xxd -p -c 1000 | grep -o .. | xargs echo -n | sed 's/ /\\\x/g'`"
\x0a\x94\x02\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x08\x70\x65\x72\x66\x33\x67\x70\x70\x18\x01\x20\x01\x2a\x0a\x70\x65\x72\x66\x33\x47\x50\x50\x32\x32\x32\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x6e\x61\x6d\x65\x3a\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x74\x79\x70\x65\x40\xf1\x9a\xfd\xdd\x05\x48\xf1\x9a\xfd\xdd\x05\x52\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x5a\x16\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x63\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x62\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x76\x65\x6e\x64\x6f\x72\x2d\x6e\x61\x6d\x65\x6a\x1a\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x69\x64\x72\x1c\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x6e\x61\x6d\x65\x7a\x10sample-event-name"
  7: "sample-event-type"
  8: 1539263857
  9: 1539263857
  10: "sample-nf-naming-code"
  11: "sample-nfc-naming-code"
  12: "sample-nf-vendor-name"
  13: "sample-reporting-entity-id"
  14: "sample-reporting-entity-name"
  15: "sample-source-id"
  16: "sample-xnf-name"
  17: "UTC+02:00"
  18: "7.0.2"
}
2: "test test test"

HV-VES xNF message simulation from shell

  • Prepare HV-VES VesEvent message in hex dump format :
No Format
cd ~/hv-ves_sim/proto ; cat hvves_event 
commonEventHeader: {
        version: "sample-version"
        eventName: "sample-event-name"
        domain: "perf3gpp"
        eventId: "perf3GPP22"
        eventType: "sample-event-type"
        nfcNamingCode: "sample-nfc-naming-code"
        nfNamingCode: "sample-nf-naming-code"
        nfVendorName: "sample-nf-vendor-name"
        sourceId: "sample-source-id"
        sourceName: "sample-xnf-name"
        reportingEntityId: "sample-reporting-entity-id"
        reportingEntityName: "sample-reporting-entity-name"
        priority: 1
        startEpochMicrosec: 1539263857
        lastEpochMicrosec: 1539263857
        timeZoneOffset: "UTC+02:00"
        sequence: 1
        vesEventListenerVersion: "7.0.2"
}
eventFields: "test test test"


No Format
cd ~/hv-ves_sim/proto ; echo -n "\x`cat hvves_event | protoc -I=/root/hv-ves_sim/proto VesEvent.proto --encode=VesEvent | xxd -p -c 1000 | grep -o .. | xargs echo -n | sed 's/ /\\\x/g'`"
\x0a\x94\x02\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x73x76\x6f\x75x65\x72\x63x73\x65x69\x2dx6f\x69x6e\x64x12\x82x08\x01x70\x0fx65\x73x72\x61\x6dx66\x33\x67\x70\x70\x6cx18\x65x01\x2dx20\x78x01\x6ex2a\x66x0a\x2dx70\x6ex65\x61x72\x6dx66\x65x33\x8ax47\x01x50\x09x50\x55x32\x54x32\x43x32\x2bx11\x30x73\x32x61\x3ax6d\x30x70\x30x6c\x92x65\x01x2d\x05x65\x37x76\x2ex65\x30x6e\x2ex74\x32x2d\x12x6e\x0ex61\x74x6d\x65\x3a\x11\x73\x61\x74x6d\x20x70\x74x6c\x65\x73x2d\x74x65\x20\x74x76\x65\x73\x74[maras@dais
No Format
\xaa\x01\x00\x00\x00\x00\x00\x01\x00\x00\x01\x27\x0a\x94\x02\x0a\x0ex6e\x74\x2d\x74\x79\x70\x65\x40\xf1\x9a\xfd\xdd\x05\x48\xf1\x9a\xfd\xdd\x05\x52\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x76x2d\x65x6e\x72x61\x73x6d\x69\x6e\x6fx67\x6ex2d\x12x63\x08x6f\x70x64\x65\x72x5a\x66x16\x33x73\x67x61\x70x6d\x70\x18x6c\x01x65\x20x2d\x01x6e\x2ax66\x0ax63\x70x2d\x65x6e\x72x61\x66x6d\x33x69\x47x6e\x50x67\x50x2d\x32\x32\x32\x11x63\x6f\x64\x65\x62\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x65x66\x2d\x76\x65\x6e\x64\x6f\x74x72\x2d\x6e\x61\x6d\x65\x3ax6a\x11x1a\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x76x70\x65x6f\x6ex72\x74\x2dx69\x74x6e\x79x67\x70x2d\x65\x40x6e\xf1x74\x9ax69\xfdx74\xddx79\x05x2d\x48x69\xf1x64\x9a\xfd\xdd\x05\x52\x15x72\x1c\x73\x61\x6d\x70\x6c\x65\x2d\x6ex72\x66x65\x2dx70\x6ex6f\x61x72\x6dx74\x69\x6e\x67\x2d\x63x65\x6fx6e\x64x74\x65x69\x5ax74\x16x79\x73x2d\x6e\x61\x6d\x65\x70x7a\x10\x6cx73\x65x61\x2dx6d\x6ex70\x66x6c\x63x65\x2d\x6ex73\x61x6f\x6dx75\x69x72\x6ex63\x67x65\x2d\x63\x6fx69\x64\x65x82\x62x01\x15x0f\x73\x61\x6d\x70\x6c\x65\x2d\x78\x6e\x66\x2d\x6e\x61\x76x6d\x65\x6ex8a\x64x01\x6fx09\x72x55\x2dx54\x6ex43\x61x2b\x6dx30\x65x32\x6ax3a\x1ax30\x73x30\x61x92\x6dx01\x70x05\x6cx37\x65x2e\x2dx30\x72x2e\x65x32\x70x12\x6f\x72x0e\x74\x69x65\x6e\x67\x2d\x65\x6e\x73\x74\x69x20\x74\x79\x2d\x69\x64\x72\x1cx65\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x6e\x61\x6d\x65\x7a\x10\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x69\x64\x82\x01\x0fx20\x74\x65\x73\x74


No Format
\xaa\x01\x00\x00\x00\x00\x00\x01\x00\x00\x01\x27\x0a\x94\x02\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x76\x65\x78x72\x6ex73\x66x69\x2dx6f\x6e\x12\x61x08\x6dx70\x65\x72\x8ax66\x01x33\x09x67\x55x70\x54x70\x43x18\x2bx01\x30x20\x32x01\x3ax2a\x30x0a\x30x70\x92x65\x01x72\x05x66\x37x33\x2ex47\x30x50\x2ex50\x32\x12x32\x0ex32\x74x11\x65x73\x73x61\x74x6d\x20x70\x74x6c\x65\x73x2d\x74x65\x20x76\x74\x65\x73\x74
  • Send WFP message to HV-VES :
No Format
root@hv-ves-sim:~/hv-ves_sim/proto# echo -ne "\xaa\x01\x00\x00\x00\x00\x00\x01\x00\x00\x01\x27\x0a\x94\x02\x0a\x0ex6e\x74\x2d\x6e\x61\x6d\x65\x3a\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x72x6e\x73x74\x69x2d\x6f\x6e\x12\x08x74\x79\x70\x65\x72x40\x66xf1\x33x9a\x67\x70\x70\x18\x01\x20\x01\x2a\x0a\x70\x65\x72\x66\x33\x47\x50\x50\x32\x32\x32\x11xfd\xdd\x05\x48\xf1\x9a\xfd\xdd\x05\x52\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x5a\x16\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x63\x2d\x6e\x65x61\x76x6d\x65x69\x6e\x74x67\x2d\x6ex63\x61x6f\x6dx64\x65\x3ax62\x11x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x65x2d\x76\x65\x6e\x74x64\x2dx6f\x74x72\x79x2d\x70x6e\x65x61\x40x6d\xf1x65\x9a\xfd\xdd\x05\x48\xf1\x9a\xfd\xdd\x05\x52\x15\x6a\x1a\x73\x61\x6d\x70\x6c\x65\x2d\x6ex72\x66x65\x2dx70\x6ex6f\x61x72\x6dx74\x69\x6e\x67\x2d\x63\x6fx65\x6e\x74\x69\x74\x79\x2d\x69\x64\x65x72\x5a\x16x1c\x73\x61\x6d\x70\x6c\x65\x2d\x6ex72\x66x65\x63x70\x2dx6f\x6ex72\x61\x6dx74\x69\x6e\x67\x2d\x63x65\x6fx6e\x64x74\x65x69\x62x74\x15x79\x73x2d\x6e\x61\x6d\x70x65\x6cx7a\x65x10\x2dx73\x6ex61\x66x6d\x2dx70\x76x6c\x65\x6ex2d\x64x73\x6f\x75\x72\x63\x65\x2d\x6ex69\x61x64\x6dx82\x65x01\x6a\x1ax0f\x73\x61\x6d\x70\x6c\x65\x2d\x72x78\x65x6e\x70x66\x6f\x72\x74\x69\x2d\x6e\x67x61\x2dx6d\x65\x6ex8a\x74x01\x69x09\x74x55\x79x54\x2dx43\x69x2b\x64x30\x72x32\x1cx3a\x73x30\x61x30\x6dx92\x70x01\x6cx05\x65x37\x2dx2e\x72x30\x65x2e\x70x32\x6fx12\x72x0e\x74\x69\x6e\x67\x2d\x65\x6ex73\x74\x69x20\x74\x79x65\x2dx73\x6ex74\x61x20\x6dx74\x65\x7a\x10\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x69\x64\x82\x01\x0fx74
  • Send WFP message to HV-VES :
No Format
echo -ne "\xaa\x01\x00\x00\x00\x00\x00\x01\x00\x00\x01\x27\x0a\x94\x02\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x78x76\x6ex65\x66x72\x2dx73\x6e\x61\x6d\x65\x8a\x01\x09\x55\x54\x43\x2b\x30\x32\x3a\x30\x30\x92\x01\x05\x37\x2e\x30\x2e\x32\x12\x0e\x74\x65\x73\x74\x20\x74\x65\x73\x74\x20\x74\x65\x73\x74" | netcat k8s_node_ip 30222
  • Decode the message from Kafka topic :
No Format
root@hv-ves-sim:~# kafkacat -C -b localhost:9092 -t HV_VES_PERF3GPP -D "" -o -1 -c 1 | protoc --decode_raw --proto_path=/root/hv-ves_sim/proto/
1 {
  1: "sample-version"
  2: "perf3gpp"
  3: 1
  4: 1
  5: "perf3GPP22"
  6: "sample-event-name"
  7: "sample-event-type"
  8: 1539263857
  9: 1539263857
  10: "sample-nf-naming-code"
  11: "sample-nfc-naming-code"
  12: "sample-nf-vendor-name"
  13: "sample-reporting-entity-id"
  14: "sample-reporting-entity-name"
  15: "sample-source-id"
  16: "sample-xnf-name"
  17: "UTC+02:00"
  18: "7.0.2"
}
2: "test test test"
root@hv-ves-sim:~# 

HV-VES with tls enabled

...

No Format
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "4"
  creationTimestamp: 2018-10-04T15:15:21Z
  generation: 4
  labels:
    app: dcae-hv-ves-collector
    cfydeployment: hv-ves
    cfynode: hv-ves
    cfynodeinstance: hv-ves_eipq6a
    k8sdeployment: dep-dcae-hv-ves-collector
  name: dep-dcae-hv-ves-collector
  namespace: onap
  resourceVersion: "1452331"
  selfLink: /apis/extensions/v1beta1/namespaces/onap/deployments/dep-dcae-hv-ves-collector
  uid: 4f6c9488-c7e8-11e8-b920-026901117392
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: dcae-hv-ves-collector
      cfydeployment: hv-ves
      cfynode: hv-ves
      cfynodeinstance: hv-ves_eipq6a
      k8sdeployment: dep-dcae-hv-ves-collector
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: dcae-hv-ves-collector
        cfydeployment: hv-ves
        cfynode: hv-ves
        cfynodeinstance: hv-ves_eipq6a
        k8sdeployment: dep-x69\x6f\x6e\x12\x08\x70\x65\x72\x66\x33\x67\x70\x70\x18\x01\x20\x01\x2a\x0a\x70\x65\x72\x66\x33\x47\x50\x50\x32\x32\x32\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x6e\x61\x6d\x65\x3a\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x74\x79\x70\x65\x40\xf1\x9a\xfd\xdd\x05\x48\xf1\x9a\xfd\xdd\x05\x52\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x5a\x16\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x63\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x62\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x76\x65\x6e\x64\x6f\x72\x2d\x6e\x61\x6d\x65\x6a\x1a\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x69\x64\x72\x1c\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x6e\x61\x6d\x65\x7a\x10\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x69\x64\x82\x01\x0f\x73\x61\x6d\x70\x6c\x65\x2d\x78\x6e\x66\x2d\x6e\x61\x6d\x65\x8a\x01\x09\x55\x54\x43\x2b\x30\x32\x3a\x30\x30\x92\x01\x05\x37\x2e\x30\x2e\x32\x12\x0e\x74\x65\x73\x74\x20\x74\x65\x73\x74\x20\x74\x65\x73\x74" | netcat k8s_node_ip 30222
  • Decode the message from Kafka topic :

Casablanca

No Format
kafkacat -C -b localhost:9092 -t HV_VES_PERF3GPP -D "" -o -1 -c 1 | protoc --decode_raw
1 {
  1: "sample-version"
  2: "perf3gpp"
  3: 1
  4: 1
  5: "perf3GPP22"
  6: "sample-event-name"
  7: "sample-event-type"
  8: 1539263857
  9: 1539263857
  10: "sample-nf-naming-code"
  11: "sample-nfc-naming-code"
  12: "sample-nf-vendor-name"
  13: "sample-reporting-entity-id"
  14: "sample-reporting-entity-name"
  15: "sample-source-id"
  16: "sample-xnf-name"
  17: "UTC+02:00"
  18: "7.0.2"
}
2: "test test test" 

Dublin onward

No Format
kafkacat -C -b message-router-kafka:9092 -t HV_VES_PERF3GPP -X security.protocol=SASL_PLAINTEXT -X sasl.mechanisms=PLAIN -X sasl.username=admin -X sasl.password=admin_secret -D "" -o -1 -c 1 | protoc --decode_raw
1 {
  1: "sample-version"
  2: "perf3gpp"
  3: 1
  4: 1
  5: "perf3GPP22"
  6: "sample-event-name"
  7: "sample-event-type"
  8: 1539263857
  9: 1539263857
  10: "sample-nf-naming-code"
  11: "sample-nfc-naming-code"
  12: "sample-nf-vendor-name"
  13: "sample-reporting-entity-id"
  14: "sample-reporting-entity-name"
  15: "sample-source-id"
  16: "sample-xnf-name"
  17: "UTC+02:00"
  18: "7.0.2"
}
2: "test test test"

HV-VES with SSL enabled

  • Casablanca

Generate testing PKCS #12 files using https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/hv-ves.git;a=blob_plain;f=tools/ssl/gen-certs.sh;hb=refs/heads/master and store in k8s nfs dir /dockerdata-nfs/ssl
Edit HV-VES deployment (kubectl -n onap edit deployment/dep-dcae-hv-ves-collector) by removing VESHV_SSL_DISABLE flagand adding VESHV_TRUST_STORE, VESHV_KEY_STORE, VESHV_TRUST_STORE_PASSWORD, VESHV_KEY_STORE_PASSWORD ones.
Add entry to mount node:/dockerdata-nfs/ssl to containter:/etc/ves-hv :

No Format
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "4"
  creationTimestamp: 2018-10-04T15:15:21Z
  generation: 4
  labels:
    app: dcae-hv-ves-collector
    speccfydeployment: hv-ves
     containerscfynode: hv-ves
    cfynodeinstance: hv-ves_eipq6a
env:       k8sdeployment: dep-dcae-hv-ves-collector
 - name: CONSUL_HOSTdep-dcae-hv-ves-collector
          valuenamespace: consul-server.onap
  resourceVersion: "1452331"
    - name: VESHV_KEY_STORE_PASSWORD
          value: onaponap
        - name: VESHV_TRUST_STORE_PASSWORDselfLink: /apis/extensions/v1beta1/namespaces/onap/deployments/dep-dcae-hv-ves-collector
  uid: 4f6c9488-c7e8-11e8-b920-026901117392
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: dcae-hv-ves-collector
   value: onaponap  cfydeployment: hv-ves
     - namecfynode: VESHV_KEY_STOREhv-ves
      cfynodeinstance: hv-ves_eipq6a
  value: /etc/ves-hv/server.p12    k8sdeployment: dep-dcae-hv-ves-collector
  strategy:
    rollingUpdate:
-  name: VESHV_TRUST_STORE   maxSurge: 1
      valuemaxUnavailable: /etc/ves-hv/trust.p121
    type: RollingUpdate
  - nametemplate:
VESHV_CONFIG_URL    metadata:
      valuecreationTimestamp: http://consul-server.onap:8500/v1/kv/dcae-hv-ves-collector null
      labels:
  - name: VESHV_LISTEN_PORT           value: "6061"app: dcae-hv-ves-collector
        - namecfydeployment: CONFIG_BINDING_SERVICEhv-ves
          valuecfynode: confighv-binding-serviceves
        - namecfynodeinstance: PODhv-ves_IPeipq6a
          valueFromk8sdeployment: dep-dcae-hv-ves-collector
    spec:
      fieldRefcontainers:
      - env:
      apiVersion: v1 - name: CONSUL_HOST
           fieldPathvalue: status.podIPconsul-server.onap
        - image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.0.0-SNAPSHOTname: VESHV_KEY_STORE_PASSWORD
          imagePullPolicyvalue: IfNotPresentonaponap
        - name: dcae-hv-ves-collector VESHV_TRUST_STORE_PASSWORD
          portsvalue: onaponap
        - containerPortname: 6061VESHV_KEY_STORE
          protocol: TCPvalue: /etc/ves-hv/server.p12
        - resourcesname: {}VESHV_TRUST_STORE
          terminationMessagePathvalue: /devetc/termination-logves-hv/trust.p12
        - terminationMessagePolicyname: FileVESHV_CONFIG_URL
        volumeMounts:         - mountPath: /opt/app/HvVesCollector/logsvalue: http://consul-server.onap:8500/v1/kv/dcae-hv-ves-collector
         - name: component-log VESHV_LISTEN_PORT
         - mountPathvalue: /etc/ves-hv"6061"
        -  name: ssldirCONFIG_BINDING_SERVICE
      - env   value: config-binding-service
        - name: POD_IP
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: status.podIP
        image: dockernexus3.elasticonap.coorg:10001/beats/filebeat:5.5.0onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-main:1.0.0-SNAPSHOT
        imagePullPolicy: IfNotPresent
        name: filebeatdcae-hv-ves-collector
        ports:
        - containerPort: 6061
          protocol: TCP
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /varopt/logapp/onap/dcae-hv-ves-collectorHvVesCollector/logs
          name: component-log
        - mountPath: /usr/share/filebeat/dataetc/ves-hv
          name: filebeat-datassldir
        - mountPath: /usr/share/filebeat/filebeat.ymlenv:
        -  name: filebeat-confPOD_IP
          subPath: filebeat.yml
 valueFrom:
    dnsPolicy: ClusterFirst       hostname: dcae-hv-ves-collectorfieldRef:
      imagePullSecrets:       - nameapiVersion: onap-docker-registry-keyv1
      restartPolicy: Always       schedulerNamefieldPath: default-scheduler status.podIP
        securityContextimage: {}docker.elastic.co/beats/filebeat:5.5.0
        terminationGracePeriodSecondsimagePullPolicy: IfNotPresent
30        volumesname: filebeat
      -  emptyDirresources: {}
        nameterminationMessagePath: component/dev/termination-log
       - emptyDirterminationMessagePolicy: {}File
        namevolumeMounts:
filebeat-data        - configMap:mountPath: /var/log/onap/dcae-hv-ves-collector
          defaultModename: 420component-log
        -  namemountPath: dcae-filebeat-configmap/usr/share/filebeat/data
          name: filebeat-confdata
        - hostPathmountPath: /usr/share/filebeat/filebeat.yml
         path name: /dockerdata-nfs/sslfilebeat-conf
          typesubPath: ""filebeat.yml
      dnsPolicy: ClusterFirst
 name: ssldir status:   availableReplicashostname: 1dcae-hv-ves-collector
  conditions:   - lastTransitionTimeimagePullSecrets: 2018-10-04T15:15:21Z
      - lastUpdateTimename: 2018onap-docker-10-04T15:15:21Zregistry-key
      messagerestartPolicy: DeploymentAlways
has minimum availability.     reason: MinimumReplicasAvailableschedulerName: default-scheduler
     status: "True" securityContext: {}
      terminationGracePeriodSeconds: 30
      typevolumes:
Available      - lastTransitionTime emptyDir: {}
        name: 2018-10-04T15:15:21Zcomponent-log
      - emptyDir: {}
        lastUpdateTimename: 2018-10-05T14:10:15Zfilebeat-data
      - configMap:
          messagedefaultMode: ReplicaSet "dep-dcae-hv-ves-collector-7986d777dc" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 4
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

...

 420
          name: dcae-filebeat-configmap
        name: filebeat-conf
      - hostPath:
          path: /dockerdata-nfs/ssl
          type: ""
        name: ssldir
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: 2018-10-04T15:15:21Z
    lastUpdateTime: 2018-10-04T15:15:21Z
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: 2018-10-04T15:15:21Z
    lastUpdateTime: 2018-10-05T14:10:15Z
    message: ReplicaSet "dep-dcae-hv-ves-collector-7986d777dc" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 4
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

Deploy HV-VES simulator in onapmode with tls enabled using Heat template : https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/hvvessimulator/hvves_sim.yaml;hb=HEAD

  • Dublin onward

Prepare CA, Server and Client Private Keys and CSR.

No Format
openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 36500 -key ca.key -out ca.pem -subj /CN=dcae-hv-ves-ca

openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr -subj /CN=dcae-hv-ves-collector

openssl genrsa -out client.key 2048
openssl req -new -key client.key -out client.csr -subj /CN=dcae-hv-ves-client

Sign Server and Client certificates by the CA.

No Format
openssl x509 -req -days 36500 -in server.csr -CA ca.pem -CAkey ca.key -out server.pem -set_serial 00
openssl x509 -req -days 36500 -in client.csr -CA ca.pem -CAkey ca.key -out client.pem -set_serial 00

Create passwordless p12 CA and Server certificate files.

No Format
openssl pkcs12 -export -out ca.p12 -inkey ca.key -in ca.pem -passout pass:
openssl pkcs12 -export -out server.p12 -inkey server.key -in server.pem -passout pass:

Enable SSL feature in HV-VES collector via Consul UI :
http://<node_ip>:30270/ui/#/dc1/kv/dcae-hv-ves-collector/edit

Image Added

Combine Client Private Key and Public Certificate into PEM file.

No Format
cat client.key client.pem > client-all.pem

Send message to HV-VES collector using openssl command.

No Format
echo -ne "\xaa\x01\x00\x00\x00\x00\x00\x01\x00\x00\x01\x27\x0a\x94\x02\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x08\x70\x65\x72\x66\x33\x67\x70\x70\x18\x01\x20\x01\x2a\x0a\x70\x65\x72\x66\x33\x47\x50\x50\x32\x32\x32\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x6e\x61\x6d\x65\x3a\x11\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x74\x79\x70\x65\x40\xf1\x9a\xfd\xdd\x05\x48\xf1\x9a\xfd\xdd\x05\x52\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x5a\x16\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x63\x2d\x6e\x61\x6d\x69\x6e\x67\x2d\x63\x6f\x64\x65\x62\x15\x73\x61\x6d\x70\x6c\x65\x2d\x6e\x66\x2d\x76\x65\x6e\x64\x6f\x72\x2d\x6e\x61\x6d\x65\x6a\x1a\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x69\x64\x72\x1c\x73\x61\x6d\x70\x6c\x65\x2d\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x2d\x65\x6e\x74\x69\x74\x79\x2d\x6e\x61\x6d\x65\x7a\x10\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x69\x64\x82\x01\x0f\x73\x61\x6d\x70\x6c\x65\x2d\x78\x6e\x66\x2d\x6e\x61\x6d\x65\x8a\x01\x09\x55\x54\x43\x2b\x30\x32\x3a\x30\x30\x92\x01\x05\x37\x2e\x30\x2e\x32\x12\x0e\x74\x65\x73\x74\x20\x74\x65\x73\x74\x20\x74\x65\x73\x74" | openssl s_client -connect dcae-hv-ves-collector:30222 -CAfile ca.pem -msg -state -cert client-all.pem