Skip to content

Commit d72f0c9

Browse files
committed
fix(ESv9): add xpack.security.enabled=false, health check, and unify ES image source
- Add xpack.security.enabled=false to CI workflows and docker-compose (ES 9.2 enables security by default, causing connection failures) - Add health check to ci.yml ES service to prevent schema init before ES is ready (fixes socket hang up error) - Unify ES/Kibana Docker image to short names (elasticsearch:9.2.2, kibana:9.2.2) matching rumors-api conventions
1 parent 4b3c6f0 commit d72f0c9

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313
services:
1414
rumors-test-db:
15-
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.2
15+
image: elasticsearch:9.2.2
1616
ports:
1717
- 62223:9200
1818
env:
1919
discovery.type: single-node
20+
xpack.security.enabled: 'false'
21+
options: >-
22+
--health-cmd "curl http://localhost:9200/_cat/health"
23+
--health-interval 10s
24+
--health-timeout 5s
25+
--health-retries 10
2026
steps:
2127

2228
- name: Checkout rumors-db

.github/workflows/opendata.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ jobs:
1212
snapshot: ${{ steps.find-snapshot.outputs.snapshot }}
1313
services:
1414
elasticsearch:
15-
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.2
15+
image: elasticsearch:9.2.2
1616
ports:
1717
- 62223:9200
1818
env:
1919
discovery.type: single-node
20+
xpack.security.enabled: 'false'
2021
options: >-
2122
--health-cmd "curl http://localhost:9200/_cat/health"
2223
--health-interval 10s
@@ -43,7 +44,7 @@ jobs:
4344
- name: Install GCS Plugin & Keystore
4445
run: |
4546
# Find the container ID
46-
CONTAINER_ID=$(docker ps --filter "ancestor=docker.elastic.co/elasticsearch/elasticsearch:9.2.2" --format "{{.ID}}")
47+
CONTAINER_ID=$(docker ps --filter "ancestor=elasticsearch:9.2.2" --format "{{.ID}}")
4748
echo "Elasticsearch container ID: $CONTAINER_ID"
4849
4950
if [ -z "$CONTAINER_ID" ]; then

docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ version: '2'
1111

1212
services:
1313
elasticsearch:
14-
image: docker.elastic.co/elasticsearch/elasticsearch:9.2.2
14+
image: elasticsearch:9.2.2
1515
volumes:
1616
- "./esdata:/usr/share/elasticsearch/data"
1717
environment:
1818
- "path.repo=/usr/share/elasticsearch/data"
1919
- "discovery.type=single-node"
20+
- "xpack.security.enabled=false"
2021
ports:
2122
- "62223:9200"
2223

2324
kibana:
24-
image: docker.elastic.co/kibana/kibana:9.2.2
25+
image: kibana:9.2.2
2526
ports:
2627
- "62224:5601"

0 commit comments

Comments
 (0)