diff --git a/.env b/.env index 8ad2353..48fb09c 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ # Local project name - setting this here aligns container names with routes -COMPOSE_PROJECT_NAME=drupal-opensearch +COMPOSE_PROJECT_NAME=drupal-elasticsearch diff --git a/.github/workflows/drupal-example.yaml b/.github/workflows/drupal-example.yaml index 8ea4297..5b53608 100644 --- a/.github/workflows/drupal-example.yaml +++ b/.github/workflows/drupal-example.yaml @@ -5,11 +5,11 @@ on: branches: - 'main' - 'dev' - - 'opensearch' + - 'elasticsearch' pull_request: branches: - 'main' - - 'opensearch' + - 'elasticsearch' jobs: test-suite: diff --git a/.lagoon.yml b/.lagoon.yml index 07579e7..d03e73e 100644 --- a/.lagoon.yml +++ b/.lagoon.yml @@ -1,6 +1,6 @@ docker-compose-yaml: docker-compose.yml -project: drupal-opensearch +project: drupal-elasticsearch tasks: # pre-rollout: diff --git a/.lando.yml b/.lando.yml index 260b5f8..4786e01 100644 --- a/.lando.yml +++ b/.lando.yml @@ -1,4 +1,4 @@ -name: drupal-opensearch +name: drupal-elasticsearch recipe: lagoon config: flavor: drupal diff --git a/README.md b/README.md index 4dfa2d4..e05f2be 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Base template for Drupal projects hosted on Lagoon +# Base template for Drupal Elasticsearch projects hosted on Lagoon This template includes everything necessary to run on [Lagoon](https://www.github.com/uselagoon/lagoon) (in both the local development environments or on hosted Lagoon clusters.) @@ -12,6 +12,7 @@ This example contains the following services: * PHP 8 * NGINX * MariaDB 10.11 +* ElasticSearch 7.10 - Note that this image is no longer supported or maintained To see similar projects with additional services, please visit https://github.com/lagoon-examples and to find out more about the services, please visit the documentation at https://docs.lagoon.sh/lagoon @@ -29,7 +30,7 @@ To see similar projects with additional services, please visit https://github.co 1. Checkout this project repo and confirm the path is in Docker's file sharing config - https://docs.docker.com/docker-for-mac/#file-sharing ```bash - git clone https://github.com/lagoon-examples/drupal-opensearch.git drupal-opensearch && cd $_ + git clone https://github.com/lagoon-examples/drupal-elasticsearch.git drupal-elasticsearch && cd $_ ``` 2. Make sure you don't have anything running on port 80 on the host machine (like a web server) then run `pygmy-go up` @@ -41,7 +42,7 @@ To see similar projects with additional services, please visit https://github.co docker-compose exec cli composer install ``` -4. Visit the new site @ `http://drupal-opensearch.docker.amazee.io` +4. Visit the new site @ `http://drupal-elasticsearch.docker.amazee.io` * If any steps fail, you're safe to rerun from any point. Starting again from the beginning will just reconfirm the changes. @@ -55,7 +56,7 @@ This repository is set up with a `.lando.yml` file, which allows you to use Land 2. Checkout the project repo and confirm the path is in Docker's file sharing config - https://docs.docker.com/docker-for-mac/#file-sharing ```bash - git clone https://github.com/lagoon-examples/drupal-opensearch.git drupal-opensearch && cd $_ + git clone --branch elasticsearch https://github.com/lagoon-examples/drupal-opensearch.git drupal-elasticsearch && cd $_ ``` 3. Make sure you have pygmy-go stopped. Run `pygmy stop` to be sure. @@ -72,7 +73,7 @@ lando start lando drush si -y ``` -6. Visit the new site @ `http://drupal-opensearch.lndo.site` +6. Visit the new site @ `http://drupal-elasticsearch.lndo.site` 7. For more information on how to configure your site, check out the [documentation](https://docs.lando.dev/config/lagoon.html). diff --git a/TESTING_dockercompose.md b/TESTING_dockercompose.md index 83130d0..b44fd5b 100644 --- a/TESTING_dockercompose.md +++ b/TESTING_dockercompose.md @@ -1,7 +1,7 @@ -Docker Compose Drupal Opensearch option - php8, nginx, mariadb, opensearch -============================================================================ +Docker Compose Drupal Elasticsearch option - php8, nginx, mariadb, elasticsearch +================================================================================ -This is a docker-compose version of the Lando example tests: +This is a docker compose version of the Lando example tests: Start up tests -------------- @@ -12,13 +12,13 @@ Run the following commands to get up and running with this example. # Should remove any previous runs and poweroff sed -i -e "/###/d" docker-compose.yml docker network inspect amazeeio-network >/dev/null || docker network create amazeeio-network -docker-compose down +docker compose down # Should start up our Lagoon Drupal site successfully -docker-compose build && docker-compose up -d +docker compose build && docker compose up -d # Ensure mariadb pod is ready to connect -docker run --rm --net drupal-opensearch_default amazeeio/dockerize dockerize -wait tcp://mariadb:3306 -timeout 1m +docker run --rm --net drupal-elasticsearch-default amazeeio/dockerize dockerize -wait tcp://mariadb:3306 -timeout 1m ``` Verification commands @@ -28,66 +28,66 @@ Run the following commands to validate things are rolling as they should. ```bash # Should be able to site install via Drush -docker-compose exec -T cli bash -c "drush si -y" -docker-compose exec -T cli bash -c "drush cr -y" -docker-compose exec -T cli bash -c "drush status" | grep "Drupal bootstrap" | grep "Successful" +docker compose exec -T cli bash -c "drush si -y" +docker compose exec -T cli bash -c "drush cr -y" +docker compose exec -T cli bash -c "drush status" | grep "Drupal bootstrap" | grep "Successful" # Should have all the services we expect -docker ps --filter label=com.docker.compose.project=drupal-opensearch | grep Up | grep drupal-opensearch_nginx_1 -docker ps --filter label=com.docker.compose.project=drupal-opensearch | grep Up | grep drupal-opensearch_mariadb_1 -docker ps --filter label=com.docker.compose.project=drupal-opensearch | grep Up | grep drupal-opensearch_php_1 -docker ps --filter label=com.docker.compose.project=drupal-opensearch | grep Up | grep drupal-opensearch_cli_1 -docker ps --filter label=com.docker.compose.project=drupal-opensearch | grep Up | grep drupal-opensearch_opensearch_1 +docker ps --filter label=com.docker.compose.project=drupal-elasticsearch | grep Up | grep drupal-elasticsearch-nginx-1 +docker ps --filter label=com.docker.compose.project=drupal-elasticsearch | grep Up | grep drupal-elasticsearch-mariadb-1 +docker ps --filter label=com.docker.compose.project=drupal-elasticsearch | grep Up | grep drupal-elasticsearch-php-1 +docker ps --filter label=com.docker.compose.project=drupal-elasticsearch | grep Up | grep drupal-elasticsearch-cli-1 +docker ps --filter label=com.docker.compose.project=drupal-elasticsearch | grep Up | grep drupal-elasticsearch-elasticsearch-1 # Should ssh against the cli container by default -docker-compose exec -T cli bash -c "env | grep LAGOON=" | grep cli-drupal +docker compose exec -T cli bash -c "env | grep LAGOON=" | grep cli-drupal # Should have the correct environment set -docker-compose exec -T cli bash -c "env" | grep LAGOON_ROUTE | grep drupal-opensearch.docker.amazee.io -docker-compose exec -T cli bash -c "env" | grep LAGOON_ENVIRONMENT_TYPE | grep development +docker compose exec -T cli bash -c "env" | grep LAGOON_ROUTE | grep drupal-elasticsearch.docker.amazee.io +docker compose exec -T cli bash -c "env" | grep LAGOON_ENVIRONMENT_TYPE | grep development # Should be running PHP 8 -docker-compose exec -T cli bash -c "php -v" | grep "PHP 8" +docker compose exec -T cli bash -c "php -v" | grep "PHP 8" # Should have composer -docker-compose exec -T cli bash -c "composer --version" +docker compose exec -T cli bash -c "composer --version" # Should have php cli -docker-compose exec -T cli bash -c "php --version" +docker compose exec -T cli bash -c "php --version" # Should have drush -docker-compose exec -T cli bash -c "drush --version" +docker compose exec -T cli bash -c "drush --version" # Should have npm -docker-compose exec -T cli bash -c "npm --version" +docker compose exec -T cli bash -c "npm --version" # Should have node -docker-compose exec -T cli bash -c "node --version" +docker compose exec -T cli bash -c "node --version" # Should have yarn -docker-compose exec -T cli bash -c "yarn --version" +docker compose exec -T cli bash -c "yarn --version" # Should have a running Drupal site served by nginx on port 8080 -docker-compose exec -T cli bash -c "curl -kL http://nginx:8080" | grep "Drush Site-Install" +docker compose exec -T cli bash -c "curl -kL http://nginx:8080" | grep "Drush Site-Install" -# Should have Opensearch running -docker-compose exec -T cli bash -c "curl -kL http://opensearch:9200" | grep "docker-cluster" +# Should have Elasticsearch running +docker compose exec -T cli bash -c "curl -kL http://elasticsearch:9200" | grep "docker-cluster" -# Should have Opensearch cluster healthy -docker-compose exec -T cli bash -c "curl -kL http://opensearch:9200/_cluster/health" | json_pp | grep status | grep -v red +# Should have Elasticsearch cluster healthy +docker compose exec -T cli bash -c "curl -kL http://elasticsearch:9200/_cluster/health" | json_pp | grep status | grep -v red # Should be able to db-export and db-import the database -docker-compose exec -T cli bash -c "drush sql-dump --result-file /app/test.sql" -docker-compose exec -T cli bash -c "drush sql-drop -y" -docker-compose exec -T cli bash -c "drush sql-cli < /app/test.sql" -docker-compose exec -T cli bash -c "rm test.sql*" +docker compose exec -T cli bash -c "drush sql-dump --result-file /app/test.sql" +docker compose exec -T cli bash -c "drush sql-drop -y" +docker compose exec -T cli bash -c "drush sql-cli < /app/test.sql" +docker compose exec -T cli bash -c "rm test.sql*" # Should be able to show the drupal tables -docker-compose exec -T cli bash -c "drush sqlq \'show tables;\'" | grep users +docker compose exec -T cli bash -c "drush sqlq \'show tables;\'" | grep users # Should be able to rebuild and persist the database -docker-compose build && docker-compose up -d -docker-compose exec -T cli bash -c "drush sqlq \'show tables;\'" | grep users +docker compose build && docker compose up -d +docker compose exec -T cli bash -c "drush sqlq \'show tables;\'" | grep users ``` Destroy tests @@ -97,5 +97,5 @@ Run the following commands to trash this app like nothing ever happened. ```bash # Should be able to destroy our Drupal site with success -docker-compose down --volumes --remove-orphans +docker compose down --volumes --remove-orphans ``` diff --git a/TESTING_lando.md b/TESTING_lando.md index f7a72a6..e112717 100644 --- a/TESTING_lando.md +++ b/TESTING_lando.md @@ -44,7 +44,7 @@ docker ps --filter label=com.docker.compose.project=drupalopensearch | grep Up | lando ssh -c "env | grep LAGOON=" | grep cli-drupal # Should have the correct environment set -lando ssh -c "env" | grep LAGOON_ROUTE | grep drupal-opensearch.lndo.site +lando ssh -c "env" | grep LAGOON_ROUTE | grep drupal-elasticsearch.lndo.site lando ssh -c "env" | grep LAGOON_ENVIRONMENT_TYPE | grep development # Should be running PHP 8 diff --git a/assets/all.settings.php b/assets/all.settings.php index aa41c49..f657eb4 100644 --- a/assets/all.settings.php +++ b/assets/all.settings.php @@ -28,12 +28,15 @@ $settings['skip_permissions_hardening'] = TRUE; } -### Lagoon Opensearch connection. -// WARNING: you have to create a search_api server having "opensearch" machine name at -// /admin/config/search/search-api/add-server to make this work. +### Lagoon Elasticsearch connection. +// WARNING: you have to create an elasticsearch cluster called "elastic" at +// /admin/config/search/elasticsearch-connector and a search_api server called +// "elastic" at /admin/config/search/search-api/add-server to make this work. if (getenv('LAGOON')) { - $config['search_api.server.opensearch']['backend_config']['connector_config']['url'] = getenv('OPENSEARCH_HOST') ?: 'http://opensearch'; - $config['search_api.server.opensearch']['backend_config']['connector']= 'standard'; - $config['search_api.server.opensearch']['backend'] = 'opensearch'; - $config['search_api.server.opensearch']['name'] = 'Lagoon opensearch - Environment: ' . getenv('LAGOON_PROJECT'); -} \ No newline at end of file + $config['elasticsearch_connector.cluster.elastic']['cluster_id'] = 'elastic'; + $config['elasticsearch_connector.cluster.elastic']['name'] = 'elastic'; + $config['elasticsearch_connector.cluster.elastic']['status'] = '1'; + $config['elasticsearch_connector.cluster.elastic']['url'] = 'http://elasticsearch:9200'; + $config['search_api.server.elastic']['backend_config']['cluster_settings']['cluster'] = 'elastic'; + $config['search_api.server.elastic']['name'] = 'Lagoon Elastic - Environment: ' . getenv('LAGOON_PROJECT'); + } diff --git a/composer.json b/composer.json index 1673f3c..d4880e5 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "lagoon-examples/drupal-opensearch", + "name": "lagoon-examples/drupal-elasticsearch", "description": "Project template for Drupal projects with MariaDB, hosted on Lagoon", "type": "project", "license": "GPL-2.0-or-later", @@ -23,9 +23,9 @@ "drupal/core-composer-scaffold": "10.1.6", "drupal/core-project-message": "10.1.6", "drupal/core-recommended": "10.1.6", + "drupal/elasticsearch_connector": "7.0-alpha4", "drupal/lagoon_logs": "3.0.0", "drupal/search_api": "1.30.0", - "drupal/search_api_opensearch": "2.0.0-beta3", "drush/drush": "12.4.2", "zaporylie/composer-drupal-optimizations": "1.2.0" }, diff --git a/composer.lock b/composer.lock index 12f9f23..8539f65 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "44ec94f8252ad61f3ea47957e229e2a9", + "content-hash": "983eb2ce7ba7779a4c07df204509c977", "packages": [ { "name": "amazeeio/drupal_integrations", @@ -1574,6 +1574,77 @@ }, "time": "2023-11-01T11:59:20+00:00" }, + { + "name": "drupal/elasticsearch_connector", + "version": "7.0.0-alpha4", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/elasticsearch_connector.git", + "reference": "8.x-7.0-alpha4" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/elasticsearch_connector-8.x-7.0-alpha4.zip", + "reference": "8.x-7.0-alpha4", + "shasum": "2e0922d831a781555970a787c9ec98dc9891f565" + }, + "require": { + "drupal/core": "^9.2 || ^10", + "ext-curl": "*", + "makinacorpus/php-lucene": "^1.0.2", + "nodespark/des-connector": "7.x-dev" + }, + "require-dev": { + "behat/mink-selenium2-driver": "^1.3", + "bex/behat-screenshot": "^1.2", + "drupal/coder": "^8.2", + "drupal/drupal-extension": "master-dev", + "drupal/search_api": "^1.4", + "phpmd/phpmd": "^2.6", + "phpmetrics/phpmetrics": "^2.3" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-7.0-alpha4", + "datestamp": "1673006177", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "Nikolay Ignatov", + "homepage": "http://www.nodespark.com", + "email": "nignatov@nodespark.com", + "role": "Creator and Maintainer" + }, + { + "name": "See other contributors", + "homepage": "https://www.drupal.org/node/2159059/committers" + }, + { + "name": "sokru", + "homepage": "https://www.drupal.org/user/388235" + }, + { + "name": "ygerasimov", + "homepage": "https://www.drupal.org/user/257311" + } + ], + "description": "Elasticsearch Connector module for Drupal.", + "homepage": "https://www.drupal.org/project/elasticsearch_connector", + "support": { + "source": "https://github.com/nodespark/elasticsearch_connector", + "issues": "https://www.drupal.org/project/issues/elasticsearch_connector" + } + }, { "name": "drupal/lagoon_logs", "version": "3.0.0", @@ -1704,71 +1775,6 @@ "irc": "irc://irc.freenode.org/drupal-search-api" } }, - { - "name": "drupal/search_api_opensearch", - "version": "2.0.0-beta3", - "source": { - "type": "git", - "url": "https://git.drupalcode.org/project/search_api_opensearch.git", - "reference": "2.0.0-beta3" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/search_api_opensearch-2.0.0-beta3.zip", - "reference": "2.0.0-beta3", - "shasum": "c2d61fda842d2f192c0bcc018e140e6c82fbbca8" - }, - "require": { - "drupal/core": "^9 || ^10", - "drupal/search_api": "^1.23", - "makinacorpus/php-lucene": "^1.1", - "opensearch-project/opensearch-php": "^2.0", - "php": "^8" - }, - "require-dev": { - "drupal/coder": "^8.3", - "drupal/geofield": "^1.46", - "drush/drush": "^11.0" - }, - "suggest": { - "aws/aws-sdk-php": "Required when using search_api_aws_signature_connector.", - "drupal/geofield": "Required when using search_api_opensearch_location." - }, - "type": "drupal-module", - "extra": { - "drupal": { - "version": "2.0.0-beta3", - "datestamp": "1692570235", - "security-coverage": { - "status": "not-covered", - "message": "Beta releases are not covered by Drupal security advisories." - } - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "acbramley", - "homepage": "https://www.drupal.org/user/1036766" - }, - { - "name": "kim.pepper", - "homepage": "https://www.drupal.org/user/370574" - }, - { - "name": "larowlan", - "homepage": "https://www.drupal.org/user/395439" - } - ], - "description": "Provides an OpenSearch backend for Search API.", - "homepage": "https://www.drupal.org/project/search_api_opensearch", - "support": { - "source": "https://git.drupalcode.org/project/search_api_opensearch" - } - }, { "name": "drush/drush", "version": "12.4.2", @@ -1980,6 +1986,69 @@ ], "time": "2023-10-06T06:47:41+00:00" }, + { + "name": "elasticsearch/elasticsearch", + "version": "v7.17.2", + "source": { + "type": "git", + "url": "git@github.com:elastic/elasticsearch-php.git", + "reference": "2d302233f2bb0926812d82823bb820d405e130fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/2d302233f2bb0926812d82823bb820d405e130fc", + "reference": "2d302233f2bb0926812d82823bb820d405e130fc", + "shasum": "" + }, + "require": { + "ext-json": ">=1.3.7", + "ezimuel/ringphp": "^1.1.2", + "php": "^7.3 || ^8.0", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "ext-yaml": "*", + "ext-zip": "*", + "mockery/mockery": "^1.2", + "phpstan/phpstan": "^1.10", + "phpunit/phpunit": "^9.3", + "squizlabs/php_codesniffer": "^3.4", + "symfony/finder": "~4.0" + }, + "suggest": { + "ext-curl": "*", + "monolog/monolog": "Allows for client-level logging and tracing" + }, + "type": "library", + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Elasticsearch\\": "src/Elasticsearch/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0", + "LGPL-2.1-only" + ], + "authors": [ + { + "name": "Zachary Tong" + }, + { + "name": "Enrico Zimuel" + } + ], + "description": "PHP Client for Elasticsearch", + "keywords": [ + "client", + "elasticsearch", + "search" + ], + "time": "2023-04-21T15:31:12+00:00" + }, { "name": "ezimuel/guzzlestreams", "version": "3.1.0", @@ -2932,71 +3001,118 @@ "time": "2023-05-19T20:20:00+00:00" }, { - "name": "opensearch-project/opensearch-php", - "version": "2.2.0", + "name": "nodespark/des-connector", + "version": "7.x-dev", "source": { "type": "git", - "url": "https://github.com/opensearch-project/opensearch-php.git", - "reference": "8b6cdbce1c5c2436fa2458fc1c9f698d0fc760c7" + "url": "https://github.com/nodespark/des-connector.git", + "reference": "266389f4592cb10081b344e9e374553a677d726f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opensearch-project/opensearch-php/zipball/8b6cdbce1c5c2436fa2458fc1c9f698d0fc760c7", - "reference": "8b6cdbce1c5c2436fa2458fc1c9f698d0fc760c7", + "url": "https://api.github.com/repos/nodespark/des-connector/zipball/266389f4592cb10081b344e9e374553a677d726f", + "reference": "266389f4592cb10081b344e9e374553a677d726f", "shasum": "" }, "require": { - "ext-curl": "*", - "ext-json": ">=1.3.7", - "ezimuel/ringphp": "^1.1.2", - "php": "^7.3 || ^8.0", - "psr/log": "^1|^2|^3" + "php": "^7.2 || ^8.0", + "ruflin/elastica": "^7.0" }, "require-dev": { - "aws/aws-sdk-php": "^3.0", - "ext-zip": "*", - "friendsofphp/php-cs-fixer": "^3.0", - "mockery/mockery": "^1.2", - "phpstan/phpstan": "^1.7.15", - "phpstan/phpstan-mockery": "^1.1.0", - "phpunit/phpunit": "^9.3", - "symfony/finder": "~4.0 || ~5.0" - }, - "suggest": { - "aws/aws-sdk-php": "Required (^3.0.0) in order to use the SigV4 handler", - "monolog/monolog": "Allows for client-level logging and tracing" + "phpunit/phpunit": "^8.4.1 || ^9" }, "type": "library", "autoload": { "psr-4": { - "OpenSearch\\": "src/OpenSearch/" + "nodespark\\DESConnector\\": "src/DESConnector/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0", - "LGPL-2.1-only" + "LGPL-2.1" ], "authors": [ { - "name": "Elastic" + "name": "Nikolay Ignatov", + "email": "nignatov@nodespark.com", + "homepage": "http://www.nodespark.com", + "role": "Creator and Maintainer" }, { - "name": "OpenSearch Contributors" + "name": "Lachezar Valchev", + "email": "lachezar.valchev@gmail.com", + "homepage": "https://drupal.org/u/lachezar.valchev", + "role": "Maintainer" + } + ], + "description": "An abstraction library for Elasticsearch Connector module for Drupal.", + "homepage": "https://github.com/nodespark/des-connector", + "support": { + "issues": "https://github.com/nodespark/des-connector/issues", + "source": "https://github.com/nodespark/des-connector" + }, + "time": "2022-12-05T15:45:43+00:00" + }, + { + "name": "nyholm/dsn", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/Nyholm/dsn.git", + "reference": "9445621b426bac8c0ca161db8cd700da00a4e618" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Nyholm/dsn/zipball/9445621b426bac8c0ca161db8cd700da00a4e618", + "reference": "9445621b426bac8c0ca161db8cd700da00a4e618", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "symfony/phpunit-bridge": "^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Nyholm\\Dsn\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com" } ], - "description": "PHP Client for OpenSearch", + "description": "Parse your DSN strings in a powerful and flexible way", + "homepage": "http://tnyholm.se", "keywords": [ - "client", - "elasticsearch", - "opensearch", - "search" + "database", + "dsn", + "dsn parser", + "parser" ], "support": { - "issues": "https://github.com/opensearch-project/opensearch-php/issues", - "source": "https://github.com/opensearch-project/opensearch-php/tree/2.2.0" + "issues": "https://github.com/Nyholm/dsn/issues", + "source": "https://github.com/Nyholm/dsn/tree/2.0.1" }, - "time": "2023-05-20T16:57:42+00:00" + "funding": [ + { + "url": "https://github.com/Nyholm", + "type": "github" + } + ], + "time": "2021-11-18T09:23:29+00:00" }, { "name": "pear/archive_tar", @@ -3950,6 +4066,75 @@ ], "time": "2023-05-02T15:15:43+00:00" }, + { + "name": "ruflin/elastica", + "version": "7.3.1", + "source": { + "type": "git", + "url": "https://github.com/ruflin/Elastica.git", + "reference": "7c61a630c3d456b00a5610960ae3a9bd29987469" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ruflin/Elastica/zipball/7c61a630c3d456b00a5610960ae3a9bd29987469", + "reference": "7c61a630c3d456b00a5610960ae3a9bd29987469", + "shasum": "" + }, + "require": { + "elasticsearch/elasticsearch": "^7.10", + "ext-json": "*", + "nyholm/dsn": "^2.0.0", + "php": "^7.2 || ^8.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0", + "symfony/polyfill-php73": "^1.19" + }, + "require-dev": { + "aws/aws-sdk-php": "^3.155", + "guzzlehttp/guzzle": "^6.3 || ^7.2", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-phpunit": "^1.1", + "phpunit/phpunit": "^8.5.8 || ^9.4", + "symfony/phpunit-bridge": "^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow using IAM authentication with Amazon ElasticSearch Service", + "guzzlehttp/guzzle": "Allow using guzzle as transport", + "monolog/monolog": "Logging request" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Elastica\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Ruflin", + "homepage": "http://ruflin.com/" + } + ], + "description": "Elasticsearch Client", + "homepage": "http://elastica.io/", + "keywords": [ + "client", + "search" + ], + "support": { + "issues": "https://github.com/ruflin/Elastica/issues", + "source": "https://github.com/ruflin/Elastica/tree/7.3.1" + }, + "time": "2023-04-21T09:04:46+00:00" + }, { "name": "sebastian/diff", "version": "4.0.5", @@ -5461,6 +5646,85 @@ ], "time": "2023-01-26T09:26:14+00:00" }, + { + "name": "symfony/polyfill-php73", + "version": "v1.28.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, { "name": "symfony/polyfill-php80", "version": "v1.28.0", @@ -10867,85 +11131,6 @@ ], "time": "2023-05-30T09:01:24+00:00" }, - { - "name": "symfony/polyfill-php73", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "reference": "fe2f306d1d9d346a7fee353d0d5012e401e984b5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" - }, { "name": "theseer/tokenizer", "version": "1.2.1", diff --git a/docker-compose.yml b/docker-compose.yml index 43a6d46..30664e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,7 +8,7 @@ x-volumes: x-environment: &default-environment # Route that should be used locally, if you are using pygmy, this route *must* end with .docker.amazee.io - LAGOON_ROUTE: &default-url http://${COMPOSE_PROJECT_NAME:-drupal-opensearch}.docker.amazee.io + LAGOON_ROUTE: &default-url http://${COMPOSE_PROJECT_NAME:-drupal-elasticsearch}.docker.amazee.io # Uncomment if you like to have the system behave like in production #LAGOON_ENVIRONMENT_TYPE: production # Uncomment to enable xdebug and then restart via `docker-compose up -d` @@ -33,7 +33,7 @@ services: build: context: . dockerfile: lagoon/cli.dockerfile - image: &cli-image ${COMPOSE_PROJECT_NAME:-drupal-opensearch}-cli # this image will be reused as `CLI_IMAGE` in subsequent Docker builds + image: &cli-image ${COMPOSE_PROJECT_NAME:-drupal-elasticsearch}-cli # this image will be reused as `CLI_IMAGE` in subsequent Docker builds labels: # Lagoon Labels lagoon.type: cli-persistent @@ -99,17 +99,17 @@ services: volumes: - db:/var/lib/mysql - opensearch: - image: uselagoon/opensearch-2:latest + elasticsearch: + image: uselagoon/elasticsearch-7:23.4.0 # The elasticsearch-7 image is no longer updated or supported labels: - lagoon.type: opensearch - lando.type: opensearch + lagoon.type: elasticsearch + lando.type: elasticsearch ports: - - "9200" # exposes the port 9200 with a random local port, find it with `docker-compose port opensearch 9200` + - "9200" # exposes the port 9200 with a random local port, find it with `docker-compose port elasticsearch 9200` environment: << : *default-environment volumes: - - search:/usr/share/opensearch/data + - search:/usr/share/elasticsearch/data networks: amazeeio-network: