SlideShare a Scribd company logo
Migration from Drupal 7 to Drupal 8
Chris Ozog
...how Docker can save our lives!
Hello!
I am Chris Ozog
I am here because some people think that I love PHP and Drupal?!
You can find me at /krzysztofozog
Few words about me...
A Philosopher and A Developer… the worst thing is that I
have two master degree diplomas
More the developer than the philosopher:
❖ For more than decade I’m building Web Applications
❖ In 2004 I built my first App in PHP
❖ I’m addicted to clean code
❖ I’m Chief Technology Officer at Codesushi
❖ I love code review...
Agenda
❖ Short intro to docker and docker-compose
❖ Our migration process in general
❖ What we used docker for
❖ Our setup in details
❖ Summary
about:docker
❖ Container management software
❖ Container “is a lightweight, stand-alone, executable
package of a piece of software that includes everything
needed to run it”
❖ Benefits of Docker
➢ Easy to use
➢ Quite easy to learn * (if you get the concept, it’s not a VM)
➢ Prebuilt containers with services like MySQL, PHP, Apache etc.
about:docker-compose
❖ Started as Fig, then development had been taken over by
docker team
❖ Tool that helps with orchestrating multi-container
environments
❖ Makes using docker super easy
❖ Makes a great tool for sharing development environment
❖ It uses YAML file as configuration
Our migration process
We needed to migrate content from D7 to D8, we tried different
migration processes and end up with need of writing one.
❖ Need of having D7 and D8 instances side by side
❖ D8 instance needed to have file access to files directory of D7
❖ D8 also needed to crawl D7 instance - so it needed to be alive
❖ We also needed to run it couple times daily, because of
development process
What we used docker for
❖ Development and testing environment - that resembles
actual setup
❖ 2 separate Drupal PHP (with apache, php, composer and
drush) containers for PHP 5.6 and PHP 7
❖ 2 separate MySQL containers
❖ Volumes configured so D8 can access D7 file uploads
Docker setup in detail
❖ Dockerfile for D8
❖ Dockerfile for D7
❖ Docker-compose.yml
❖ Directory layout
❖ https://github.com/codesushi/kiev-drupal-docker
Drupal 7 Dockerfile
FROM php:5.6-apache
RUN a2enmod rewrite
# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev 
&& rm -rf /var/lib/apt/lists/* 
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr 
&& docker-php-ext-install gd mbstring pdo pdo_mysql zip opcache
WORKDIR /var/www/
RUN php -r "readfile('http://files.drush.org/drush.phar');" > drush
RUN chmod +x drush
RUN mv drush /usr/local/bin
Drupal 8 Dockerfile
FROM php:7-apache
RUN a2enmod rewrite
# install the PHP extensions we need
RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev 
&& rm -rf /var/lib/apt/lists/* 
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr 
&& docker-php-ext-install gd mbstring pdo pdo_mysql zip opcache
WORKDIR /var/www/
#Install drush and composer
RUN php -r "readfile('http://files.drush.org/drush.phar');" > drush
RUN chmod +x drush
RUN mv drush /usr/local/bin
COPY composer-install.sh /usr/local/bin
RUN chmod +x /usr/local/bin/composer-install.sh
RUN composer-install.sh
RUN apt-get update -y && apt-get install -y mysql-client
docker-compose.yml
version: '2'
services:
db8:
image: mysql
environment:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal8
MYSQL_ROOT_PASSWORD: drupal
volumes:
- ./data8:/var/lib/mysql
db7:
image: mysql
environment:
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_DATABASE: drupal7
MYSQL_ROOT_PASSWORD: drupal
volumes:
- ./data7:/var/lib/mysql
docker-compose.yml
drupal8:
build:
dockerfile: Dockerfile-d8
context: .
volumes:
- ./d7:/var/www/d7
- ./d8:/var/www/d8
- ./apache-conf/d8.conf:/etc/apache2/sites-enabled/000-default.conf
- ./docker/php7/local.ini:/usr/local/etc/php/conf.d/local.ini
ports:
- 8250:80
links:
- db8
docker-compose.yml
drupal7:
build:
dockerfile: Dockerfile-d7
context: .
volumes:
- ./d7:/var/www/d7
- ./apache-conf/d7.conf:/etc/apache2/sites-enabled/000-default.conf
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
ports:
- 8251:80
links:
- db7
Couple of screens: D8 install
Couple of screens: D7 install
Couple of screens: D8 Calls D7
Summary
❖ Docker is fun - especially with docker-compose
❖ Two php versions is no problem
❖ Create complex setup with docker-compose with
ease
❖ Testing load balancer approach
❖ Drupal and docker get along well
Thanks!
Any questions?
Find me at /krzysztofozog &
chris@codesushi.co

More Related Content

PDF
Headless approach and Acquia - Case study - Chris Ozog
PDF
Managing development environments with Docksal
PDF
Super powered Drupal development with docker
ODP
Dockerfiles & Best Practices
PDF
From Docker Run To Docker Compose
PDF
Docker as development environment
PDF
Docker in everyday development
PDF
Docker intro
Headless approach and Acquia - Case study - Chris Ozog
Managing development environments with Docksal
Super powered Drupal development with docker
Dockerfiles & Best Practices
From Docker Run To Docker Compose
Docker as development environment
Docker in everyday development
Docker intro

What's hot (20)

PDF
PHP QA Tools
PDF
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
PDF
Introducing docker
PDF
Introduction to docker
PPTX
Docker session I: Continuous integration, delivery and deployment
PDF
Statyczna analiza kodu PHP
PPTX
Docker workshop DevOpsDays Amsterdam 2014
PDF
Docker at Flux7
PPTX
CI-CD WITH GITLAB WORKFLOW
PPTX
Introduction to Docker Compose
PPTX
Docker session III: Dockerfile
PDF
Composer Tools & Frameworks for Drupal
PPTX
Grunt to automate JS build
PPTX
It works on my computer
PDF
Virtual Machines and Docker
PDF
How to easy deploy app into any cloud
PDF
BillRun Docker Introduction
PDF
Ruby microservices with Docker - Sergii Koba
PDF
Docker / Ansible
PHP QA Tools
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
Introducing docker
Introduction to docker
Docker session I: Continuous integration, delivery and deployment
Statyczna analiza kodu PHP
Docker workshop DevOpsDays Amsterdam 2014
Docker at Flux7
CI-CD WITH GITLAB WORKFLOW
Introduction to Docker Compose
Docker session III: Dockerfile
Composer Tools & Frameworks for Drupal
Grunt to automate JS build
It works on my computer
Virtual Machines and Docker
How to easy deploy app into any cloud
BillRun Docker Introduction
Ruby microservices with Docker - Sergii Koba
Docker / Ansible
Ad

Similar to Migration from drupal 7 to drupal 8 (20)

PPTX
Using Docker to boost your development experience with Drupal
PDF
Docker4Drupal 2.1 for Development
PPTX
Тарас Кирилюк — Docker basics. How-to for Drupal developers
PDF
Welcome aboard the team
PDF
Docker for Drupal development
PDF
Docker for developers
PDF
Docker for developers
PDF
Improving your Drupal 8 development workflow DrupalCampLA
PDF
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
PPTX
Docker for Developers - Sunshine PHP
PDF
Learning Docker with Thomas
PPTX
Thinking outside the container
PDF
Meetup - retour sur la DrupalCon Dublin 2016
PPTX
Docker and stuff
PDF
Drupal Development with Docker
PPTX
From Docker to Production - SunshinePHP 2017
PDF
Scale Big With Docker — Moboom 2014
PPTX
From Docker to Production - ZendCon 2016
PDF
Docker for developers
PDF
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...
Using Docker to boost your development experience with Drupal
Docker4Drupal 2.1 for Development
Тарас Кирилюк — Docker basics. How-to for Drupal developers
Welcome aboard the team
Docker for Drupal development
Docker for developers
Docker for developers
Improving your Drupal 8 development workflow DrupalCampLA
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
Docker for Developers - Sunshine PHP
Learning Docker with Thomas
Thinking outside the container
Meetup - retour sur la DrupalCon Dublin 2016
Docker and stuff
Drupal Development with Docker
From Docker to Production - SunshinePHP 2017
Scale Big With Docker — Moboom 2014
From Docker to Production - ZendCon 2016
Docker for developers
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...
Ad

Recently uploaded (20)

PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Modernising the Digital Integration Hub
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Hybrid model detection and classification of lung cancer
PPTX
The various Industrial Revolutions .pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPT
Geologic Time for studying geology for geologist
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
CloudStack 4.21: First Look Webinar slides
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Enhancing emotion recognition model for a student engagement use case through...
Modernising the Digital Integration Hub
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
DP Operators-handbook-extract for the Mautical Institute
O2C Customer Invoices to Receipt V15A.pptx
observCloud-Native Containerability and monitoring.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Web Crawler for Trend Tracking Gen Z Insights.pptx
Assigned Numbers - 2025 - Bluetooth® Document
Hybrid model detection and classification of lung cancer
The various Industrial Revolutions .pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Developing a website for English-speaking practice to English as a foreign la...
Geologic Time for studying geology for geologist
Zenith AI: Advanced Artificial Intelligence
CloudStack 4.21: First Look Webinar slides
Module 1.ppt Iot fundamentals and Architecture
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf

Migration from drupal 7 to drupal 8

  • 1. Migration from Drupal 7 to Drupal 8 Chris Ozog ...how Docker can save our lives!
  • 2. Hello! I am Chris Ozog I am here because some people think that I love PHP and Drupal?! You can find me at /krzysztofozog
  • 3. Few words about me... A Philosopher and A Developer… the worst thing is that I have two master degree diplomas More the developer than the philosopher: ❖ For more than decade I’m building Web Applications ❖ In 2004 I built my first App in PHP ❖ I’m addicted to clean code ❖ I’m Chief Technology Officer at Codesushi ❖ I love code review...
  • 4. Agenda ❖ Short intro to docker and docker-compose ❖ Our migration process in general ❖ What we used docker for ❖ Our setup in details ❖ Summary
  • 5. about:docker ❖ Container management software ❖ Container “is a lightweight, stand-alone, executable package of a piece of software that includes everything needed to run it” ❖ Benefits of Docker ➢ Easy to use ➢ Quite easy to learn * (if you get the concept, it’s not a VM) ➢ Prebuilt containers with services like MySQL, PHP, Apache etc.
  • 6. about:docker-compose ❖ Started as Fig, then development had been taken over by docker team ❖ Tool that helps with orchestrating multi-container environments ❖ Makes using docker super easy ❖ Makes a great tool for sharing development environment ❖ It uses YAML file as configuration
  • 7. Our migration process We needed to migrate content from D7 to D8, we tried different migration processes and end up with need of writing one. ❖ Need of having D7 and D8 instances side by side ❖ D8 instance needed to have file access to files directory of D7 ❖ D8 also needed to crawl D7 instance - so it needed to be alive ❖ We also needed to run it couple times daily, because of development process
  • 8. What we used docker for ❖ Development and testing environment - that resembles actual setup ❖ 2 separate Drupal PHP (with apache, php, composer and drush) containers for PHP 5.6 and PHP 7 ❖ 2 separate MySQL containers ❖ Volumes configured so D8 can access D7 file uploads
  • 9. Docker setup in detail ❖ Dockerfile for D8 ❖ Dockerfile for D7 ❖ Docker-compose.yml ❖ Directory layout ❖ https://github.com/codesushi/kiev-drupal-docker
  • 10. Drupal 7 Dockerfile FROM php:5.6-apache RUN a2enmod rewrite # install the PHP extensions we need RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev && rm -rf /var/lib/apt/lists/* && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && docker-php-ext-install gd mbstring pdo pdo_mysql zip opcache WORKDIR /var/www/ RUN php -r "readfile('http://files.drush.org/drush.phar');" > drush RUN chmod +x drush RUN mv drush /usr/local/bin
  • 11. Drupal 8 Dockerfile FROM php:7-apache RUN a2enmod rewrite # install the PHP extensions we need RUN apt-get update && apt-get install -y libpng12-dev libjpeg-dev libpq-dev && rm -rf /var/lib/apt/lists/* && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr && docker-php-ext-install gd mbstring pdo pdo_mysql zip opcache WORKDIR /var/www/ #Install drush and composer RUN php -r "readfile('http://files.drush.org/drush.phar');" > drush RUN chmod +x drush RUN mv drush /usr/local/bin COPY composer-install.sh /usr/local/bin RUN chmod +x /usr/local/bin/composer-install.sh RUN composer-install.sh RUN apt-get update -y && apt-get install -y mysql-client
  • 12. docker-compose.yml version: '2' services: db8: image: mysql environment: MYSQL_USER: drupal MYSQL_PASSWORD: drupal MYSQL_DATABASE: drupal8 MYSQL_ROOT_PASSWORD: drupal volumes: - ./data8:/var/lib/mysql db7: image: mysql environment: MYSQL_USER: drupal MYSQL_PASSWORD: drupal MYSQL_DATABASE: drupal7 MYSQL_ROOT_PASSWORD: drupal volumes: - ./data7:/var/lib/mysql
  • 13. docker-compose.yml drupal8: build: dockerfile: Dockerfile-d8 context: . volumes: - ./d7:/var/www/d7 - ./d8:/var/www/d8 - ./apache-conf/d8.conf:/etc/apache2/sites-enabled/000-default.conf - ./docker/php7/local.ini:/usr/local/etc/php/conf.d/local.ini ports: - 8250:80 links: - db8
  • 14. docker-compose.yml drupal7: build: dockerfile: Dockerfile-d7 context: . volumes: - ./d7:/var/www/d7 - ./apache-conf/d7.conf:/etc/apache2/sites-enabled/000-default.conf - ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini ports: - 8251:80 links: - db7
  • 15. Couple of screens: D8 install
  • 16. Couple of screens: D7 install
  • 17. Couple of screens: D8 Calls D7
  • 18. Summary ❖ Docker is fun - especially with docker-compose ❖ Two php versions is no problem ❖ Create complex setup with docker-compose with ease ❖ Testing load balancer approach ❖ Drupal and docker get along well
  • 19. Thanks! Any questions? Find me at /krzysztofozog & chris@codesushi.co