SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
Degendra Sivakoti
 

Was ist angesagt? (20)

PHP QA Tools
PHP QA ToolsPHP QA Tools
PHP QA Tools
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
Introducing docker
Introducing dockerIntroducing docker
Introducing docker
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deploymentDocker session I: Continuous integration, delivery and deployment
Docker session I: Continuous integration, delivery and deployment
 
Statyczna analiza kodu PHP
Statyczna analiza kodu PHPStatyczna analiza kodu PHP
Statyczna analiza kodu PHP
 
Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014Docker workshop DevOpsDays Amsterdam 2014
Docker workshop DevOpsDays Amsterdam 2014
 
Docker at Flux7
Docker at Flux7Docker at Flux7
Docker at Flux7
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
Docker session III: Dockerfile
Docker session III: DockerfileDocker session III: Dockerfile
Docker session III: Dockerfile
 
Composer Tools & Frameworks for Drupal
Composer Tools & Frameworks for DrupalComposer Tools & Frameworks for Drupal
Composer Tools & Frameworks for Drupal
 
Grunt to automate JS build
Grunt to automate JS buildGrunt to automate JS build
Grunt to automate JS build
 
Drupal
DrupalDrupal
Drupal
 
It works on my computer
It works on my computerIt works on my computer
It works on my computer
 
Virtual Machines and Docker
Virtual Machines and DockerVirtual Machines and Docker
Virtual Machines and Docker
 
How to easy deploy app into any cloud
How to easy deploy app into any cloudHow to easy deploy app into any cloud
How to easy deploy app into any cloud
 
BillRun Docker Introduction
BillRun Docker IntroductionBillRun Docker Introduction
BillRun Docker Introduction
 
Ruby microservices with Docker - Sergii Koba
Ruby microservices with Docker -  Sergii KobaRuby microservices with Docker -  Sergii Koba
Ruby microservices with Docker - Sergii Koba
 
Docker / Ansible
Docker / AnsibleDocker / Ansible
Docker / Ansible
 

Ähnlich wie Migration from drupal 7 to drupal 8

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Hiroki Endo
 

Ähnlich wie Migration from drupal 7 to drupal 8 (20)

DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
 
Using deploy in drupal 8
Using deploy in drupal 8Using deploy in drupal 8
Using deploy in drupal 8
 
Getting started with docker (2017)
Getting started with docker (2017)Getting started with docker (2017)
Getting started with docker (2017)
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
Docker+java
Docker+javaDocker+java
Docker+java
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker for developers
Docker for developersDocker for developers
Docker for developers
 
Docker @ FOSS4G 2016, Bonn
Docker @ FOSS4G 2016, BonnDocker @ FOSS4G 2016, Bonn
Docker @ FOSS4G 2016, Bonn
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Killer Docker Workflows for Development
Killer Docker Workflows for DevelopmentKiller Docker Workflows for Development
Killer Docker Workflows for Development
 
Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)Environment isolation with Docker (Alex Medvedev, Alpari)
Environment isolation with Docker (Alex Medvedev, Alpari)
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWS
 
Learned lessons in a real world project
Learned lessons in a real world projectLearned lessons in a real world project
Learned lessons in a real world project
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.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