SlideShare a Scribd company logo
DRUPAL 8 + ELASTICSEARCH +
DOCKER
Roald R. Umandal, Vielsoft Ltd Co.
Drupal Camp Manila 2016
What we need?
• Docker
• Docker ubuntu image
• Docker elasticsearch image
• Apache, MySQL, PHP 5, Drush
• Drupal 8
What is Docker?
Docker
• Docker allows you to package an
application with all of its dependencies into
a standardized unit of software
development
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
Why Docker
• Lightweight
• Portable
• Isolation
• Consistent Environments
What is Elasticsearch?
Elasticsearch
• Elasticsearch is distributed RESTful
search engine built for the cloud.
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.
Elasticsearch
• Elasticsearch is developed in Java and is
released as open source under the terms
of the Apache License
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.
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).
Features
• Various set of APIs
– HTTP RESTful API
– Native Java API
– All APIs perform automatic node operation
rerouting
Features
• Document Oriented
– No need for upfront schema definition.
– Schema can be defined per type for
customization of indexing process.
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.
Features
• Per operation consistency
– Singe document level operations are atomic,
consistent, isolated and durable.
• Open Source under the Apache License,
version 2 (“ALv2”)
Let’s get started
Demo
Setup
 Drupal 8
 docker pull roaldumandal/drupal8
 docker run -d -P --name [container name][docker image]
 docker exec -it [container name | container id] [command]
 Start mysql - /etc/init.d/mysql start
 Start apache - /etc/init.d/apache2 start
 Elasticsearch
 docker pull roaldumandal/elasticsearch
 docker run -d -P --name [container name][docker image]
 docker exec -it [container name | container id] [command]
 Start elasticsearch - /etc/init.d/elasticsearch start
Let’s build first our elasticsearch
server
Elasticsearch
• docker pull roaldumandal/elasticsearch
Elasticsearch
• docker run -d -P elasticsearch
roaldumandal/elasticsearch
Elasticsearch
• Login to docker container
– docker exec -it elasticsearch bash
Elasticsearch
• Start elasticsearch -
/etc/init.d/elasticsearch start
• Type in your terminal exit
Now where ready to setup our Drupal 8 web
server!
Drupal 8
• docker pull roaldumandal/drupal8
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
Drupal 8
• docker exec -it [container name | container id]
[command]
• After running the command it login you as root
Drupal 8
• Start mysql - /etc/init.d/mysql start
• Start apache - /etc/init.d/apache2 start
• Type in on your terminal exit
Drupal 8
• Check newly created container
• docker ps -a (This command will list all available
container)
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
Drupal 8
• Voila! you already have Drupal 8 running
in your local
Configuring Elasticsearch
• Enable elasticsearch connector
Configuring Elasticsearch
• Add cluster name
• Set server URL (Elasticsearch server)
Configuring Elasticsearch
• Creating elasticsearch index
Configuring Elasticsearch
• You should be able to see now your
cluster and index
Configuring Search API
• Add search server
• Fill up the fields set the elasticsearch
server name
• Set the backend type to Elasticsearch
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
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
Create views search page
• Views Elasticsearch page settings
– Format: Unformatted list
– Show: Fields
– Fields:
• Content datasource: Title
• Content datasource: Image
• Content datasource: Body
• Filter criteria:
– Search Fulltext
Elasticsearch Views
Questions?
Thank You
Need more help?
• https://www.docker.com/what-docker
• http://www.lucenetutorial.com/basic-concepts.html
• https://docs.docker.com/engine/reference/commandline/cli/
• https://www.quora.com/What-is-the-difference-between-Docker-and-
Vagrant-When-should-you-use-each-one
• http://stackoverflow.com/questions/16647069/should-i-use-vagrant-
or-docker-for-creating-an-isolated-environment
• https://medium.com/dev-tricks/apache-and-php-on-docker-
44faef716150#.g64yqogkg
• https://docs.docker.com/engine/installation/mac/
• https://www.elastic.co/guide/en/elasticsearch/reference/current/gloss
ary.html
• http://joelabrahamsson.com/elasticsearch-101/
• https://www.quora.com/What-are-the-disadvantages-of-using-
Elasticsearch-as-a-primary-database
Disclaimer
All images used in this presentation are
borrowed from the internet. Therefore, all
rights reserved to the original owner.

