Skip to content

Commit 496c296

Browse files
committed
test(opensearch): complete manuel e2e checks, add cors fix to test docker file
Signed-off-by: Azorji Kelechi Oliver <kelechioliver96@gmail.com>
1 parent 41d5253 commit 496c296

4 files changed

Lines changed: 70 additions & 4 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
services:
2+
opensearch:
3+
image: opensearchproject/opensearch:2
4+
container_name: opensearch
5+
environment:
6+
- discovery.type=single-node
7+
- DISABLE_SECURITY_PLUGIN=true
8+
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=Perses-Test-1!
9+
- OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
10+
- bootstrap.memory_lock=true
11+
- http.cors.enabled=true
12+
- http.cors.allow-origin=*
13+
- http.cors.allow-methods=GET,POST,PUT,DELETE,OPTIONS
14+
- http.cors.allow-headers=X-Requested-With,Content-Type,Content-Length,Authorization
15+
- http.cors.allow-credentials=true
16+
ulimits:
17+
memlock:
18+
soft: -1
19+
hard: -1
20+
nofile:
21+
soft: 65536
22+
hard: 65536
23+
ports:
24+
- "9200:9200"
25+
- "9600:9600"
26+
healthcheck:
27+
test: ["CMD-SHELL", "curl -fsS http://localhost:9200/_cluster/health || exit 1"]
28+
interval: 5s
29+
timeout: 5s
30+
retries: 20
31+
32+
dashboards:
33+
image: opensearchproject/opensearch-dashboards:2
34+
container_name: opensearch-dashboards
35+
environment:
36+
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
37+
- DISABLE_SECURITY_DASHBOARDS_PLUGIN=true
38+
ports:
39+
- "5601:5601"
40+
depends_on:
41+
opensearch:
42+
condition: service_healthy

opensearch/rsbuild.config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default createConfigForPlugin({
1818
name: 'OpenSearch',
1919
rsbuildConfig: {
2020
server: { port: 3135 },
21+
dev: { hmr: false, liveReload: false },
2122
plugins: [pluginReact()],
2223
},
2324
moduleFederation: {
@@ -28,16 +29,16 @@ export default createConfigForPlugin({
2829
shared: {
2930
react: { requiredVersion: '18.2.0', singleton: true },
3031
'react-dom': { requiredVersion: '18.2.0', singleton: true },
31-
echarts: { singleton: true },
32+
echarts: { requiredVersion: '5.5.0', singleton: true },
3233
'date-fns': { singleton: true },
33-
'date-fns-tz': { singleton: true },
34-
lodash: { singleton: true },
34+
'date-fns-tz': { requiredVersion: '^3.2.0', version: '3.2.0', singleton: true },
35+
lodash: { requiredVersion: '^4.17.21', singleton: true },
3536
'@perses-dev/components': { singleton: true },
3637
'@perses-dev/plugin-system': { singleton: true },
3738
'@perses-dev/explore': { singleton: true },
3839
'@perses-dev/dashboards': { singleton: true },
3940
'@emotion/react': { requiredVersion: '^11.11.3', singleton: true },
40-
'@emotion/styled': { singleton: true },
41+
'@emotion/styled': { requiredVersion: '^11.6.0', singleton: true },
4142
'@hookform/resolvers': { singleton: true },
4243
'@tanstack/react-query': { singleton: true },
4344
'react-hook-form': { singleton: true },
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"kind": "OpenSearchLogQuery",
3+
"spec": {
4+
"datasource": {
5+
"kind": "OpenSearchDatasource",
6+
"name": "opensearch"
7+
},
8+
"query": ""
9+
}
10+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"kind": "OpenSearchLogQuery",
3+
"spec": {
4+
"datasource": {
5+
"kind": "OpenSearchDatasource",
6+
"name": "opensearch"
7+
},
8+
"query": "source=otel-logs-* | where traceId='abc123'",
9+
"index": "otel-logs-*",
10+
"timestampField": "@timestamp",
11+
"messageField": "body"
12+
}
13+
}

0 commit comments

Comments
 (0)