Skip to content

Commit

Permalink
MariaDB 10.6 && 10.11. OpenSearch 1.3. ReadME update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Jun 27, 2024
1 parent 1ba74fe commit d7e9c1e
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 32 deletions.
67 changes: 35 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,38 @@ For contribution guidelines, see [Code contribution guide](https://docs.spryker.

## Supported services

| Service | Engine | Version(s) | ARM support | Note |
|-----------------|--------------|--------------|-------------|------------------------------------|
| database | postgres | 9.6* | ✓ | |
| | | 10 | ✓ | |
| | | 11 | ✓ | |
| | | 12 | ✓ | |
| | mysql | 5.7 | | |
| | | mariadb-10.2 | ✓ | |
| | | mariadb-10.3 | ✓ | |
| | | mariadb-10.4 | ✓ | |
| | | mariadb-10.5 | ✓ | |
| broker | rabbitmq | 3.7 | | |
| | | 3.8 | ✓ | |
| | | 3.9 | ✓ | |
| session | redis | 5.0 | ✓ | |
| key_value_store | redis | 5.0 | ✓ | |
| search | elastic | 5.6* | ✓ | https://www.elastic.co/support/eol |
| | | 6.8 | ✓ | https://www.elastic.co/support/eol |
| | | 7.6 | ✓ | |
| | | 7.10 | ✓ | |
| scheduler | jenkins | 2.176 | | |
| | | 2.305 | ✓ | |
| | | 2.324 | ✓ | |
| webdriver | phantomjs | latest* | | |
| | chromedriver | latest | ✓ | |
| mail_catcher | mailhog | 1.0 | ✓ | |
| swagger | swagger-ui | v3.24 | ✓ | |
| kibana | kibana | 5.6* | ✓ | https://www.elastic.co/support/eol |
| | | 6.8 | ✓ | https://www.elastic.co/support/eol |
| | | 7.6 | ✓ | |
| | | 7.10 | ✓ | |
| blackfire | blackfire | latest | ✓ | |
| Service | Engine | Version(s) | ARM support | Note |
|-----------------|--------------|---------------|-------------|------------------------------------|
| database | postgres | 9.6* | ✓ | |
| | | 10 | ✓ | |
| | | 11 | ✓ | |
| | | 12 | ✓ | |
| | mysql | 5.7 | | |
| | | mariadb-10.2 | ✓ | |
| | | mariadb-10.3 | ✓ | |
| | | mariadb-10.4 | ✓ | |
| | | mariadb-10.5 | ✓ | |
| | | mariadb-10.6 | ✓ | |
| | | mariadb-10.11 | ✓ | |
| broker | rabbitmq | 3.7 | | |
| | | 3.8 | ✓ | |
| | | 3.9 | ✓ | |
| session | redis | 5.0 | ✓ | |
| key_value_store | redis | 5.0 | ✓ | |
| search | elastic | 5.6* | ✓ | https://www.elastic.co/support/eol |
| | | 6.8 | ✓ | https://www.elastic.co/support/eol |
| | | 7.6 | ✓ | |
| | | 7.10 | ✓ | |
| | opensearch | 1.3 | ✓ | |
| scheduler | jenkins | 2.176 | | |
| | | 2.305 | ✓ | |
| | | 2.324 | ✓ | |
| webdriver | phantomjs | latest* | | |
| | chromedriver | latest | ✓ | |
| mail_catcher | mailhog | 1.0 | ✓ | |
| swagger | swagger-ui | v3.24 | ✓ | |
| kibana | kibana | 5.6* | ✓ | https://www.elastic.co/support/eol |
| | | 6.8 | ✓ | https://www.elastic.co/support/eol |
| | | 7.6 | ✓ | |
| | | 7.10 | ✓ | |
| blackfire | blackfire | latest | ✓ | |
18 changes: 18 additions & 0 deletions context/opensearch/opensearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Cluster ################################
cluster.name: "docker-cluster"

bootstrap.memory_lock: "true" # along with the memlock settings below, disables swapping

# Threshold ################################
cluster.routing.allocation.disk.threshold_enabled: true
cluster.routing.allocation.disk.watermark.low: 90%
cluster.routing.allocation.disk.watermark.high: 95%

# Security #################################
plugins.security.disabled: true

# Network ###################################
http.host: 0.0.0.0

# Http ###################################
http.max_content_length: 10mb
21 changes: 21 additions & 0 deletions docs/06-configuring-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,27 @@ services:
docker/sdk up
```

## OpenSearch

[OpenSearch](https://opensearch.org/docs/1.3/) is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.

### Configuration

1. Adjust `deploy.*.yml` in the `services:` section to open the port used for accessing OpenSearch:
```yaml
services:
search:
engine: opensearch
endpoints:
localhost:9200
protocol: tcp
2. Bootstrap the docker setup and rebuild the application:
```bash
docker/sdk boot deploy.*.yml &&\
docker/sdk up
```

## Kibana UI

[Kibana](https://www.elastic.co/kibana) is an open source analytics and visualization platform designed to work with Elasticsearch. You use Kibana to search, view, and interact with data stored in Elasticsearch indices. You can easily perform advanced data analysis and visualize your data in a variety of charts, tables, and maps.
Expand Down
6 changes: 6 additions & 0 deletions generator/src/templates/env/search/opensearch.env.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SPRYKER_SEARCH_ENGINE=OS
SPRYKER_SEARCH_HOST={{ serviceName }}
SPRYKER_SEARCH_PORT={{ serviceData['port'] | default(9200) }}
SPRYKER_SEARCH_INDEX_PREFIX={{ searchIndexPrefix }}
# STORE-SPECIFIC
#SPRYKER_SEARCH_NAMESPACE=
3 changes: 3 additions & 0 deletions generator/src/templates/nginx/tcp/opensearch.server.conf.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% extends "nginx/tcp/server.conf.twig" %}
{% block port %}{{ port | default(9200) }}{% endblock port %}
{% block upstream %}{{ upstream }}:9200{% endblock upstream %}
19 changes: 19 additions & 0 deletions generator/src/templates/service/mysql/mariadb-10.11/mysql.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ serviceName }}:
image: mariadb:10.11
networks:
- private
labels:
'spryker.app.name': database
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
interval: 10s
timeout: 10s
retries: 5
environment:
MYSQL_ROOT_PASSWORD: "{{ serviceData['root']['password'] }}"
LANG: C.UTF-8
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/var/lib/mysql:rw
- ./${DEPLOYMENT_PATH}/context/mysql/my.cnf:/etc/mysql/mariadb.conf.d/my.cnf:ro
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ serviceName }}:
image: mariadb:10.6
networks:
- private
labels:
'spryker.app.name': database
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
interval: 10s
timeout: 10s
retries: 5
environment:
MYSQL_ROOT_PASSWORD: "{{ serviceData['root']['password'] }}"
LANG: C.UTF-8
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/var/lib/mysql:rw
- ./${DEPLOYMENT_PATH}/context/mysql/my.cnf:/etc/mysql/mariadb.conf.d/my.cnf:ro
25 changes: 25 additions & 0 deletions generator/src/templates/service/opensearch/1.3/opensearch.yml.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ serviceName }}:
image: opensearchproject/opensearch:1.3
networks:
- private
labels:
'spryker.app.name': search
'spryker.app.type': services
'spryker.project': ${SPRYKER_DOCKER_PREFIX}:${SPRYKER_DOCKER_TAG}
healthcheck:
test: ["CMD", "curl", "-f", "localhost:9200/_cat/health"]
interval: 10s
timeout: 5s
retries: 5
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
volumes:
- {{ serviceName }}-{{ serviceData['engine'] }}-data:/usr/share/opensearch/data:rw
- ./${DEPLOYMENT_PATH}/context/opensearch/opensearch.yml:/usr/share/opensearch/config/opensearch.yml:ro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% include "service/#{engine}/1.3/#{engine}.yml.twig" with _context only %}
2 changes: 2 additions & 0 deletions generator/src/templates/terraform/search/opensearch.tf.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SPRYKER_SEARCH_ENGINE = "OS"
SPRYKER_SEARCH_INDEX_PREFIX = "{{ searchIndexPrefix }}"

0 comments on commit d7e9c1e

Please sign in to comment.