More Related Content

PPTX
L3..hypertension
PPT
Drupal and Elasticsearch
PDF
Using VueJS in front of Drupal 8
PPTX
A la recherche d'ElasticSearch
PPTX
ElasticSearch : Architecture et Développement
PDF
Présentation de ElasticSearch / Digital apéro du 12/11/2014
PDF
Real-time search in Drupal. Meet Elasticsearch
PDF
Meetup Drupal Paris : Connexion Drupal et Elasticsearch
L3..hypertension
Drupal and Elasticsearch
Using VueJS in front of Drupal 8
A la recherche d'ElasticSearch
ElasticSearch : Architecture et Développement
Présentation de ElasticSearch / Digital apéro du 12/11/2014
Real-time search in Drupal. Meet Elasticsearch
Meetup Drupal Paris : Connexion Drupal et Elasticsearch

Viewers also liked (20)

KEY
Elasticsearch - Montpellier JUG
PPTX
Tunis big data_meetup__21_nov2015__aymenzaafouri
PDF
Tirer le meilleur de ses données avec ElasticSearch
PDF
Things Made Easy: One Click CMS Integration with Solr & Drupal
ODP
Single Page Applications in Drupal
PDF
Making Sense of Twig
PDF
Drupal 8: Entities
PDF
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
PDF
Drupal 8 templating with twig
PDF
Drupal 8: TWIG Template Engine
PDF
Drupal 8: Theming
KEY
Intro to Apache Solr for Drupal
PPTX
Deck seo campus 2011 utiliser les logs serveurs
PDF
Le PHP chez Deezer
PPTX
AFUP - Mini conférences PHP - Les LOGs
PDF
Cci octobre 2014
KEY
Search in the Biblical Domain - BibleTech: 2011
PDF
Drupal8 + AngularJS
PDF
Plateforme centralisée d’analyse des logs des frontaux http en temps réel dan...
PPTX
Séminaire Log Management
Elasticsearch - Montpellier JUG
Tunis big data_meetup__21_nov2015__aymenzaafouri
Tirer le meilleur de ses données avec ElasticSearch
Things Made Easy: One Click CMS Integration with Solr & Drupal
Single Page Applications in Drupal
Making Sense of Twig
Drupal 8: Entities
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015
Drupal 8 templating with twig
Drupal 8: TWIG Template Engine
Drupal 8: Theming
Intro to Apache Solr for Drupal
Deck seo campus 2011 utiliser les logs serveurs
Le PHP chez Deezer
AFUP - Mini conférences PHP - Les LOGs
Cci octobre 2014
Search in the Biblical Domain - BibleTech: 2011
Drupal8 + AngularJS
Plateforme centralisée d’analyse des logs des frontaux http en temps réel dan...
Séminaire Log Management
Ad

Similar to Drupal 8 + Elasticsearch + Docker (20)

PDF
Super powered Drupal development with docker
PPTX
Perl and Elasticsearch
PPTX
Standardizing Drupal Development Environments using Containers
PDF
ElasticSearch - index server used as a document database
PPTX
Using Docker to boost your development experience with Drupal
ODP
Elasticsearch for beginners
PDF
The elastic stack on docker
ODP
Elastic search
PDF
Introduction to Elasticsearch
PPTX
An Introduction to Elastic Search.
PPTX
Getting started with Laravel & Elasticsearch
PDF
DRUPAL AND ELASTICSEARCH
PPTX
Elastic search
PPTX
Elasticsearch tuning
PPTX
Elasticsearch python
PPTX
Elasticsearch Introduction
PDF
Elasticsearch and Spark
PDF
Explore Elasticsearch and Why It’s Worth Using
PDF
AtlasCamp 2015 Docker continuous integration training
PPTX
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Super powered Drupal development with docker
Perl and Elasticsearch
Standardizing Drupal Development Environments using Containers
ElasticSearch - index server used as a document database
Using Docker to boost your development experience with Drupal
Elasticsearch for beginners
The elastic stack on docker
Elastic search
Introduction to Elasticsearch
An Introduction to Elastic Search.
Getting started with Laravel & Elasticsearch
DRUPAL AND ELASTICSEARCH
Elastic search
Elasticsearch tuning
Elasticsearch python
Elasticsearch Introduction
Elasticsearch and Spark
Explore Elasticsearch and Why It’s Worth Using
AtlasCamp 2015 Docker continuous integration training
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Ad

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
KodekX | Application Modernization Development
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Modernizing your data center with Dell and AMD
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
A Presentation on Artificial Intelligence
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KodekX | Application Modernization Development
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
Modernizing your data center with Dell and AMD
Reach Out and Touch Someone: Haptics and Empathic Computing
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx

