Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit ca3a7b6

Browse files
authored
Merge pull request #803 from joestewart/feature/add-elasticsearch
Add elasticsearch to installed extras
2 parents 3043a72 + 69706ef commit ca3a7b6

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ It will install the following on an Ubuntu 16.04 (by default) linux VM:
1717
- Drupal Console
1818
- Varnish 4.x (configurable)
1919
- Apache Solr 4.10.x (configurable)
20+
- Elasticsearch
2021
- Node.js 0.12 (configurable)
2122
- Selenium, for testing your sites via Behat
2223
- Ruby

default.config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ installed_extras:
174174
- adminer
175175
# - blackfire
176176
- drupalconsole
177+
# - elasticsearch
177178
- mailhog
178179
# - memcached
179180
# - newrelic
@@ -209,6 +210,7 @@ firewall_allowed_tcp_ports:
209210
- "8080"
210211
- "8443"
211212
- "8983"
213+
- "9200"
212214
firewall_log_dropped_packets: false
213215

214216
# PHP Configuration. Currently-supported versions: 5.6, 7.0.

docs/extras/elasticsearch.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[Elasticsearch](https://www.elastic.co/products/elasticsearch) is a search engine based on Lucene. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.
2+
3+
To enable Elasticsearch in Drupal VM just make sure `elasticsearch` is in the list of `installed_extras` in your `config.yml`, and when you build Drupal VM, the latest version of Elasticsearch will be installed.
4+
5+
The URL to connect to the local elasticsearch server (assuming you're using the default `elasticsearch_http_port` of 9200) from Drupal is:
6+
7+
http://localhost:9200
8+
9+
To access Elasticsearch from the host computer requires changing the IP address to listen on a specific interface, or 0.0.0.0 to listen on all interfaces.
10+
11+
elasticsearch_network_host: 0.0.0.0
12+
13+
The Elasticsearch server can then be accessed at the configured domain:
14+
15+
http://drupalvm.dev:9200
16+
17+
## Elasticsearch configuration
18+
19+
You can add configuration for Elasticsearch by setting the appropriate variables inside `config.yml` before you build Drupal VM.
20+
21+
elasticsearch_network_host: localhost
22+
elasticsearch_http_port: 9200
23+
24+
Consult the [geerlingguy.elasticsearch](https://github.com/geerlingguy/ansible-role-elasticsearch) role for additional variables available for configuration.

provisioning/playbook.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@
6868
- { role: geerlingguy.redis, when: '"redis" in installed_extras' }
6969
- { role: geerlingguy.php-redis, when: '"redis" in installed_extras' }
7070
- { role: geerlingguy.ruby, when: '"ruby" in installed_extras' }
71-
- { role: geerlingguy.java, when: '"solr" in installed_extras or "selenium" in installed_extras' }
71+
- { role: geerlingguy.java, when: '"solr" in installed_extras or "selenium" in installed_extras or "elasticsearch" in installed_extras'}
7272
- { role: arknoll.selenium, when: '"selenium" in installed_extras' }
7373
- { role: geerlingguy.solr, when: '"solr" in installed_extras' }
74+
- { role: geerlingguy.elasticsearch, when: '"elasticsearch" in installed_extras' }
7475
- { role: geerlingguy.varnish, when: '"varnish" in installed_extras' }
7576

7677
# Roles for security and stability on production.

provisioning/requirements.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
version: 1.0.7
2020
- src: geerlingguy.drush
2121
version: 1.1.2
22+
- src: geerlingguy.elasticsearch
23+
version: 2.1.0
2224
- src: geerlingguy.firewall
2325
version: 1.0.9
2426
- src: geerlingguy.git

0 commit comments

Comments
 (0)