Skip to content

Commit 5964ade

Browse files
committed
Improve sample compose file and tweak docs to match
1 parent 2b8348f commit 5964ade

File tree

6 files changed

+53
-13
lines changed

6 files changed

+53
-13
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@
426426
<plugin>
427427
<groupId>org.apache.maven.plugins</groupId>
428428
<artifactId>maven-dependency-plugin</artifactId>
429-
<version>3.7.0</version>
429+
<version>3.7.1</version>
430430
<executions>
431431
<execution>
432432
<id>copy-dependencies</id>

query-engine/docs/Authentication.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ OpenID Connect is configured using the xref:Parameters/uk.co.spudsoft.query.main
6969
Any number of xref:Parameters/uk.co.spudsoft.query.main.AuthEndpoint.adoc[authentication endpoints] may be configured.
7070
When a user attempts to login (which will happen on first access to the UI if xref:Parameters/uk.co.spudsoft.query.main.SessionConfig.adoc#requireSession[requireSession] is set) they will be presented with a list of all the auth endpoints to choose from.
7171

72-
After authenticating with their chosen provider the generated JWT will be stored in the Query Engine database and a random cookie (configured at xref:Parameters/uk.co.spudsoft.query.main.SessionConfig.adoc#sessionCookie[sessionCookie]) will be generated to refer to it.
72+
After authenticating with their chosen provider the generated JWT will be stored in the Query Engine database and a random cookie (configured at xref:Parameters/uk.co.spudsoft.query.main.SessionConfig.adoc#sessionCookie[sessionCookie]) will be generated to refer to it.
73+

query-engine/docs/Configuration.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ The rules of environment variables in Linux shells can cause problems in some si
2424
In order to avoid conflict with other variables, only variables with the prefix "query-engine" (or "QUERY_ENGINE") will be considered.
2525
Thus either of these environment variables can be used for setting the password for accessing the persistence data source:
2626
27-
** QUERY_ENGINE.PERSISTENCE_DATASOURCE_USER_PASSWORD
28-
** query-engine.persistence.dataSource.user.password
27+
* QUERY_ENGINE.PERSISTENCE_DATASOURCE_USER_PASSWORD
28+
* query-engine.persistence.dataSource.user.password
2929
3030
* System properties
3131

query-engine/docs/Getting Started.adoc

+16
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
The quickest way to get a feel for the Query Engine is to use the link:query-engine-compose.yml[compose file].
44

5+
For consistency this document assumes you are using Linux or WSL, very similar commands should work on Windows.
6+
7+
Download that file and save it to a new directory.
8+
Open a shell and CD to that directory, then run:
9+
10+
```bash
11+
docker compose -f query-engine-compose.yml -p query-engine up -d
12+
```
13+
14+
Then navigate to http://localhost:2000/ in your favourite browser.
15+
16+
== Details
17+
518
This compose file needs to be run on a single container host (i.e. not Swarm or Kubernetes) with localhost ports 2000-2003 free (as well as the ports required by Jaeger: 5775/udp, 6831/udp, 6832/udp, 5778, 4317, 4318, 16686, 14268).
619
It spawns five containers: MySQL, Microsoft SQL Server, PostgreSQL, Jaeger all-in-one and Query Engine in link:pass:[Design Mode/Design Mode.html][Design Mode].
720

@@ -32,6 +45,9 @@ For real use this volume should point to a git (or other SCM) repository for you
3245
Putting this behaviour together means that when the Query Engine starts using the provided compose file it is a demonstrable system that can be
3346
experienced with minimal additional work.
3447

48+
NOTE: Although the system deployed is fully operational the History section of the UI will not return any data because you have not logged in.
49+
The data is recorded and you are encouraged to have a look at the mysql database (localhost:2001/test, credentials are in the compose file) to see it.
50+
3551
[frame=none,cols="1,6,1",grid=none]
3652
|===
3753

query-engine/docs/query-engine-compose.yml

+31-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
version: "3.8"
2-
31
services:
42
mysql:
53
image: mysql:8.3
64
command: mysqld --default-authentication-plugin=mysql_native_password --skip-log-bin
75
ports:
86
- 2001:3306
7+
healthcheck:
8+
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
9+
timeout: 20s
10+
retries: 10
911
environment:
1012
MYSQL_ROOT_PASSWORD: T0p-Secret
1113
MYSQL_USER: user
1214
MYSQL_PASSWORD: T0p-Secret
1315
MYSQL_DATABASE: test
14-
16+
1517
mssql:
1618
image: mcr.microsoft.com/mssql/server:2022-latest
1719
ports:
1820
- 2002:1433
21+
healthcheck:
22+
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'T0p-Secret' -Q 'SELECT 1' || exit 1"]
23+
timeout: 20s
24+
retries: 10
1925
environment:
2026
ACCEPT_EULA: Y
2127
SA_PASSWORD: T0p-Secret
@@ -25,15 +31,23 @@ services:
2531
ports:
2632
- 2003:5432
2733
command: postgres -c log_min_duration_statement=0
34+
healthcheck:
35+
test: ["CMD", "pg_isready", "-d", "public"]
36+
timeout: 20s
37+
retries: 10
2838
environment:
2939
POSTGRES_PASSWORD: T0p-Secret
3040
POSTGRES_USER: postgres
3141
POSTGRES_DB: test
32-
42+
3343
jaeger:
3444
image: jaegertracing/all-in-one:1.56
3545
environment:
3646
COLLECTOR_OTLP_ENABLED: true
47+
healthcheck:
48+
test: ["CMD", "/go/bin/all-in-one-linux", "status"]
49+
timeout: 20s
50+
retries: 10
3751
ports:
3852
- 5775:5775/udp
3953
- 6831:6831/udp
@@ -43,13 +57,22 @@ services:
4357
- 4318:4318
4458
- 16686:16686
4559
- 14268:14268
46-
60+
4761
query-engine:
48-
image: ghcr.io/yaytay/query-engine-design-mode:0.0.36-3-main
62+
image: ghcr.io/yaytay/query-engine-design-mode:0.0.37-main
4963
ports:
5064
- 2000:8080
5165
volumes:
5266
- ./pipelines:/var/query-engine
67+
depends_on:
68+
mysql:
69+
condition: service_healthy
70+
mssql:
71+
condition: service_healthy
72+
postgresql:
73+
condition: service_healthy
74+
jaeger:
75+
condition: service_healthy
5376
environment:
5477
- query-engine.httpServerOptions.port=8080
5578
- query-engine.logging.level.uk=DEBUG
@@ -62,7 +85,7 @@ services:
6285
- query-engine.persistence.retryIncrementMs=500
6386
- query-engine.jwt.acceptableIssuerRegexes[0]=.*
6487
- query-engine.tracing.serviceName=query-engine2
65-
- query-engine.tracing.protocol=otlphttp
88+
- query-engine.tracing.protocol=otlphttp
6689
- query-engine.tracing.url=http://jaeger:4318/v1/traces
6790
- query-engine.sampleDataLoads[0].url=mysql://query-engine-mysql-1:3306/test
6891
- query-engine.sampleDataLoads[0].adminUser.username=user
@@ -76,4 +99,4 @@ services:
7699
- query-engine.baseConfigPath=/var/query-engine
77100
- query-engine.outputCacheDir=/var/cache/query-engine
78101
- query-engine.processors.tempDir=/tmp/query-engine
79-
102+

query-engine/src/main/java/uk/co/spudsoft/query/main/Version.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public final class Version {
3434
/**
3535
* The project version, as set in the Maven pom.xml.
3636
*/
37-
public static final String MAVEN_PROJECT_VERSION = "0.0.36-3-main";
37+
public static final String MAVEN_PROJECT_VERSION = "0.0.37-main";
3838

3939
private Version() {
4040
}

0 commit comments

Comments
 (0)