Drupal 8 + Elasticsearch + Docker

  • 1. DRUPAL 8 + ELASTICSEARCH + DOCKER Roald R. Umandal, Vielsoft Ltd Co. Drupal Camp Manila 2016
  • 2. What we need? • Docker • Docker ubuntu image • Docker elasticsearch image • Apache, MySQL, PHP 5, Drush • Drupal 8
  • 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
  • 6. Why Docker • Lightweight • Portable • Isolation • Consistent Environments
  • 8. Elasticsearch • Elasticsearch is distributed RESTful search engine built for the cloud.
  • 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.
  • 10. Elasticsearch • Elasticsearch is developed in Java and is released as open source under the terms of the Apache License
  • 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”)
  • 18. Demo
  • 19. Setup  Drupal 8  docker pull roaldumandal/drupal8  docker run -d -P --name [container name][docker image]  docker exec -it [container name | container id] [command]  Start mysql - /etc/init.d/mysql start  Start apache - /etc/init.d/apache2 start  Elasticsearch  docker pull roaldumandal/elasticsearch  docker run -d -P --name [container name][docker image]  docker exec -it [container name | container id] [command]  Start elasticsearch - /etc/init.d/elasticsearch start
  • 20. Let’s build first our elasticsearch server
  • 21. Elasticsearch • docker pull roaldumandal/elasticsearch
  • 22. Elasticsearch • docker run -d -P elasticsearch roaldumandal/elasticsearch
  • 23. Elasticsearch • Login to docker container – docker exec -it elasticsearch bash
  • 24. Elasticsearch • Start elasticsearch - /etc/init.d/elasticsearch start • Type in your terminal exit
  • 25. Now where ready to setup our Drupal 8 web server!
  • 26. Drupal 8 • docker pull roaldumandal/drupal8
  • 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
  • 32. Drupal 8 • Voila! you already have Drupal 8 running in your local
  • 33. Configuring Elasticsearch • Enable elasticsearch connector
  • 34. Configuring Elasticsearch • Add cluster name • Set server URL (Elasticsearch server)
  • 36. Configuring Elasticsearch • You should be able to see now your cluster and index
  • 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
  • 40. Create views search page • Views Elasticsearch page settings – Format: Unformatted list – Show: Fields – Fields: • Content datasource: Title • Content datasource: Image • Content datasource: Body • Filter criteria: – Search Fulltext
  • 44. Need more help? • https://www.docker.com/what-docker • http://www.lucenetutorial.com/basic-concepts.html • https://docs.docker.com/engine/reference/commandline/cli/ • https://www.quora.com/What-is-the-difference-between-Docker-and- Vagrant-When-should-you-use-each-one • http://stackoverflow.com/questions/16647069/should-i-use-vagrant- or-docker-for-creating-an-isolated-environment • https://medium.com/dev-tricks/apache-and-php-on-docker- 44faef716150#.g64yqogkg • https://docs.docker.com/engine/installation/mac/ • https://www.elastic.co/guide/en/elasticsearch/reference/current/gloss ary.html • http://joelabrahamsson.com/elasticsearch-101/ • https://www.quora.com/What-are-the-disadvantages-of-using- Elasticsearch-as-a-primary-database
  • 45. Disclaimer All images used in this presentation are borrowed from the internet. Therefore, all rights reserved to the original owner.