Library
- HV-VES CSIT : https://gerrit.onap.org/r/gitweb?p=integration.git;a=tree;f=test/csit/tests/dcaegen2-collectors-hv-ves;hb=HEAD
Precondition
- Server flavor : 8 vCPU / 30GB RAM / 100GB HDD
- Server OS : Ubuntu 16.04
Planned
- Heat template DONE
- Heat template commit to gerrit repo DONE
- HV-VES XNF simulator integration to ONAP procedure DONE
HV-VES simulator standalone mode installation
- Deploy HV-VES simulator in standalone mode using Heat template : https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/hvvessimulator/hvves_sim.yaml;hb=refs/heads/master
- Login to the deployed server using root/onap credentials
- Verify that all docker containers are up :
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 :
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="}]
HV-VES simulator standalone mode usage
- Start HV-VES container log :
root@hv-ves-sim:~# docker logs --tail 0 -f ad910797eb7
- Start Kafka consumer log :
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 :
root@hv-ves-sim:~# hv-ves_sim/simulator.sh send hv-ves_sim/samples/xnf-valid-messages-request.json {"response":"Request accepted"}
- Check HV-VES log :
root@hv-ves-sim:~# docker logs --tail 0 -f ad910797eb72 2018-09-05T13:38:32.668Z INFO [o.o.d.c.v.i.s.NettyTcpServer ] - Handling connection from /172.18.0.6:51530 2018-09-05T13:38:32.669Z TRACE [o.o.d.c.v.i.w.WireChunkDecoder ] - Got message with total size of 335 B 2018-09-05T13:38:32.669Z TRACE [o.o.d.c.v.i.w.WireChunkDecoder ] - Wire payload size: 327 B 2018-09-05T13:38:32.669Z TRACE [o.o.d.c.v.i.w.WireChunkDecoder ] - Received end-of-transmission message 2018-09-05T13:38:32.670Z INFO [o.o.d.c.v.i.VesHvCollector ] - Completing stream because of receiving EOT message 2018-09-05T13:38:32.672Z TRACE [o.o.d.c.v.i.a.k.KafkaSink ] - Message #10001 has been sent to ves_hvRanMeas:0 2018-09-05T13:38:32.672Z INFO [o.o.d.c.v.i.s.NettyTcpServer ] - Connection from /172.18.0.6:51530 has been closed
- Check Kafka consumer log :
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???????
HV-VES simulator integration to ONAP
- Deploy HV-VES simulator in onapmode using Heat template : https://gerrit.onap.org/r/gitweb?p=integration.git;a=blob_plain;f=test/mocks/hvvessimulator/hvves_sim.yaml;hb=refs/heads/master
- Check if HV-VES pod is running :
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 :
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 :
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 :
root@hv-ves-sim:~# ssh -L 9092:localhost:9092 10.183.34.151
- Send event from xNF simulator :
root@hv-ves-sim:~/hv-ves_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 :
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 :
root@hv-ves-sim:~/hv-ves_sim# kafkacat -C -b localhost:9092 -t HV_VES_MEASUREMENTS -D "" -o -1 -c 1 ? sample-versionHVMEAS *sample-event-id2sample-event-name:sample-event-type@???9H???9Rsample-nf-naming-codeZsample-nfc-naming-codej??????z?+?)???????rsample-reporting-entity-namez ???????{?sample-source-name?another-versiond root@hv-ves-sim:~/hv-ves_sim#
- Decode message from Kafka topic :
root@hv-ves-sim:~/hv-ves_sim# kafkacat -C -b localhost:9092 -t HV_VES_MEASUREMENTS -D "" -o -1 -c 1 | protoc --decode_raw --proto_path=/root/hv-ves_sim/proto/ 1 { 1: "sample-version" 2: "HVMEAS" 3: 1 4: 1 5: "sample-event-id" 6: "sample-event-name" 7: "sample-event-type" 8: 120034455 9: 120034455 10: "sample-nf-naming-code" 11: "sample-nfc-naming-code" 13: "\261\251\251\225\357\253z\232+\266)\340\371\351\355\212\334\276\211" 14: "sample-reporting-entity-name" 15: "\261\251\251\225\357\254\242\352\334{\350\235" 16: "sample-source-name" 18: "another-version" } 2: "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000" root@hv-ves-sim:~/hv-ves_sim#
HV-VES message simulation from shell
- Prepare HV-VES VesEvent message in hex dump format :
root@hv-ves-sim:~/hv-ves_sim/proto# cat hvves_event commonEventHeader: { version: "sample-version" domain: "HVMEAS" sequence: 1 priority: 1 eventId: "sample-event-id" eventName: "sample-event-name" eventType: "sample-event-type" startEpochMicrosec: 120034455 lastEpochMicrosec: 120034455 nfNamingCode: "sample-nf-naming-code" nfcNamingCode: "sample-nfc-naming-code" reportingEntityId: "sample-reporting-entity-id" reportingEntityName: "sample-reporting-entity-name" sourceId: "sample-source-id" sourceName: "sample-source-name" vesEventListenerVersion: "another-version" } eventFields: "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\xff\x01\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x06\x48\x56\x4d\x45\x41\x53\x18\x01\x20\x01\x2a\x0f\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x69\x64\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\x97\xa9\x9e\x39\x48\x97\xa9\x9e\x39\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\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\x12\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x6e\x61\x6d\x65\x92\x01\x0f\x61\x6e\x6f\x74\x68\x65\x72\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x0e\x74\x65\x73\x74\x20\x74\x65\x73\x74\x20\x74\x65\x73\x74
- Put the above VesEvent message into Wire Frame Protocol structure documented in JavaDoc https://gerrit.onap.org/r/gitweb?p=dcaegen2/collectors/hv-ves.git;a=blob_plain;f=hv-collector-domain/src/main/kotlin/org/onap/dcae/collectors/veshv/domain/wire_frame.kt;hb=refs/heads/master :
\xff\x01\x00\x00\x00\x00\x01\x00\x00\x01\x12\x0a\xff\x01\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x06\x48\x56\x4d\x45\x41\x53\x18\x01\x20\x01\x2a\x0f\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x69\x64\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\x97\xa9\x9e\x39\x48\x97\xa9\x9e\x39\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\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\x12\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x6e\x61\x6d\x65\x92\x01\x0f\x61\x6e\x6f\x74\x68\x65\x72\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x0e\x74\x65\x73\x74\x20\x74\x65\x73\x74\x20\x74\x65\x73\x74
- Send WFP message to HV-VES :
root@hv-ves-sim:~/hv-ves_sim/proto# echo -ne "\xff\x01\x00\x00\x00\x00\x01\x00\x00\x01\x12\x0a\xff\x01\x0a\x0e\x73\x61\x6d\x70\x6c\x65\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x06\x48\x56\x4d\x45\x41\x53\x18\x01\x20\x01\x2a\x0f\x73\x61\x6d\x70\x6c\x65\x2d\x65\x76\x65\x6e\x74\x2d\x69\x64\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\x97\xa9\x9e\x39\x48\x97\xa9\x9e\x39\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\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\x12\x73\x61\x6d\x70\x6c\x65\x2d\x73\x6f\x75\x72\x63\x65\x2d\x6e\x61\x6d\x65\x92\x01\x0f\x61\x6e\x6f\x74\x68\x65\x72\x2d\x76\x65\x72\x73\x69\x6f\x6e\x12\x0e\x74\x65\x73\x74\x20\x74\x65\x73\x74\x20\x74\x65\x73\x74" | netcat 10.183.35.200 30222
- Check the message on Kafka topic :
root@hv-ves-sim:~# kafkacat -C -b localhost:9092 -t HV_VES_MEASUREMENTS -D "" -o -1 -c 1 sample-versionHVMEAS *sample-event-id2sample-event-name:sample-event-type@9H9Rsample-nf-naming-codeZsample-nfc-naming-codejsample-reporting-entity-idrsample-reporting-entity-namezsample-source-idsample-source-nameanother-versiontest test test
- Encode the message :
root@hv-ves-sim:~# kafkacat -C -b localhost:9092 -t HV_VES_MEASUREMENTS -D "" -o -1 -c 1 | protoc --decode_raw --proto_path=/root/hv-ves_sim/proto/ 1 { 1: "sample-version" 2: "HVMEAS" 3: 1 4: 1 5: "sample-event-id" 6: "sample-event-name" 7: "sample-event-type" 8: 120034455 9: 120034455 10: "sample-nf-naming-code" 11: "sample-nfc-naming-code" 13: "sample-reporting-entity-id" 14: "sample-reporting-entity-name" 15: "sample-source-id" 16: "sample-source-name" 18: "another-version" } 2: "test test test" root@hv-ves-sim:~#