From ad1b3b30db890aafdf306dcb795370bd2375bf43 Mon Sep 17 00:00:00 2001 From: Marco Hermo Date: Mon, 5 Feb 2024 10:14:51 +1300 Subject: [PATCH] DDEV Elastic Enterprise Search implementation --- README.md | 152 +++++++++++++--------- docker-compose.addon-template.yaml | 16 --- docker-compose.enterprise-search.yaml | 180 ++++++++++++++++++++++++++ enterprise-search/config.yml | 18 +++ enterprise-search/elasticsearch.yml | 35 +++++ enterprise-search/kibana.yml | 31 +++++ install.yaml | 96 ++------------ 7 files changed, 367 insertions(+), 161 deletions(-) delete mode 100644 docker-compose.addon-template.yaml create mode 100644 docker-compose.enterprise-search.yaml create mode 100644 enterprise-search/config.yml create mode 100644 enterprise-search/elasticsearch.yml create mode 100644 enterprise-search/kibana.yml diff --git a/README.md b/README.md index 2880389..c0a9a7f 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,125 @@ -[![tests](https://github.com/ddev/ddev-addon-template/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-addon-template/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2024.svg) +[![tests](https://github.com/ddev/ddev-enterprise-search/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-enterprise-search/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2024.svg) -# ddev-addon-template +# ddev-enterprise-search -* [What is ddev-addon-template?](#what-is-ddev-addon-template) -* [Components of the repository](#components-of-the-repository) -* [Getting started](#getting-started) -* [How to debug in Github Actions](#how-to-debug-tests-github-actions) +- [Introduction](#introduction) +- [Getting started](#getting-started) +- [How to debug in Github Actions](#how-to-debug-tests-github-actions) -## What is ddev-addon-template? +## Introduction -This repository is a template for providing [DDEV](https://ddev.readthedocs.io) add-ons and services. +ddev-enterprise-search is the un-official implementation of Elastic Enterprise Search service for DDEV based on their Docker guide\*. -In DDEV addons can be installed from the command line using the `ddev get` command, for example, `ddev get ddev/ddev-redis` or `ddev get ddev/ddev-solr`. +Enterprise Search is an additional Elastic service that adds APIs and UIs to those already provided by Elasticsearch and Kibana. -This repository is a quick way to get started. You can create a new repo from this one by clicking the template button in the top right corner of the page. +Currently sitting at version 8.12.0, part of the implementation as a service for DDEV includes Elastic Search and Kibana containers. +This means that to use this service, existing Elastic and Kibana servies needs to be uninstalled in your project. -![template button](images/template-button.png) +From your DDEV project, install this by running `ddev get ssmarco/ddev-enterprise-search` then `ddev restart`. +This will take up to 30 minutes or so due when downloading the required docker containers (Elastic Search, Kibana and Enterprise Search). -## Components of the repository - -* The fundamental contents of the add-on service or other component. For example, in this template there is a [docker-compose.addon-template.yaml](docker-compose.addon-template.yaml) file. -* An [install.yaml](install.yaml) file that describes how to install the service or other component. -* A test suite in [test.bats](tests/test.bats) that makes sure the service continues to work as expected. -* [Github actions setup](.github/workflows/tests.yml) so that the tests run automatically when you push to the repository. +- [Reference](https://www.elastic.co/guide/en/enterprise-search/current/start.html) +- [Docker guide\*](https://www.elastic.co/guide/en/enterprise-search/current/docker.html) ## Getting started -1. Choose a good descriptive name for your add-on. It should probably start with "ddev-" and include the basic service or functionality. If it's particular to a specific CMS, perhaps `ddev--servicename`. -2. Create the new template repository by using the template button. -3. Globally replace "addon-template" with the name of your add-on. -4. Add the files that need to be added to a DDEV project to the repository. For example, you might replace `docker-compose.addon-template.yaml` with the `docker-compose.*.yaml` for your recipe. -5. Update the `install.yaml` to give the necessary instructions for installing the add-on: +1. In the DDEV project directory launch the command: + +``` +ddev get ssmarco/ddev-enterprise-search +``` + +2. Restart the DDEV instance: + +``` +ddev restart +``` + +3. Get the URL of the Kibana dashboard eg (https://your-project-name.ddev.site:5602): + +``` +ddev describe +``` + +4. Login with the username, `elastic` and password, `elastic` + +## Configuring your framework + +### Silverstripe - * The fundamental line is the `project_files` directive, a list of files to be copied from this repo into the project `.ddev` directory. - * You can optionally add files to the `global_files` directive as well, which will cause files to be placed in the global `.ddev` directory, `~/.ddev`. - * Finally, `pre_install_commands` and `post_install_commands` are supported. These can use the host-side environment variables documented [in DDEV docs](https://ddev.readthedocs.io/en/latest/users/extend/custom-commands/#environment-variables-provided). +1. Update your project's `.env` file. The API keys are found in the Enterprise Search section of Kibana dashboard. -6. Update `tests/test.bats` to provide a reasonable test for your repository. Tests are triggered either by manually executing `bats ./tests/test.bats`, automatically on every push to the repository, or periodically each night. Please make sure to attend to test failures when they happen. Others will be depending on you. Bats is a simple testing framework that just uses Bash. To run a Bats test locally, you have to [install bats-core](https://bats-core.readthedocs.io/en/stable/installation.html) first. Then you download your add-on, and finally run `bats ./tests/test.bats` within the root of the uncompressed directory. To learn more about Bats see the [documentation](https://bats-core.readthedocs.io/en/stable/). -7. When everything is working, including the tests, you can push the repository to GitHub. -8. Create a [release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository) on GitHub. -9. Test manually with `ddev get `. -10. You can test PRs with `ddev get https://github.com///tarball/` -11. Update the `README.md` to describe the add-on, how to use it, and how to contribute. If there are any manual actions that have to be taken, please explain them. If it requires special configuration of the using project, please explain how to do those. Examples in [ddev/ddev-solr](https://github.com/ddev/ddev-solr), [ddev/ddev-memcached](https://github.com/ddev/ddev-memcached), and (advanced) [ddev-platformsh](https://github.com/ddev/ddev-platformsh). -12. Update the `README.md` header in Title Case format, for example, use `# DDEV Redis`, not `# ddev-redis`. -13. Add a good short description to your repo, and add the [topic](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics) "ddev-get". It will immediately be added to the list provided by `ddev get --list --all`. -14. When it has matured you will hopefully want to have it become an "official" maintained add-on. Open an issue in the [DDEV queue](https://github.com/ddev/ddev/issues) for that. +``` +ENTERPRISE_SEARCH_ENGINE_PREFIX="my-index" +ENTERPRISE_SEARCH_API_KEY="private-xxxxxxxxxxxx-change-this" +ENTERPRISE_SEARCH_API_SEARCH_KEY="search-xxxxxxxxxxxx-change-this" +ENTERPRISE_SEARCH_ENDPOINT="http://enterprisesearch:3002" +``` -Add-ons were covered in [DDEV Add-ons: Creating, maintaining, testing](https://www.dropbox.com/scl/fi/bnvlv7zswxwm8ix1s5u4t/2023-11-07_DDEV_Add-ons.mp4?rlkey=5cma8s11pscxq0skawsoqrscp&dl=0) (part of the [DDEV Contributor Live Training](https://ddev.com/blog/contributor-training)). +2. The Enterprise Search endpoint is `http://enterprisesearch:3002` -Note that more advanced techniques are discussed in [DDEV docs](https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#additional-service-configurations-and-add-ons-for-ddev). +## Troubleshooting -## How to debug tests (Github Actions) +1. Make sure all required containers are downloaded: + +``` +docker pull docker.elastic.co/elasticsearch/elasticsearch:8.12.0 +docker pull docker.elastic.co/kibana/kibana:8.12.0 +docker pull docker.elastic.co/enterprise-search/enterprise-search:8.12.0 +``` -1. You need an SSH-key registered with GitHub. You either pick the key you have already used with `github.com` or you create a dedicated new one with `ssh-keygen -t ed25519 -a 64 -f tmate_ed25519 -C "$(date +'%d-%m-%Y')"` and add it at `https://github.com/settings/keys`. +2. Remove container volumes to restart from scratch. -2. Add the following snippet to `~/.ssh/config`: +List all existing volumes from your system: ``` -Host *.tmate.io - User git - AddKeysToAgent yes - UseKeychain yes - PreferredAuthentications publickey - IdentitiesOnly yes - IdentityFile ~/.ssh/tmate_ed25519 +docker volume ls ``` -3. Go to `https://github.com///actions/workflows/tests.yml`. -4. Click the `Run workflow` button and you will have the option to select the branch to run the workflow from and activate `tmate` by checking the `Debug with tmate` checkbox for this run. +This will show example output below: -![tmate](images/gh-tmate.jpg) +``` +DRIVER VOLUME NAME +local ddev-your-project-name_elastic-certs +local ddev-your-project-name_elastic-data +local ddev-your-project-name_elastic-kibana +local ddev-your-project-name_enterprise-data +``` -5. After the `workflow_dispatch` event was triggered, click the `All workflows` link in the sidebar and then click the `tests` action in progress workflow. +Delete the volumes by running: -7. Pick one of the jobs in progress in the sidebar. +``` +docker volume rm ddev-your-project-name_elastic-certs \ +ddev-your-project-name_elastic-data \ +ddev-your-project-name_elastic-kibana \ +ddev-your-project-name_enterprise-data +``` + +3. Restart by `ddev restart` + +4. Check the status of the project by `ddev status` + +5. Check the logs: + +``` +ddev logs -s elastic-config +ddev logs -s elasticsearch +ddev logs -s kibana +ddev logs -s enterprisesearch +``` -8. Wait until the current task list reaches the `tmate debugging session` section and the output shows something like: +6. Check job health: ``` -106 SSH: ssh PRbaS7SLVxbXImhjUqydQBgDL@nyc1.tmate.io -107 or: ssh -i PRbaS7SLVxbXImhjUqydQBgDL@nyc1.tmate.io -108 SSH: ssh PRbaS7SLVxbXImhjUqydQBgDL@nyc1.tmate.io -109 or: ssh -i PRbaS7SLVxbXImhjUqydQBgDL@nyc1.tmate.io +docker inspect --format "{{json .State.Health }}" ddev-your-project-name-enterprisesearch | jq +docker inspect --format "{{json .State.Health }}" ddev-your-project-name-kibana | jq +docker inspect --format "{{json .State.Health }}" ddev-your-project-name-elasticsearch | jq ``` -9. Copy and execute the first option `ssh PRbaS7SLVxbXImhjUqydQBgDL@nyc1.tmate.io` in the terminal and continue by pressing either q or Ctrl + c. +## Contribute -10. Start the Bats test with `bats ./tests/test.bats`. +- Anyone is welcome to submit a PR to this repo. See README.md at https://github.com/ddev/ddev-addon-template, the parent of this repo. -For a more detailed documentation about `tmate` see [Debug your GitHub Actions by using tmate](https://mxschmitt.github.io/action-tmate/). +## Maintainer -**Contributed and maintained by [@CONTRIBUTOR](https://github.com/CONTRIBUTOR)** +- Contributed and maintained by [Marco Hermo](https://github.com/ssmarco). diff --git a/docker-compose.addon-template.yaml b/docker-compose.addon-template.yaml deleted file mode 100644 index 09a8a5f..0000000 --- a/docker-compose.addon-template.yaml +++ /dev/null @@ -1,16 +0,0 @@ -#ddev-generated -# Simple template to demonstrate addon-template -services: - addon-template: - container_name: ddev-${DDEV_SITENAME}-addon-template - image: busybox:stable - command: tail -f /dev/null - networks: [default, ddev_default] - restart: "no" - # These labels ensure this service is discoverable by ddev. - labels: - com.ddev.site-name: ${DDEV_SITENAME} - com.ddev.approot: $DDEV_APPROOT - - volumes: - - ".:/mnt/ddev_config" diff --git a/docker-compose.enterprise-search.yaml b/docker-compose.enterprise-search.yaml new file mode 100644 index 0000000..50af350 --- /dev/null +++ b/docker-compose.enterprise-search.yaml @@ -0,0 +1,180 @@ +#ddev-generated + +services: + # mount certificate folder to website + web: + volumes: + - elastic-certs:/usr/share/elasticsearch/config/certs + + elastic-config: + container_name: ddev-${DDEV_SITENAME}-elastic-config + hostname: ${DDEV_SITENAME}-elastic-config + image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0 + volumes: + - ".:/mnt/ddev_config" + - elastic-certs:/usr/share/elasticsearch/config/certs + environment: + - ELASTIC_PASSWORD=elastic + - KIBANA_PASSWORD=elastic + labels: + com.ddev.site-name: ${DDEV_SITENAME} + com.ddev.approot: $DDEV_APPROOT + user: "0" + restart: "no" + command: > + bash -c ' + if [ ! -f /usr/share/elasticsearch/config/certs/ca.zip ]; then + echo "Creating CA"; + bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip; + unzip config/certs/ca.zip -d config/certs; + fi; + + if [ ! -f /usr/share/elasticsearch/config/certs/certs.zip ]; then + echo "Creating certs"; + echo -ne \ + "instances:\n"\ + " - name: elasticsearch\n"\ + " dns:\n"\ + " - elasticsearch\n"\ + " - localhost\n"\ + " ip:\n"\ + " - 127.0.0.1\n"\ + > config/certs/instances.yml; + + bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key; + unzip config/certs/certs.zip -d config/certs; + fi; + + echo "Setting file permissions" + chown -R root:root config/certs; + find . -type d -exec chmod 755 \{\} \;; + find . -type f -exec chmod 644 \{\} \;; + + echo "Listing certificates" + ls -la config/certs/ca/ca.crt + ls -la config/certs/elasticsearch/elasticsearch.crt + + echo "Waiting for Elasticsearch availability"; + until curl -s --cacert config/certs/ca/ca.crt -u elastic:elastic https://elasticsearch:9200; do sleep 5 && date; done; + + echo "Setting kibana_system password"; + until curl -s -X POST --cacert config/certs/ca/ca.crt -u elastic:elastic -H "Content-Type: application/json" https://elasticsearch:9200/_security/user/kibana_system/_password -d "{\"password\":\"elastic\"}" | grep -q "^{}"; do sleep 5 && date ; done; + + echo "Testing kibana_system user"; + until curl -s --cacert config/certs/ca/ca.crt -u kibana_system:elastic https://elasticsearch:9200; do sleep 5 && date; done; + + echo "Exit in 5 minutes" + for i in {1..5}; do date && sleep 60; done + + echo "All done!"; + ' + + elasticsearch: + depends_on: + - elastic-config + # Name of container using standard ddev convention + container_name: ddev-${DDEV_SITENAME}-elasticsearch + hostname: ${DDEV_SITENAME}-elasticsearch + image: docker.elastic.co/elasticsearch/elasticsearch:8.12.0 + volumes: + - ".:/mnt/ddev_config" + - ./enterprise-search/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml + - elastic-certs:/usr/share/elasticsearch/config/certs + - elastic-data:/usr/share/elasticsearch/data + # These labels ensure this service is discoverable by ddev. + labels: + com.ddev.site-name: ${DDEV_SITENAME} + com.ddev.approot: $DDEV_APPROOT + environment: + - node.name=elasticsearch + - cluster.name=elastic-cluster + - cluster.initial_master_nodes=elasticsearch + - ELASTIC_PASSWORD=elastic + restart: "no" + mem_limit: 1073741824 + ulimits: + memlock: + soft: -1 + hard: -1 + + kibana: + depends_on: + - elasticsearch + - elastic-config + # Name of container using standard ddev convention + container_name: ddev-${DDEV_SITENAME}-kibana + hostname: ${DDEV_SITENAME}-kibana + image: docker.elastic.co/kibana/kibana:8.12.0 + volumes: + - ".:/mnt/ddev_config" + - ./enterprise-search/kibana.yml:/usr/share/kibana/config/kibana.yml + - elastic-certs:/usr/share/kibana/config/certs + - elastic-kibana:/usr/share/kibana/data + # These labels ensure this service is discoverable by ddev. + labels: + com.ddev.site-name: ${DDEV_SITENAME} + com.ddev.approot: $DDEV_APPROOT + expose: + - "5601" + environment: + - VIRTUAL_HOST=$DDEV_HOSTNAME + - SERVERNAME=kibana + - KIBANA_PASSWORD=elastic + - HTTP_EXPOSE=5601:5601 + - HTTPS_EXPOSE=5602:5601 + mem_limit: 1073741824 + healthcheck: + test: + [ + "CMD-SHELL", + "curl -s -I http://kibana:5601 | grep -q 'HTTP/1.1 302 Found'", + ] + interval: 10s + timeout: 10s + retries: 120 + + enterprisesearch: + depends_on: + - kibana + - elasticsearch + container_name: ddev-${DDEV_SITENAME}-enterprisesearch + hostname: ${DDEV_SITENAME}-enterprisesearch + image: docker.elastic.co/enterprise-search/enterprise-search:8.12.0 + volumes: + - ".:/mnt/ddev_config" + - ./enterprise-search/config.yml:/usr/share/enterprise-search/config/enterprise-search.yml + - elastic-certs:/usr/share/enterprise-search/config/certs + - enterprise-data:/usr/share/enterprise-search/config + # These labels ensure this service is discoverable by ddev. + labels: + com.ddev.site-name: ${DDEV_SITENAME} + com.ddev.approot: $DDEV_APPROOT + environment: + - VIRTUAL_HOST=$DDEV_HOSTNAME + - SERVERNAME=enterprisesearch + - ELASTIC_PASSWORD=elastic + - KIBANA_PASSWORD=elastic + - secret_management.encryption_keys=[thequickbrownfoxjumpsoverthelazydog1cozylummoxgivessmartsquidwho] + - allow_es_settings_modification=true + - elasticsearch.host=https://elasticsearch:9200 + - elasticsearch.username=elastic + - elasticsearch.password=elastic + - elasticsearch.ssl.enabled=true + - elasticsearch.ssl.certificate_authority=/usr/share/enterprise-search/config/certs/ca/ca.crt + - kibana.external_url=http://kibana:5601 + mem_limit: 1073741824 + healthcheck: + test: + [ + "CMD-SHELL", + "curl -s -I http://enterprisesearch:3002 | grep -q 'HTTP/1.1 302 Found'", + ] + interval: 10s + timeout: 10s + retries: 120 + +volumes: + elastic-certs: + elastic-data: + elastic-kibana: + enterprise-data: diff --git a/enterprise-search/config.yml b/enterprise-search/config.yml new file mode 100644 index 0000000..504194c --- /dev/null +++ b/enterprise-search/config.yml @@ -0,0 +1,18 @@ +#ddev-generated +# enterprise-search config + +elasticsearch.username: elastic +elasticsearch.password: elastic +elasticsearch.host: https://elasticsearch:9200 +elasticsearch.ssl.enabled: true +kibana.host: http://kibana:5601 +kibana.external_url: http://kibana:5601 +skip_read_only_check: true +allow_es_settings_modification: true +ent_search.external_url: http://enterprisesearch:3002 +ent_search.listen_host: 0.0.0.0 +ent_search.listen_port: 3002 + +secret_management.encryption_keys: + [thequickbrownfoxjumpsoverthelazydog1cozylummoxgivessmartsquidwho] +elasticsearch.ssl.certificate_authority: /usr/share/enterprise-search/config/certs/ca/ca.crt diff --git a/enterprise-search/elasticsearch.yml b/enterprise-search/elasticsearch.yml new file mode 100644 index 0000000..ecccd3a --- /dev/null +++ b/enterprise-search/elasticsearch.yml @@ -0,0 +1,35 @@ +#ddev-generated +# elastics-search config + +# This file contains the configuration settings for Elasticsearch 8. +# For more information, see https://www.elastic.co/guide/en/elasticsearch/reference/current/settings.html + +# https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#cluster-name +cluster.name: "docker-cluster" +node.name: node-1 +node.attr.rack: r1 + +# https://www.elastic.co/guide/en/elasticsearch/reference/current/important-settings.html#network.host +network.host: 0.0.0.0 +http.host: 0.0.0.0 +transport.host: 0.0.0.0 +http.port: 9200 +# Disable security features +# https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#general-security-settings + +xpack.security.enabled: true +xpack.security.enrollment.enabled: true +xpack.security.authc.api_key.enabled: true +xpack.security.autoconfiguration.enabled: true +bootstrap.memory_lock: true +xpack.security.http.ssl.enabled: true +xpack.security.http.ssl.key: certs/elasticsearch/elasticsearch.key +xpack.security.http.ssl.certificate: certs/elasticsearch/elasticsearch.crt +xpack.security.http.ssl.certificate_authorities: certs/ca/ca.crt +xpack.security.http.ssl.verification_mode: certificate +xpack.security.transport.ssl.enabled: true +xpack.security.transport.ssl.key: certs/elasticsearch/elasticsearch.key +xpack.security.transport.ssl.certificate: certs/elasticsearch/elasticsearch.crt +xpack.security.transport.ssl.certificate_authorities: certs/ca/ca.crt +xpack.security.transport.ssl.verification_mode: certificate +xpack.license.self_generated.type: basic diff --git a/enterprise-search/kibana.yml b/enterprise-search/kibana.yml new file mode 100644 index 0000000..696b311 --- /dev/null +++ b/enterprise-search/kibana.yml @@ -0,0 +1,31 @@ +#ddev-generated +# kibana config + +### encryption key generate by ./bin/kibana-encryption-key generate command +xpack.encryptedSavedObjects.encryptionKey: a90aed72d393a50e22d622c25d7a5079 +xpack.reporting.encryptionKey: 8af30ceea35f064a776b7458176d44d8 +xpack.security.encryptionKey: 599ac94fc22d39512af7b6fc52e5fd7c +xpack.reporting.roles.enabled: false +monitoring.ui.container.elasticsearch.enabled: true +telemetry.optIn: false + +server.host: "0.0.0.0" +server.port: 5601 + +elasticsearch.username: kibana_system +elasticsearch.password: elastic + +elasticsearch.hosts: ["https://elasticsearch:9200"] +enterpriseSearch.host: "http://enterprisesearch:3002" +server.publicBaseUrl: "https://elasticsearch:9200" + +# Enables you to specify a path to the PEM file for the certificate +# authority for your Elasticsearch instance. +elasticsearch.ssl.certificateAuthorities: + ["/usr/share/kibana/config/certs/ca/ca.crt"] +enterpriseSearch.ssl.certificateAuthorities: + ["/usr/share/kibana/config/certs/ca/ca.crt"] + +# To disregard the validity of SSL certificates, change this setting's value to 'none'. +elasticsearch.ssl.verificationMode: none +enterpriseSearch.ssl.verificationMode: none diff --git a/install.yaml b/install.yaml index 5313833..9123ce1 100644 --- a/install.yaml +++ b/install.yaml @@ -1,91 +1,17 @@ # Details about the install.yaml file are at https://ddev.readthedocs.io/en/latest/users/extend/additional-services/#sections-and-features-of-ddev-get-add-on-installyaml - -name: addon-template - -# pre_install_actions - list of actions to run before installing the addon. -# Examples would be removing an extraneous docker volume, -# or doing a sanity check for requirements. -# DDEV environment variables can be interpolated into these actions -pre_install_actions: - # Actions with #ddev-nodisplay will not show the execution of the action, but may show their output -# - | - # #ddev-nodisplay - #ddev-description:Check architecture type for incompatible arm64 type - # if [ "$(arch)" = "arm64" -o "$(arch)" = "aarch64" ]; then - # echo "This package does not work on arm64 machines"; - # exit 1; - #fi - -# - "docker volume rm ddev-${DDEV_PROJECT}_solr 2>/dev/null || true" -#- | -# # Using #ddev-nodisplay tells ddev to be quiet about this action and not show it or its output. -# #ddev-nodisplay -# #ddev-description:Remove solr volume -# if ! ( ddev debug capabilities 2>/dev/null | grep multiple-dockerfiles >/dev/null 2>&1 ) ; then -# echo "This add-on requires DDEV v1.19.4 or higher, please upgrade." && exit 2 -# fi -#- 'echo "what is your platform.sh token" && read x' - -# This item shows templating using DDEV environment variables. -# - -# #ddev-description:Touch a file to create it -# touch somefile.${DDEV_PROJECT_TYPE}.${DDEV_DOCROOT}.txt -# - -# This item shows complex go templating possibilities based on yaml_read_files -#- | -#- #ddev-description:Create a config.platformsh.yaml -# cat <.ddev/config.platformsh.yaml -# php_version: {{ trimPrefix "php:" .platformapp.type }} -# database: -# type: {{ regexReplaceAll ":.*$" .services.db.type "" }} -# version: {{ regexReplaceAll "^.*:" .services.db.type "" }} -# -# docroot: {{ dig "web" "locations" "/" "root" "notfound" .platformapp }} -# {{ if eq .platformapp.build.flavor "composer" }} -# hooks: -# post-start: -# - composer: install -# {{ if .platformapp.hooks.deploy }} -# - exec: "{{ trimAll "\n" .platformapp.hooks.deploy | splitList "\n" | join ` && ` }}" -# {{ end }} -# {{ end }} -# -# EOF +name: enterprise-search # list of files and directories listed that are copied into project .ddev directory -# Each file should contain #ddev-generated so it can be replaced by a later `ddev get` -# if it hasn't been modified by the user. -# DDEV environment variables can be interpolated into these filenames project_files: -- docker-compose.addon-template.yaml -# - extra_files/ -# - somefile.sh - -# List of files and directories that are copied into the global .ddev directory -# DDEV environment variables can be interpolated into these filenames -global_files: -# - commands -# - homeadditions + - enterprise-search + - docker-compose.enterprise-search.yaml # List of add-on names that this add-on depends on -dependencies: -# - redis - -# DDEV environment variables can be interpolated into these actions -post_install_actions: -# - chmod +x ~/.ddev/commands/web/somecommand -# - touch somefile.${GOOS}.${DDEV_WEBSERVER} -# - perl -pi -e 's/oldstring/newstring/g' docker-compose.addon-template.yaml - -# Shell actions that can be done during removal of the add-on -removal_actions: -# - rm ~/.ddev/commands/web/somecommand - -# Advanced usage - yaml files can be read in and then used as go template actions -# in pre_install_actions and post_install_actions -# See example in -# https://github.com/rfay/ddev/blob/20220606_yaml_read_experiment/cmd/ddev/cmd/testdata/TestCmdGetComplex/recipe/install.yaml -yaml_read_files: -# someyaml: someyaml.yaml -# otheryaml: someotheryaml.yaml +#dependencies: +# - elasticsearch + +#post_install_actions: +# - | +# baseUrl=${DDEV_PRIMARY_URL} +# echo "Copy to ./enterprise-search/kibana.yml server.publicBaseUrl: $baseUrl" +# echo "server.publicBaseUrl: \"$baseUrl\"" >> ./enterprise-search/kibana.yml