This document discusses setting up Drupal 8, Elasticsearch, and Docker. It provides instructions for pulling relevant Docker images, running Elasticsearch and Drupal containers, and configuring them to integrate. Elasticsearch is configured as the search backend in Drupal. Views is used to create a search page that indexes Elasticsearch. The demo shows Drupal and Elasticsearch running in Docker and communicating to enable search capabilities in Drupal.
4. Docker
• Docker allows you to package an
application with all of its dependencies into
a standardized unit of software
development
5. Docker
• Docker container wrap up a piece of
software in a complete filesystem that
contains everything it needs to run: code,
runtime, system tools, system libraries –
anything you can install on a server
9. Elasticsearch
• Elasticsearch is a search server based on
Lucene. It provides distributed,
multitenant-capable full-text search engine
with an HTTP web interface and Schema-
Free JSON documents.
11. Features
• Distributed and Highly Available Search
Engine
– Each index is fully sharded with a
configurable number of shards
– Each shard can have one or more replicas
– Read/Search operations performed on any of
the replica shards.
12. Features
• Multi Tenant with Multi Types
– Support for more than one index.
– Support for more than one type per index.
– Index level configuration (number of shards,
index storage).
13. Features
• Various set of APIs
– HTTP RESTful API
– Native Java API
– All APIs perform automatic node operation
rerouting
14. Features
• Document Oriented
– No need for upfront schema definition.
– Schema can be defined per type for
customization of indexing process.
15. Features
• Reliable, Asynchronous Write Behind for
long term persistency.
• (Near) Real Time Search.
• Built on top of lucene
– Each shard is fully functional Lucene index
– All the power of Lucene easily exposed
through simple configuration / plugins.
16. Features
• Per operation consistency
– Singe document level operations are atomic,
consistent, isolated and durable.
• Open Source under the Apache License,
version 2 (“ALv2”)
27. Drupal 8
• Create docker your docker container
• docker run -d -P --name [container name]
[docker image]
• The -d flag keeps the container running in
background after the docker run command
completes
• The -p flag publishes exposed ports from the
container to your localhost; this lets you access
them from your computer
28. Drupal 8
• docker exec -it [container name | container id]
[command]
• After running the command it login you as root
29. Drupal 8
• Start mysql - /etc/init.d/mysql start
• Start apache - /etc/init.d/apache2 start
• Type in on your terminal exit
30. Drupal 8
• Check newly created container
• docker ps -a (This command will list all available
container)
31. Drupal 8
• Accessing your docker web app in your
computer
• Getting your docker default ip run this
command
– docker-machine ip default (This will list your
default ip).
• Example:
– http://192.168.99.100:32773
– 32773 is the docker generated port
37. Configuring Search API
• Add search server
• Fill up the fields set the elasticsearch
server name
• Set the backend type to Elasticsearch
38. Configuring Search API
• Add search index
• Fill up the fields
• Set data source to Content:
– None except those selected
– Bundles: Article
• Server
– Elasticsearch Server
• Goto views tab then index the data
39. Create views search page
• Views module supports elasticsearch
connector module we can build search
page using views and set the views
settings to index elasticsearch
• Create new view
• Name it elasticsearch then save and edit