diff --git a/Testing/Dashboard/CMakeLists.txt b/Testing/Dashboard/CMakeLists.txt index 85e1fb47a084569b852c7ccdae81b32b6efd4347..244b8d862e71723c82cb1539df163350ade6a0fe 100644 --- a/Testing/Dashboard/CMakeLists.txt +++ b/Testing/Dashboard/CMakeLists.txt @@ -1,16 +1,5 @@ # --------------------------------------------------------------------- -# Settings -mark_as_advanced( ELASTIX_DASHBOARD_HOST ) -set( ELASTIX_DASHBOARD_HOST "elastix" ) - -mark_as_advanced( ELASTIX_DASHBOARD_ELASTICSEARCH_PORT ) -set( ELASTIX_DASHBOARD_ELASTICSEARCH_PORT 9200 ) - -mark_as_advanced( ELASTIX_DASHBOARD_LOGSTASH_PORT ) -set( ELASTIX_DASHBOARD_LOGSTASH_PORT 5043 ) - -mark_as_advanced( ELASTIX_DASHBOARD_KIBANA_PORT ) -set( ELASTIX_DASHBOARD_KIBANA_PORT 5601 ) +# Dashboard configuration mark_as_advanced( ELASTIX_DASHBOARD_SOURCE_DIR ) set( ELASTIX_DASHBOARD_SOURCE_DIR "${CMAKE_SOURCE_DIR}/Testing/Dashboard" ) @@ -29,25 +18,33 @@ set( ELASTIX_DASHBOARD_VOLUME "${ELASTIX_DASHBOARD_BINARY_DIR}/Data" ) if( NOT EXISTS "${ELASTIX_DASHBOARD_VOLUME}" ) message( STATUS - "ELASTIX_DASHBOARD_VOLUME points to the default ${CMAKE_BINARY_DIR}/Testing/Dashboard/Data path in your build directory. Point to another directory on your local machine to ensure dashboard state is saved between builds." + "ELASTIX_DASHBOARD_VOLUME points to the default ${CMAKE_BINARY_DIR}/Testing/Dashboard/Data path in your build directory. In production you should point this variable to a safe directory outside the build tree." ) file( MAKE_DIRECTORY "${ELASTIX_DASHBOARD_VOLUME}" ) endif() -# --------------------------------------------------------------------- -# Configure +# Test/Benchmark results will be forwarded to this IP. You will probably +# have change this in order to match docker settings on your own machine. +mark_as_advanced( ELASTIX_DASHBOARD_IP ) +set( ELASTIX_DASHBOARD_IP "192.168.59.103" ) + +configure_file( + ${ELASTIX_DASHBOARD_SOURCE_DIR}/elxDashboard.yml.in + ${ELASTIX_DASHBOARD_BINARY_DIR}/elxDashboard.yml +) + configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/docker-compose.yml.in - ${ELASTIX_DASHBOARD_BINARY_DIR}/docker-compose.yml + ${ELASTIX_DASHBOARD_SOURCE_DIR}/elxLogstashForwarder.yml.in + ${ELASTIX_DASHBOARD_BINARY_DIR}/elxLogstashForwarder.yml ) configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/elxLogstash.conf.in - ${ELASTIX_DASHBOARD_BINARY_DIR}/elxLogstash/elxLogstash.conf + ${ELASTIX_DASHBOARD_SOURCE_DIR}/elxLogstash.conf.in + ${ELASTIX_DASHBOARD_BINARY_DIR}/Logstash/elxLogstash.conf ) configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/elxLogstashForwarder.conf.in - ${ELASTIX_DASHBOARD_BINARY_DIR}/elxLogstashForwarder.conf + ${ELASTIX_DASHBOARD_SOURCE_DIR}/elxLogstashForwarder.json.in + ${ELASTIX_DASHBOARD_BINARY_DIR}/elxLogstashForwarder.json ) \ No newline at end of file diff --git a/Testing/Dashboard/docker-compose.yml.in b/Testing/Dashboard/elxDashboard.yml.in similarity index 57% rename from Testing/Dashboard/docker-compose.yml.in rename to Testing/Dashboard/elxDashboard.yml.in index 6faad275504d0b5fb4cdcf708d106f40254be8d9..2a33780a078730391c0c00878592053255bebc42 100644 --- a/Testing/Dashboard/docker-compose.yml.in +++ b/Testing/Dashboard/elxDashboard.yml.in @@ -2,7 +2,7 @@ elastix: image: willdurand/elk ports: - "80:80" - - "@ELASTIX_DASHBOARD_LOGSTASH_PORT@:@ELASTIX_DASHBOARD_LOGSTASH_PORT@" + - "5043:5043" volumes_from: - data @@ -11,7 +11,4 @@ data: volumes: - @ELASTIX_DASHBOARD_SOURCE_DIR@:/etc/ssl - @ELASTIX_DASHBOARD_VOLUME@:/data - - @ELASTIX_DASHBOARD_BINARY_DIR@/elxLogstash:/etc/logstash - - - \ No newline at end of file + - @ELASTIX_DASHBOARD_BINARY_DIR@/Logstash:/etc/logstash diff --git a/Testing/Dashboard/elxLogstash.conf.in b/Testing/Dashboard/elxLogstash.conf.in index 454a843007c028b8d2d62c1eb5a08264289ab53e..d6c885f293768edd3fc6223159454910d67ae814 100644 --- a/Testing/Dashboard/elxLogstash.conf.in +++ b/Testing/Dashboard/elxLogstash.conf.in @@ -1,6 +1,6 @@ input { lumberjack { - port => @ELASTIX_DASHBOARD_LOGSTASH_PORT@ + port => 5043 ssl_certificate => "/etc/ssl/@ELASTIX_DASHBOARD_LOGSTASH_CERTIFICATE@" ssl_key => "/etc/ssl/@ELASTIX_DASHBOARD_LOGSTASH_RSA_PRIVATE_KEY@" } diff --git a/Testing/Dashboard/elxLogstashForwarder.conf.in b/Testing/Dashboard/elxLogstashForwarder.conf.in deleted file mode 100644 index 923c158e35a2f8666a5316bc81446d4bd429365b..0000000000000000000000000000000000000000 --- a/Testing/Dashboard/elxLogstashForwarder.conf.in +++ /dev/null @@ -1,20 +0,0 @@ -{ - "network": { - "servers": [ "@ELASTIX_DASHBOARD_HOST@:@ELASTIX_DASHBOARD_LOGSTASH_PORT@" ], - "timeout": 15, - "ssl certificate": "@ELASTIX_DASHBOARD_SOURCE_DIR@/@ELASTIX_DASHBOARD_LOGSTASH_CERTIFICATE@", - "ssl key": "@ELASTIX_DASHBOARD_SOURCE_DIR@/@ELASTIX_DASHBOARD_LOGSTASH_RSA_PRIVATE_KEY@", - "ssl ca": "@ELASTIX_DASHBOARD_SOURCE_DIR@/@ELASTIX_DASHBOARD_LOGSTASH_CERTIFICATE@" - }, - "files": [ - { - "paths": [ - "@CMAKE_BINARY_DIR@/Testing/Unit/*.xml" - ], - "fields": { - "type": "unittest", - "lib": "elastix" - } - } - ] -} diff --git a/Testing/Dashboard/elxLogstashForwarder.json.in b/Testing/Dashboard/elxLogstashForwarder.json.in new file mode 100644 index 0000000000000000000000000000000000000000..bf2b7c6d7f38d1c5ffe567ab2c1dd063ae1179c0 --- /dev/null +++ b/Testing/Dashboard/elxLogstashForwarder.json.in @@ -0,0 +1,29 @@ +{ + "network": { + "servers": [ "elastix:5043" ], + "timeout": 15, + "ssl certificate": "/etc/ssl/@ELASTIX_DASHBOARD_LOGSTASH_CERTIFICATE@", + "ssl key": "/etc/ssl/@ELASTIX_DASHBOARD_LOGSTASH_RSA_PRIVATE_KEY@", + "ssl ca": "/etc/ssl/@ELASTIX_DASHBOARD_LOGSTASH_CERTIFICATE@" + }, + "files": [ + { + "paths": [ + "/var/unit/*.xml" + ], + "fields": { + "type": "unittest", + "lib": "elastix" + } + }, + { + "paths": [ + "/var/benchmark/*.xml" + ], + "fields": { + "type": "benchmark", + "lib": "elastix" + } + } + ] +} diff --git a/Testing/Dashboard/elxLogstashForwarder.yml.in b/Testing/Dashboard/elxLogstashForwarder.yml.in new file mode 100644 index 0000000000000000000000000000000000000000..adad1dfbfeed530af41a0ff87256e119d61bc260 --- /dev/null +++ b/Testing/Dashboard/elxLogstashForwarder.yml.in @@ -0,0 +1,14 @@ +forwarder: + image: willdurand/logstash-forwarder + extra_hosts: + - "elastix:@ELASTIX_DASHBOARD_IP@" + volumes_from: + - data + +data: + image: busybox + volumes: + - @ELASTIX_DASHBOARD_BINARY_DIR@/elxLogstashForwarder.json:/etc/logstash-forwarder/config.json + - @ELASTIX_DASHBOARD_SOURCE_DIR@:/etc/ssl + - @CMAKE_BINARY_DIR@/Testing/Unit:/var/unit + - @CMAKE_BINARY_DIR@/Testing/Benchmark:/var/benchmark