Skip to content
Snippets Groups Projects
Commit ec2f1dba authored by David Trattnig's avatar David Trattnig
Browse files

Initial setup for full e2e testing.

parent 44393847
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,30 @@
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"console": "integratedTerminal"
},
{
"name": "API (Test0)",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"args": ["config=test/config/engine-0-api.ini"],
"console": "integratedTerminal"
},
{
"name": "API (Test1)",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"args": ["config=test/config/engine-1-api.ini"],
"console": "integratedTerminal"
},
{
"name": "API (Test2)",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/app.py",
"args": ["config=test/config/engine-2-api.ini"],
"console": "integratedTerminal"
}
]
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ docker="false"
# - docker:api
#
if [[ $* =~ ^(api-dev|api|test)$ ]]; then
if [[ $* =~ ^(api-dev|api-test-0|api-test-1|api-test-2|api|test)$ ]]; then
mode=$1
fi
......@@ -47,6 +47,27 @@ if [[ $docker == "false" ]]; then
/usr/bin/env python3.7 src/app.py
fi
### Runs the API Server (Test) ###
if [[ $mode == "api-test-0" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 0"
/usr/bin/env python3.7 src/app.py config=test/config/engine-0-api.ini
fi
if [[ $mode == "api-test-1" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 1"
/usr/bin/env python3.7 src/app.py config=test/config/engine-1-api.ini
fi
if [[ $mode == "api-test-2" ]]; then
# echo "Building Web Applications"
# sh ./script/build-web.sh
echo "Starting API Server 2"
/usr/bin/env python3.7 src/app.py config=test/config/engine-2-api.ini
fi
### Runs the API Server using Gunicorn without a system daemon (Production) ###
if [[ $mode == "api" ]]; then
......
#######################
# Engine API Settings #
#######################
[database]
db_user="aura_engine_api"
db_name="aura_engine_api_sync"
db_pass="1234"
db_host="localhost"
db_charset="utf8"
[monitoring]
logdir="./logs"
# possible values: debug, info, warning, error, critical
loglevel="info"
debug_flask="false"
[api]
api_port=8010
[federation]
# Defines the engine number id for identification of record sources. Default values are:
#
# 1 ... Engine 1 (main node)
# 2 ... Engine 2 (main node, not needed for single deployment)
# 0 ... Sync Host (sync node, not needed for single engine deployment)
#
# Engine API supports two deployment models:
#
# - "main": Deployed together with some `engine` (Single instance or for redundant engines)
# - "sync": Independent deployment, in charge of syncing data of two main-nodes
#
# The `synch_host` identifies the host where data is gathered from/synced to, depended on the
# chosen `node_type`.
; host_id=1
; sync_host="http://localhost:8010"
; host_id=2
; sync_host="http://localhost:8010"
host_id=0
main_host_1="http://localhost:8008"
main_host_2="http://localhost:8009"
default_source=1
sync_interval=200
sync_batch_size=10
sync_step_sleep=3
# API endpoints to sync data from main to child nodes
sync_api_store_playlog="/api/v1/playlog/store"
sync_api_store_healthlog="/api/v1/source/health"
sync_api_get_playlog="/api/v1/playlog"
\ No newline at end of file
#######################
# Engine API Settings #
#######################
[database]
db_user="aura_engine_api"
db_name="aura_engine_api"
db_pass="1234"
db_host="localhost"
db_charset="utf8"
[monitoring]
logdir="./logs"
# possible values: debug, info, warning, error, critical
loglevel="info"
debug_flask="false"
[api]
api_port=8008
[federation]
# Defines the engine number id for identification of record sources. Default values are:
#
# 1 ... Engine 1 (main node)
# 2 ... Engine 2 (main node, not needed for single deployment)
# 0 ... Sync Host (sync node, not needed for single engine deployment)
#
# Engine API supports two deployment models:
#
# - "main": Deployed together with some `engine` (Single instance or for redundant engines)
# - "sync": Independent deployment, in charge of syncing data of two main-nodes
#
# The `synch_host` identifies the host where data is gathered from/synced to, depended on the
# chosen `node_type`.
host_id=1
sync_host="http://localhost:8010"
; host_id=2
; sync_host="http://localhost:8010"
; host_id=0
; main_host_1="http://localhost:8008"
; main_host_2="http://localhost:8009"
; default_source=1
; sync_interval=20
; sync_batch_size=10
; sync_step_sleep=3
# API endpoints to sync data from main to child nodes
sync_api_store_playlog="/api/v1/playlog/store"
sync_api_store_healthlog="/api/v1/source/health"
sync_api_get_playlog="/api/v1/playlog"
\ No newline at end of file
#######################
# Engine API Settings #
#######################
[database]
db_user="aura_engine_api"
db_name="aura_engine_api_2"
db_pass="1234"
db_host="localhost"
db_charset="utf8"
[monitoring]
logdir="./logs"
# possible values: debug, info, warning, error, critical
loglevel="info"
debug_flask="false"
[api]
api_port=8009
[federation]
# Defines the engine number id for identification of record sources. Default values are:
#
# 1 ... Engine 1 (main node)
# 2 ... Engine 2 (main node, not needed for single deployment)
# 0 ... Sync Host (sync node, not needed for single engine deployment)
#
# Engine API supports two deployment models:
#
# - "main": Deployed together with some `engine` (Single instance or for redundant engines)
# - "sync": Independent deployment, in charge of syncing data of two main-nodes
#
# The `synch_host` identifies the host where data is gathered from/synced to, depended on the
# chosen `node_type`.
; host_id=1
; sync_host="http://localhost:8010"
host_id=2
sync_host="http://localhost:8010"
; host_id=0
; main_host_1="http://localhost:8008"
; main_host_2="http://localhost:8009"
; default_source=1
; sync_interval=20
; sync_batch_size=10
; sync_step_sleep=3
# API endpoints to sync data from main to child nodes
sync_api_store_playlog="/api/v1/playlog/store"
sync_api_store_healthlog="/api/v1/source/health"
sync_api_get_playlog="/api/v1/playlog"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment