Skip to content

Commit

Permalink
Use OpenSearch 2.3 by default instead of Elasticsearch 7.10, but prov…
Browse files Browse the repository at this point in the history
…ide compatibility for both (#310)
  • Loading branch information
Phil Varner authored Dec 9, 2022
1 parent 7bf3801 commit 800daa0
Show file tree
Hide file tree
Showing 19 changed files with 16,713 additions and 13,623 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ jobs:
name: Run tests
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
env:
discovery.type: single-node
ports:
- 9200:9200
- 9300:9300
localstack:
image: localstack/localstack
env:
Expand All @@ -32,6 +25,9 @@ jobs:
node-version-file: ".nvmrc"
cache: npm
cache-dependency-path: package.json
- uses: ankane/setup-opensearch@v1
with:
opensearch-version: 2.3
- name: Upgrade npm
run: npm install -g npm@latest
- name: Install dependencies
Expand All @@ -44,8 +40,8 @@ jobs:
run: npm audit --omit dev
- name: Unit tests
run: npm run test:coverage
- name: Wait for Elasticsearch
run: ./bin/wait-for-elasticsearch/run.sh
- name: Wait for OpenSearch
run: ./bin/wait-for-opensearch/run.sh
- name: System tests
run: npm run test:system
- name: Run build
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ _book
.DS_STORE
.serverless/
.serverless-offline
serverless.yml
serverless*.yml
!serverless.example.yml
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Changed

- The serverless.yml.example file now has zone awareness enabled and an even number of
- AWS OpenSearch Service OpenSearch 2.3 is used as the default instead of Elasticsearch 7.10.
See [migration section in README.md](README.md#04x---05x).
- The serverless.example.yml file now has zone awareness enabled and an even number of
Elasticsearch nodes
- Upgrade serverless to 3.x
- Remove use of serverless-psuedo-parameters
Expand Down
164 changes: 143 additions & 21 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -e

D=$(dirname "$0")

echo 'Waiting for ElasticSearch'
echo 'Waiting for OpenSearch'

timeout 60 "${D}/wait.sh"

echo 'Elasticsearch is up'
echo 'OpenSearch is up'
File renamed without changes.
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: "3.8"
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
opensearch:
image: opensearchproject/opensearch:2.3.0
ports:
- "127.0.0.1:9200:9200"
- "127.0.0.1:9300:9300"
environment:
- discovery.type=single-node
volumes:
- ./opensearch/config/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
localstack:
image: localstack/localstack
ports:
Expand Down
10 changes: 10 additions & 0 deletions opensearch/config/opensearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Cluster Settings
cluster.name: stac-cluster
node.name: es01
network.host: 0.0.0.0
transport.host: 0.0.0.0
discovery.type: single-node
http.port: 9200

# Security
plugins.security.disabled: true
Loading

0 comments on commit 800daa0

Please sign in to comment.