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

Commit

Permalink
Merge pull request #803 from joestewart/feature/add-elasticsearch
Browse files Browse the repository at this point in the history
Add elasticsearch to installed extras
  • Loading branch information
geerlingguy committed Jul 15, 2016
2 parents 3043a72 + 69706ef commit ca3a7b6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ It will install the following on an Ubuntu 16.04 (by default) linux VM:
- Drupal Console
- Varnish 4.x (configurable)
- Apache Solr 4.10.x (configurable)
- Elasticsearch
- Node.js 0.12 (configurable)
- Selenium, for testing your sites via Behat
- Ruby
Expand Down
2 changes: 2 additions & 0 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ installed_extras:
- adminer
# - blackfire
- drupalconsole
# - elasticsearch
- mailhog
# - memcached
# - newrelic
Expand Down Expand Up @@ -209,6 +210,7 @@ firewall_allowed_tcp_ports:
- "8080"
- "8443"
- "8983"
- "9200"
firewall_log_dropped_packets: false

# PHP Configuration. Currently-supported versions: 5.6, 7.0.
Expand Down
24 changes: 24 additions & 0 deletions docs/extras/elasticsearch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[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.

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.

The URL to connect to the local elasticsearch server (assuming you're using the default `elasticsearch_http_port` of 9200) from Drupal is:

http://localhost:9200

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.

elasticsearch_network_host: 0.0.0.0

The Elasticsearch server can then be accessed at the configured domain:

http://drupalvm.dev:9200

## Elasticsearch configuration

You can add configuration for Elasticsearch by setting the appropriate variables inside `config.yml` before you build Drupal VM.

elasticsearch_network_host: localhost
elasticsearch_http_port: 9200

Consult the [geerlingguy.elasticsearch](https://github.com/geerlingguy/ansible-role-elasticsearch) role for additional variables available for configuration.
3 changes: 2 additions & 1 deletion provisioning/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@
- { role: geerlingguy.redis, when: '"redis" in installed_extras' }
- { role: geerlingguy.php-redis, when: '"redis" in installed_extras' }
- { role: geerlingguy.ruby, when: '"ruby" in installed_extras' }
- { role: geerlingguy.java, when: '"solr" in installed_extras or "selenium" in installed_extras' }
- { role: geerlingguy.java, when: '"solr" in installed_extras or "selenium" in installed_extras or "elasticsearch" in installed_extras'}
- { role: arknoll.selenium, when: '"selenium" in installed_extras' }
- { role: geerlingguy.solr, when: '"solr" in installed_extras' }
- { role: geerlingguy.elasticsearch, when: '"elasticsearch" in installed_extras' }
- { role: geerlingguy.varnish, when: '"varnish" in installed_extras' }

# Roles for security and stability on production.
Expand Down
2 changes: 2 additions & 0 deletions provisioning/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
version: 1.0.7
- src: geerlingguy.drush
version: 1.1.2
- src: geerlingguy.elasticsearch
version: 2.1.0
- src: geerlingguy.firewall
version: 1.0.9
- src: geerlingguy.git
Expand Down

0 comments on commit ca3a7b6

Please sign in to comment.