@@ -26,34 +26,17 @@ info 'Starting the dependencies'
26
26
docker compose up --wait sqlserver grafana
27
27
SQLSERVER_SOCKET=" $( docker compose port sqlserver 1433 | cut -f2 -d" :" ) "
28
28
29
- info ' Generating the deployment configuration'
30
- mkdir -p generated
31
- cargo run -p ndc-sqlserver --quiet --release -- configuration serve &
32
- AGENT_PID=$!
33
- echo " $AGENT_PID " > ./agent.pid
34
- ../../scripts/wait-until --timeout=30 --report -- cargo run -p ndc-sqlserver --quiet -- check-health --port=9100
35
- if ! kill -0 " $AGENT_PID " ; then
36
- echo >&2 ' The agent stopped abruptly. Take a look at agent.log for details.'
37
- exit 1
38
- fi
39
-
40
- SQLSERVER_CONNECTION_STRING=" DRIVER={ODBC Driver 18 for SQL Server};SERVER=127.0.0.1,${SQLSERVER_SOCKET} ;Uid=SA;Database=Chinook;Pwd=Password!"
41
-
42
- ../../scripts/new-configuration.sh localhost:9100 " ${SQLSERVER_CONNECTION_STRING} " \
43
- > ./generated/deployment.json
44
- kill " $AGENT_PID " && wait " $AGENT_PID " || :
45
- rm -f ./agent.pid
46
-
47
29
info ' Starting the agent'
48
- if nc -z localhost 8100 ; then
49
- echo >&2 ' ERROR: There is already an agent running on port 8100 .'
30
+ if nc -z localhost 8080 ; then
31
+ echo >&2 ' ERROR: There is already an agent running on port 8080 .'
50
32
exit 1
51
33
fi
52
34
35
+ CONNECTION_URI=" DRIVER={ODBC Driver 18 for SQL Server};SERVER=127.0.0.1,${SQLSERVER_SOCKET} ;Uid=SA;Database=Chinook;Pwd=Password!"
53
36
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=' http://localhost:4317' \
54
- OTEL_SERVICE_NAME=' ndc-sqlserver' \
37
+ OTEL_SERVICE_NAME=' ndc-sqlserver' \
55
38
cargo run -p ndc-sqlserver --quiet --release -- \
56
- serve --configuration=./generated/deployment.json \
39
+ serve --configuration=' ../../static ' \
57
40
>& agent.log &
58
41
AGENT_PID=$!
59
42
echo " $AGENT_PID " > ./agent.pid
0 commit comments