From 8c8eb415ca57830d462cefbe8d659b3b98b6de7c Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 29 Jun 2022 14:04:09 +0100 Subject: Fix simulator docker file and startup script The nmodels-simulator startup script is updated to: - enable logging - allow overriding of keystore and truststore - allow overriding of configuration parameters - Follow the same conventions as other docker files and startup scripts - Add labelling - Provide default configuration Issue-ID: POLICY-4233 Change-Id: I6c25dc77c510a52ec298883f2534428807b1c253 Signed-off-by: liamfallon --- .../models-simulator-tarball/src/main/assembly.xml | 1 + .../src/main/resources/etc/simParameters.json | 110 +++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 models-sim/packages/models-simulator-tarball/src/main/resources/etc/simParameters.json (limited to 'models-sim/packages/models-simulator-tarball/src/main') diff --git a/models-sim/packages/models-simulator-tarball/src/main/assembly.xml b/models-sim/packages/models-simulator-tarball/src/main/assembly.xml index 47395e122..430728b9e 100644 --- a/models-sim/packages/models-simulator-tarball/src/main/assembly.xml +++ b/models-sim/packages/models-simulator-tarball/src/main/assembly.xml @@ -51,6 +51,7 @@ *.xml + *.json etc unix diff --git a/models-sim/packages/models-simulator-tarball/src/main/resources/etc/simParameters.json b/models-sim/packages/models-simulator-tarball/src/main/resources/etc/simParameters.json new file mode 100644 index 000000000..41fc90574 --- /dev/null +++ b/models-sim/packages/models-simulator-tarball/src/main/resources/etc/simParameters.json @@ -0,0 +1,110 @@ +{ + "dmaapProvider": { + "name": "DMaaP simulator", + "topicSweepSec": 300 + }, + "restServers": [ + { + "name": "DMaaP simulator", + "providerClass": "org.onap.policy.models.sim.dmaap.rest.DmaapSimRestControllerV1", + "host": "0.0.0.0", + "port": 3904, + "https": false + }, + { + "name": "A&AI simulator", + "providerClass": "org.onap.policy.simulators.AaiSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6666, + "https": false, + "userName": "policy@policy.onap.org", + "password": "demo123456!", + "resourceLocation": "/opt/app/policy/simulators/etc/mounted/aairesponse/" + }, + { + "name": "SDNC simulator", + "providerClass": "org.onap.policy.simulators.SdncSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6668, + "https": false + }, + { + "name": "SO simulator", + "providerClass": "org.onap.policy.simulators.SoSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6669, + "https": false, + "userName": "InfraPortalClient", + "password": "password1$" + }, + { + "name": "VFC simulator", + "providerClass": "org.onap.policy.simulators.VfcSimulatorJaxRs", + "host": "0.0.0.0", + "port": 6670, + "https": false + } + ], + "topicSinks": [ + { + "topic": "APPC-CL", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + }, + { + "topic": "APPC-LCM-WRITE", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + } + ], + "topicSources": [ + { + "topic": "APPC-CL", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + }, + { + "topic": "APPC-LCM-READ", + "servers": ["${HOST_NAME}"], + "topicCommInfrastructure": "DMAAP", + "useHttps": false, + "apiKey": "some-key", + "apiSecret": "some-secret" + } + ], + "topicServers": [ + { + "name": "APPC Legacy simulator", + "providerClass": "org.onap.policy.simulators.AppcLegacyTopicServer", + "sink": "APPC-CL", + "source": "APPC-CL" + }, + { + "name": "APPC-LCM simulator", + "providerClass": "org.onap.policy.simulators.AppcLcmTopicServer", + "sink": "APPC-LCM-WRITE", + "source": "APPC-LCM-READ" + } + ], + "grpcServer": { + "name": "CDS simulator", + "providerClass": "org.onap.policy.simulators.CdsSimulator", + "host": "0.0.0.0", + "port": 6680, + "timeout": 30, + "username": "ccsdkapps", + "password": "ccsdkapps", + "resourceLocation": "/opt/app/policy/simulators/etc/mounted/cdsresponse/", + "successRepeatCount": 0, + "requestedResponseDelayMs": 0 + } +} -- cgit 1.2.3-korg