diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4678cc04547c1e4b9db8ded74754cf4139eae2b1..fad0bebc1a8cee3279cb7c5ea0ff1f5d89517fc4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,7 +119,7 @@ test-services-linux-debug: - cd $CI_PROJECT_DIR - bash /run_asapo.sh - cd $CI_PROJECT_DIR/build - - ctest --no-compress-output -T Test -L all -E "kafka|full_chain_monitoring|full_chain_two_beamlines-fabric|full_chain_simple_chain_withdata_fromcache-fabric|noaccess|restart|logger_fluentd" --output-on-failure --output-junit testResult.xml + - ctest --no-compress-output -T Test -L all -E "kafka|full_chain_monitoring|noaccess|restart|logger_fluentd" --output-on-failure --output-junit testResult.xml tags: - kubernetes-executor rules: diff --git a/deploy/build_env/services-linux/receiver_fabric.json b/deploy/build_env/services-linux/receiver_fabric.json new file mode 100644 index 0000000000000000000000000000000000000000..82cb9d907aa32edd4b2bab8d52b41887ce3158f6 --- /dev/null +++ b/deploy/build_env/services-linux/receiver_fabric.json @@ -0,0 +1,33 @@ +{ + "MonitoringServer": "auto", + "PerformanceDbServer":"localhost:8086", + "MonitorPerformance": true, + "PerformanceDbName": "db_test", + "DatabaseServer":"auto", + "DiscoveryServer": "localhost:8410", + "DataServer": { + "AdvertiseURI": "127.0.0.1:8431", + "NThreads": 2, + "ListenPort": 8431, + "NetworkMode": ["fabric"] + }, + "Metrics": { + "Expose": true, + "ListenPort": 8430 + }, + "DataCache": { + "Use": true, + "SizeGB": 1, + "ReservedShare": 10 + }, + "AuthorizationServer": "localhost:8412", + "AuthorizationInterval": 1000, + "ListenPort": 8411, + "Tag": "localhost", + "ReceiveToDiskThresholdMB":50, + "MaxNumPersistedStreams":100, + "LogLevel" : "debug", + "Kafka" : { + "Enabled" : false + } + } diff --git a/deploy/build_env/services-linux/run_asapo.sh b/deploy/build_env/services-linux/run_asapo.sh index 3533e8955d53d2db16bc8137080a2f4908a8f9e6..b62b0e45358a7e67d780a644e68528f834e7558e 100644 --- a/deploy/build_env/services-linux/run_asapo.sh +++ b/deploy/build_env/services-linux/run_asapo.sh @@ -7,6 +7,9 @@ cp build/monitoring/monitoring_server/asapo-monitoring-server /asapo-monitoring- cp deploy/asapo_services_light/*json / +# Two receiver configs (tcp and fabric) are required for tests +cp deploy/asapo_services_light/receiver.json /receiver_tcp.json +cp deploy/build_env/services-linux/receiver_fabric.json / cp build/deploy/asapo_services_light/nginx.conf /etc/nginx/nginx.conf diff --git a/deploy/build_env/services-linux/supervisord.conf b/deploy/build_env/services-linux/supervisord.conf index f8c9cffeed961bfea64eb3b8aa1bea99974d8936..08801145e812aa2c4fa1bf805582ef7da88bc6d9 100644 --- a/deploy/build_env/services-linux/supervisord.conf +++ b/deploy/build_env/services-linux/supervisord.conf @@ -7,6 +7,15 @@ loglevel=info ; info, debug, warn, trace childlogdir=/var/log/supervisord/ ; where child log files will live user=root +[inet_http_server] +port = 127.0.0.1:9001 + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=http://127.0.0.1:9001 + [program:mongo] command=/usr/bin/mongod --bind_ip_all --dbpath /var/lib/mongodb/ stderr_logfile=/tmp/mongo_err.log diff --git a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh index f1969878d26e6c52eabf0debe2a1fb6c42f22d1e..0e735ad721f0228281a7967242ad006b5932a6ad 100644 --- a/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh +++ b/tests/automatic/full_chain/simple_chain_filegen_readdata_cache/check_linux.sh @@ -29,13 +29,13 @@ Cleanup() { set +e set +o pipefail if [[ $network_type == "fabric" ]]; then - nomad stop receiver - nomad run receiver_tcp.nmd + cp /receiver_tcp.json /receiver.json + supervisorctl restart receiver while true do sleep 1 - curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep 127.0.0.1 || continue - echo recevier started + curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep localhost || continue + echo recevier tcp started break done fi @@ -60,13 +60,13 @@ Cleanup() { } if [[ $network_type == "fabric" ]]; then - nomad stop receiver - nomad run receiver_fabric.nmd + cp /receiver_fabric.json /receiver.json + supervisorctl restart receiver while true do sleep 1 - curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep 127.0.0.1 || continue - echo recevier started + curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep localhost || continue + echo recevier fabric started break done fi diff --git a/tests/automatic/full_chain/two_beamlines/check_linux.sh b/tests/automatic/full_chain/two_beamlines/check_linux.sh index 61271989b8d81888f246bd7b2758f3dc9c3160f9..478c5075448d8ba361384e4938c6c8d86f6df96d 100644 --- a/tests/automatic/full_chain/two_beamlines/check_linux.sh +++ b/tests/automatic/full_chain/two_beamlines/check_linux.sh @@ -30,12 +30,14 @@ Cleanup() { echo cleanup set +e if [[ $network_type == "fabric" ]]; then - nomad stop receiver - nomad run receiver_tcp.nmd + #nomad stop receiver + #nomad run receiver_tcp.nmd + cp /receiver_tcp.json /receiver.json + supervisorctl restart receiver while true do sleep 1 - curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep 127.0.0.1 || continue + curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep localhost || continue echo recevier started break done @@ -59,12 +61,14 @@ Cleanup() { } if [[ $network_type == "fabric" ]]; then - nomad stop receiver - nomad run receiver_fabric.nmd + #nomad stop receiver + #nomad run receiver_fabric.nmd + cp /receiver_fabric.json /receiver.json + supervisorctl restart receiver while true do sleep 1 - curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep 127.0.0.1 || continue + curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.6 --stderr - | grep localhost || continue echo recevier started break done