scalable magento development with docker

103

Upload: duongdat

Post on 31-Dec-2016

227 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Scalable Magento Development with Docker
Page 2: Scalable Magento Development with Docker

Scalable Magento Development with Containers

Presenter
Presentation Notes
Hi, my name is Torsten Bresser Today I will show you how we scaled our Magento development process with containers, Docker containers in this particular case. Before we start with the actual talk, just a few words about me and my company.
Page 3: Scalable Magento Development with Docker

About meAndreas Koch

• Software developer at arvato SCM• Located in Germany• Passionate about

– Deployment automation– Scalable software and processes– PHP, C# and Go

andreaskoch

andykdocs.de

Presenter
Presentation Notes
As you probably can see, this guy here on the slide isn’t me. It is my colleague Andreas Koch. Andy was supposed to talk to you here today, but unfortunately he got sick and is now in a hospital in Germany (send greetings). So I jumped in on very short notice. I am a software architect from Germany. I work for more than 10 years on international e-commerce sites at arvato. Since 4 years we work with Magento (before C#), and I lead our German Magento developer teams. Similar interests as Andy, but no Go programmer
Page 4: Scalable Magento Development with Docker

arvato – Bertelsmann

Presenter
Presentation Notes
arvato SCM – Supply Chain Management Part of arvato, a Bertelsmann subsidiary, Europe‘s biggest media company Bertelsmann not well known in the US → Penguin Random House arvato is a big company → put key figures together
Page 5: Scalable Magento Development with Docker

arvato SCM Solutions

Shop Development

Digital Imaging

Customer Service

Global Online Marketing

E-Commerce Consulting

Warehousing & Distribution

Transport Management

Financial Services

Business Intelligence

Returns Management

Omnichannel Value added services

Service portfolio Reference customers

Presenter
Presentation Notes
Offers world-wide, full-service e-commerce solutions Various industry segments like Consumer products like fashion Hightech & entertainment Healthcare Telecommunications etc. Various frontend technologies like Microsoft .NET Demandware Native iOS and Android app development Magento → Presentation topic: Simplifying development + hosting of Magento shops with containers
Page 6: Scalable Magento Development with Docker

Development,Hosting &Operations

of Magento Shops

Presenter
Presentation Notes
What is needed to develop, host and operate Magento shops?
Page 7: Scalable Magento Development with Docker

Hosting Magento is simple. Right?

Presenter
Presentation Notes
It is easy, right? Just A web-server like Apache or Nginx PHP MySQL ... and of course a developer
Page 8: Scalable Magento Development with Docker

Hosting Magento is simple. Right? Nope!

Presenter
Presentation Notes
Not that simple unfortunately If goal is to find bugs in dev instead of production → same setup on all environments Additional components: Redis ElasticSearch RabbitMQ etc. + whole team of developers
Page 9: Scalable Magento Development with Docker

Challenge #1: Knowledge Transfer«I dunno how to configure Nginx. Andy always does that. But he is currently on vacation in Vegas.» Knowledge Monopolies

Presenter
Presentation Notes
First challenge: Knowledge transfer and monopolies Mention „personal experiences“ Explain situation: The only developer with special know-how is never available One knows Nginx, otherone MySQL Building up and maintaining knowledge requires effort Setup maybe not well documented or automated But at least developers manage the situation somehow
Page 10: Scalable Magento Development with Docker

Challenge #2: Parallelization«Don’t touch the integration environment the next days – we are going to test feature xyz!» Parallelization

Presenter
Presentation Notes
Second challenge: Parallelization of development and QA streams Explain situation: QA wants to test features and bugfixes Multiple dev streams vs. one integration environment → Downtimes during deployments → Interferences between features → Bottleneck situation → automation needed
Page 11: Scalable Magento Development with Docker

Challenge #3: Operations«How could that have ever worked on the integration environment?!» Operations

Presenter
Presentation Notes
Challenge number 3: Operations Deploying complex infrastructure isn‘t easy Deploy all software components to multiple production servers Same versions across environments ... maybe even highly available Next slide: Patching
Page 12: Scalable Magento Development with Docker

Challenge #3: OperationsKeeping environments in sync is hard.

Presenter
Presentation Notes
... and then there are also patches: Every now and then updates of all development Integration environments and servers production → you know from experience → takes a lot of time + error prone process
Page 13: Scalable Magento Development with Docker

Challenge #4: Scaling«Just a little something for the current sprint, Andy: We need a new integration and production for the new project. asap!» Scaling

Presenter
Presentation Notes
Last challenge: Scaling Usually a good think, but If no automation, then operating more environments → more manual effort = potential errors Fortunately Docker can help
Page 14: Scalable Magento Development with Docker

Introduction to DockerContainer virtualization made easy

Page 15: Scalable Magento Development with Docker

What is Docker?Docker automates the deployment of applications inside containers

• Based on Linux technologies like– LXC– cgroups– aufs

• Avoids the overhead of classical virtual machines– Small and portable containers– Ideal for application packaging

Presenter
Presentation Notes
Lightweight virtualization technology for Linux Allows you to package your application components into small Isolated containers – can be linked together + managed portable IS vs. USE Since June 2014
Page 16: Scalable Magento Development with Docker

Solving the Challenges1. Knowledge Monopolies2. Parallelization3. Operations4. Scaling

Presenter
Presentation Notes
How can Docker help? First: Knowledge Transfer
Page 17: Scalable Magento Development with Docker

Solving Knowledge MonopoliesDocker allows you to

• split your infrastructure components into immutable units of execution by using standard Docker images such as Nginx, PHP and MySQL

• make your software configuration transparent and traceable with Dockerfiles

• combine all your software dependencies into a single docker-compose.yml file

Presenter
Presentation Notes
Docker → each infrastructure component turned into immutable unit of execution Easily connectable Standard images available Docker Composer
Page 18: Scalable Magento Development with Docker

Leveraging Docker Standard Images

Docker provides a long list of standard images that are maintained byDocker or the software authors

Operating System Images• Alpine• Ubuntu• Debian• CentOS• …

Software components• PHP• MySQL• Nginx• Redis• …

Presenter
Presentation Notes
Rely on experts for software required for hosting Your developers → focus on shop development Standard images for all components needed for Magento 1 or 2 Available on website „Docker Hub“
Page 19: Scalable Magento Development with Docker

Docker Standard Images: PHP

Software components• PHP• MySQL• Nginx• Redis• …

Presenter
Presentation Notes
PHP
Page 20: Scalable Magento Development with Docker

Docker Standard Images: MySQL

Software components• PHP• MySQL• Nginx• Redis• …

Presenter
Presentation Notes
MySQL
Page 21: Scalable Magento Development with Docker

Docker Standard Images: Nginx

Software components• PHP• MySQL• Nginx• Redis• …

Presenter
Presentation Notes
Nginx
Page 22: Scalable Magento Development with Docker

Docker Standard Images: Redis

Software components• PHP• MySQL• Nginx• Redis• …

Presenter
Presentation Notes
Redis ... and many, many more Otherwise Rely on community or Build your own
Page 23: Scalable Magento Development with Docker

Infrastructure Definition with Dockerfiles

FROM ubuntu:latest

RUN apt-get update && apt-get install nginx

EXPOSE 80 443

CMD ["nginx", "-g", "daemon off;"]

1. Base image

2. Setup commands

3. Expose ports

4. Entry point

Presenter
Presentation Notes
Sounds complicated, but is very easy Dockerfiles Simple text files Define Base Image Installation commands Ports Command for start It‘s as easy as that, even for „official“ images
Page 24: Scalable Magento Development with Docker

Infrastructure Definition with Dockerfiles

Presenter
Presentation Notes
Actual content not really interesting Only one page Tracked in Git Exactly the same for each Linux host Portable Immutable
Page 25: Scalable Magento Development with Docker

Running a Default Nginx Container

$ docker run –p 8080:80 nginx:1.9

Presenter
Presentation Notes
Example shown. Command will: Bind port 80 of container to port 8080 of host Download Nginx Docker image Start container → always same result → customize content
Page 26: Scalable Magento Development with Docker

Customization via Docker VolumesCustomizing dockers container with volumes:

$ docker run -p 8080:80 -v `pwd`/custom-content:/usr/share/nginx/htmlnginx:1.9

Presenter
Presentation Notes
Use volumes to map files into containers „custom-content“ is mapped into container path „/usr/share/nginx/html“ Let‘s run the command...
Page 27: Scalable Magento Development with Docker

Customization via Docker Volumes

Presenter
Presentation Notes
Right-hand side on top of the screen: empty custom-content folder Error message, because of empty folder
Page 28: Scalable Magento Development with Docker

Customization via Docker Volumes

Presenter
Presentation Notes
Create index.html File is directly linked into container → Example works Just Nginx is not enough → More software components for Magento needed → Docker Compose
Page 29: Scalable Magento Development with Docker

Orchestration with Docker Compose

• Multi-container orchestration• Define infrastructure setups• YAML-based config format• Define

– Images– Ports– Volumes

version: '2'

services:web:

image: nginx:stable-alpineports:

- 8080:80volumes_from:- php:ro

php:image: php:7.0-fpmvolumes:

- ./web:/var/www/html

docker-compose.yml

Presenter
Presentation Notes
Docker Compose Orchestration utility for Docker Build and run multi-container applications docker-compose.yml Define parameters and relationships between software
Page 30: Scalable Magento Development with Docker

Orchestration with Docker Compose

• Multi-container orchestration• Define infrastructure setups• YAML-based config format• Define

– Images– Ports– Volumes

version: '2'

services:web:

image: nginx:stable-alpineports:

- 8080:80volumes_from:- php:ro

php:image: php:7.0-fpmvolumes:

- ./web:/var/www/html

docker-compose.yml

Presenter
Presentation Notes
An Nginx container called “web”…
Page 31: Scalable Magento Development with Docker

Orchestration with Docker Compose

• Multi-container orchestration• Define infrastructure setups• YAML-based config format• Define

– Images– Ports– Volumes

version: '2'

services:web:

image: nginx:stable-alpineports:

- 8080:80volumes_from:- php:ro

php:image: php:7.0-fpmvolumes:

- ./web:/var/www/html

docker-compose.yml

Presenter
Presentation Notes
… listening on port 8080 of the host...
Page 32: Scalable Magento Development with Docker

Orchestration with Docker Compose

• Multi-container orchestration• Define infrastructure setups• YAML-based config format• Define

– Images– Ports– Volumes

version: '2'

services:web:

image: nginx:stable-alpineports:

- 8080:80volumes_from:- php:ro

php:image: php:7.0-fpmvolumes:

- ./web:/var/www/html

docker-compose.yml

Presenter
Presentation Notes
… sharing files/a volume with a PHP-FPM container → Demo
Page 33: Scalable Magento Development with Docker

Orchestration with Docker Compose

Presenter
Presentation Notes
Docker Compose reads the YAML file and starts all containers → Nginx connected to PHP-FPM both running in different containers
Page 34: Scalable Magento Development with Docker

Solving Knowledge Monopolies

Automate the environment setup with Docker Compose

Presenter
Presentation Notes
Docker Compose Replace all manual environment setup steps By a simple config file
Page 35: Scalable Magento Development with Docker

Solving Knowledge Monopolies

Automate the environment setup with Docker Compose

docker-compose.yml

docker-compose.yml

Presenter
Presentation Notes
All that is left to do for the developers: Copy project with the docker-compose.yml And run it
Page 36: Scalable Magento Development with Docker

Solving the Challenges1. Knowledge Monopolies ✓2. Parallelization3. Operations4. Scaling

Presenter
Presentation Notes
We have our first dockerized PHP server → Knowledge transfer problem solved Implicit knowledge → infrastructure code Next challenge: Parallelization
Page 37: Scalable Magento Development with Docker

Enable ParallelizationCombination of tools and processes:

• Docker Compose• Git Combine infrastructure and software• Composer

• git-flow Branch on feature level

• Cloud hosting Create feature instances for testing on-the-fly

Develop and test features in parallel

Presenter
Presentation Notes
Magento 2 setup more complicated, but same approach What do we have to do? Combine infrastructure setup + software Use feature branches Use clouds (either private or public ones) → Develop and test in parallel
Page 38: Scalable Magento Development with Docker

Enable ParallelizationGet rid of bottlenecks

Presenter
Presentation Notes
So instead of testing all changes on a single environment...
Page 39: Scalable Magento Development with Docker

Enable ParallelizationGet rid of bottlenecks … by creating feature instances

Presenter
Presentation Notes
... Create temporary cloud instances After testing is finished → Ready for deployment on the actual integration environment
Page 40: Scalable Magento Development with Docker

Enable ParallelizationCreate feature-instance with the arvato CloudAPI on-the-fly:

Presenter
Presentation Notes
CloudAPI Internal tool Creation of cloud instances Performs additional steps, like copying databases + media folders After development → create a new feature instances After testing → merge into develop branch Open Source?
Page 41: Scalable Magento Development with Docker

Solving the Challenges1. Knowledge Monopolies ✓2. Parallelization ✓3. Operations4. Scaling

Presenter
Presentation Notes
Integration environment no longer a bottleneck → Parallelization solved Next: Simplifying operations with Docker
Page 42: Scalable Magento Development with Docker

Ease OperationsDocker and Docker Compose will reduce operation efforts:

• Better quality. All environments look the same

Presenter
Presentation Notes
With a dockerized infrastructure Less bugs because environments look similar Bugs can be found earlier in development process
Page 43: Scalable Magento Development with Docker

Ease OperationsDocker and Docker Compose will reduce operation efforts:

• Better quality. All environments look the same

• Easier patching. Download the latest Docker images and restart

Presenter
Presentation Notes
Patching also easier Attack surface of host OS reduced, because only Docker Easy updates of Docker images Delete container Download new image Restart container
Page 44: Scalable Magento Development with Docker

Ease OperationsDocker and Docker Compose will reduce operation efforts:

• Better quality. All environments look the same

• Easier patching. Download the latest Docker images and restart

• Easier handling. All projects can be controlled by the same commands

Presenter
Presentation Notes
Easier handling Same project structure (even if different components) Same commands for each project
Page 45: Scalable Magento Development with Docker

Ease OperationsDocker and Docker Compose will reduce operation efforts:

• Better quality. All environments look the same

• Easier patching. Download the latest Docker images and restart

• Easier handling. All projects can be controlled by the same commands

• Easier handover. Between development and operations team(s)

Presenter
Presentation Notes
Easier handover Software and infrastructure “documented” in code No other deployment documents needed in our departments anymore
Page 46: Scalable Magento Development with Docker

Ease Operations: Deployment & Patching1. Copy the new project version to production2. Pull the latest Docker images3. Run the new project version

docker-compose.yml

docker-compose.yml

Presenter
Presentation Notes
Since infrastructure + code combined in single project → Deployments + patches easier as well Steps for a deployment/patching: Copy new project version to production Pull latest Docker images Run with Docker Compose
Page 47: Scalable Magento Development with Docker

Solving the Challenges1. Knowledge Monopolies ✓2. Parallelization ✓3. Operations ✓4. Scaling

Presenter
Presentation Notes
Next: Last challenge Scaling
Page 48: Scalable Magento Development with Docker

ScalingScaling can mean different things:

• More Load

• More Features

• More Businesses

Presenter
Presentation Notes
Reasons for scaling More load Adding more features Winning new businesses
Page 49: Scalable Magento Development with Docker

ScalingWhat can you do to scale?

• Add more developers and testers to your team

• Optimize the infrastructure and code

• Add more RAM, CPU and storage to your existing servers

• Add new servers to your production environment

Presenter
Presentation Notes
What can you do to scale? Add more developers + testers → increased throughput Optimize existing infrastructure and code to be more efficient Add capacity to production (vertically or horizontally) to handle more load BUT...
Page 50: Scalable Magento Development with Docker

Complexity with Automation

Presenter
Presentation Notes
... this will always increase the complexity Fortunately, only linearly if automation is used OTHERWISE...
Page 51: Scalable Magento Development with Docker

Complexity without Automation

Presenter
Presentation Notes
... exponentially Why? More developers + testers → More environments, more deployments More servers → More patching More computational power → ensure software USES the resources New businesses → More environments Admit: Not 100% accurate from a scientific point of view (but looks good)
Page 52: Scalable Magento Development with Docker

Scaling with Docker

– More Load: Scale horizontally or vertically

– More Features: We can now parallelize our development

– More Businesses: Copy an existing project and customize it

Still not easy. But easier than without it!

Presenter
Presentation Notes
… and with Docker? Scaling get easier More load → add container (on existing machines, or new ones, e. g. in the cloud) More features → parallelize New businesses → use as templates Still not easy, but easier than without automation Docker not only solution → Just our way, but automation needed
Page 53: Scalable Magento Development with Docker

Solving the Challenges1. Knowledge Monopolies ✓2. Parallelization ✓3. Operations ✓4. Scaling ✓

Presenter
Presentation Notes
Docker can help to solve typical challenges in Development Hosting Operations by automating infrastructure setups
Page 54: Scalable Magento Development with Docker

CombiningInfrastructure & Code

Project structure of a dockerized Magento shop

Presenter
Presentation Notes
Let‘s have a look at how that works with Magento 2
Page 55: Scalable Magento Development with Docker

Combining Code + Infrastructure

− app− bin− vendor− pub− composer.json− index.php

− config− mysql− nginx− php

− docker-compose.yml

Code

Infrastructure

Presenter
Presentation Notes
Quite simple structure Magento project (in red) docker-compose.yml (blue) Configs (blue) Start containers from there with Docker Compose That‘s it Next: Different environments
Page 56: Scalable Magento Development with Docker

Handling different environments− app− …− config

− mysql− nginx− php-dev− php-prod

− docker-compose.yml− docker-compose.prod.yml

Configs for other environmentsshould also be tracked in thesame project, e.g.

• The production config of yourPHP container should not contain Xdebug

• Usage of a central MySQL cluster on production

Presenter
Presentation Notes
Usually differences between environments Xdebug MySQL cluster Developer Mode → Environment specific docker-compose.ymls
Page 57: Scalable Magento Development with Docker

Handling different environments− app− …− config

− mysql− nginx− php-dev− php-prod

− docker-compose.yml− docker-compose.prod.yml

Using a different Docker Composefile:

> docker-compose -f docker-compose.prod.yml up -d

Presenter
Presentation Notes
-f parameter We use 3 docker-compose.ymls Development Testing Without Xdebug No Developer Mode Production Central MySQL cluster + Redis server etc.
Page 58: Scalable Magento Development with Docker

Development EnvironmentUsing Docker on Linux, OS X and Windows

Presenter
Presentation Notes
More into practice now! What do you need to use Docker on your local machine?
Page 59: Scalable Magento Development with Docker

Development Environment

The dockerized development process works on Linux, OS X & Windows. All you need is:

– Docker Machine (only for Mac and Windows)– Docker & Docker Compose– Git + PHP + Composer

+ An editor or IDE of your choice

Presenter
Presentation Notes
You can use Linux Windows Mac OS X on your host (we will use Mac OS X in the following examples) Install Docker Docker Compose Docker Machine (for Mac OS X and Windows) Git PHP + Composer (for installing + debugging Magento)
Page 60: Scalable Magento Development with Docker

LinuxInstall Docker:

> curl -fsSL https://get.docker.com/ | sh

and Docker Compose:

> curl -L https://github.com/docker/compose/releases/download/1.7.0-rc1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

Presenter
Presentation Notes
Simple on Linux Install Docker Docker Compose
Page 61: Scalable Magento Development with Docker

Linux

Presenter
Presentation Notes
Our setup: Ubuntu VMs with PHPStorm Open project folder like normal in editor of choice Start containers with Docker Compose
Page 62: Scalable Magento Development with Docker

Path in container/var/www/html

Local path~/magento2

Presenter
Presentation Notes
Path mapping is different for debugging → Explain: Code not executed locally Different paths on host and in container ~/magento2 → /var/www/html
Page 63: Scalable Magento Development with Docker

Docker for Windows and MacInstall the Docker Toolbox to use Docker on Mac or Windows

Presenter
Presentation Notes
Time check → Go to slide 70 On Mac + Windows → extra work because Docker = Linux feature → Install Docker Toolbox Docker client Docker Compose Docker Machine
Page 64: Scalable Magento Development with Docker

Docker Machine

Presenter
Presentation Notes
Docker Machine works much like Vagrant. Creates and manages virtual machines – that run the Docker daemon for you. Use Docker or Docker Compose on Windows or Mac OS → command will be executed in virtual machine → Example
Page 65: Scalable Magento Development with Docker

docker-machine ls

Page 66: Scalable Magento Development with Docker

docker-machine create

Page 67: Scalable Magento Development with Docker

docker-machine create

Page 68: Scalable Magento Development with Docker

Docker Machine

Page 69: Scalable Magento Development with Docker

Using Docker on Linux, Mac and Windows

• Linux works best• Mac OS works good

– Use docker-machine-nfs for better performance• Windows is (imho) a bit awkward to use• Always get your file system permissions right!

Presenter
Presentation Notes
Our experience Native Linux machines works best. Docker on Mac OS X works good. Windows is a bit awkward to use – mostly because of file system incompatibilities and missing Unix tools. Improve the performance on Mac OS – use docker-machine-nfs Enabled NFS share Faster than VirtualBox standard way Regardless of OS Always get your file-system permissions right
Page 70: Scalable Magento Development with Docker

DemoDockerizing Magento 2

Presenter
Presentation Notes
Demo time…
Page 71: Scalable Magento Development with Docker

Dockerizing Magento 2 1. Create a Magento 2 project2. Install arvatoscm/dockerize-

magento23. Start the Docker infrastructure

and install Magento

Presenter
Presentation Notes
We will dockerize Magento 2 (on a Mac) Steps we will perform: Create a new Magento project Install our dockerized-magento2 package, which we prepared Run the project
Page 72: Scalable Magento Development with Docker

Tool check

Presenter
Presentation Notes
Time check → go to slide 80 Tools used Docker Machine Docker Docker Compose Git git-flow Composer
Page 73: Scalable Magento Development with Docker

docker-machine version

Page 74: Scalable Magento Development with Docker

docker-machine ls

Page 75: Scalable Magento Development with Docker

docker version

Page 76: Scalable Magento Development with Docker

docker-compose version

Page 77: Scalable Magento Development with Docker

git version

Page 78: Scalable Magento Development with Docker

git flow version

Page 79: Scalable Magento Development with Docker

composer --version

Page 80: Scalable Magento Development with Docker

composer create-project

Presenter
Presentation Notes
We will now create a new project using Composer Should look familiar to Magento 2 developers Magento repository is used Username and password from Magento website (log in and generate them)
Page 81: Scalable Magento Development with Docker

composer create-project

Presenter
Presentation Notes
... afterwards we open the project folder...
Page 82: Scalable Magento Development with Docker

git flow init

Presenter
Presentation Notes
... and turn the project into a Git repository using git-flow...
Page 83: Scalable Magento Development with Docker

git commit

Presenter
Presentation Notes
... next we commit everything so that we can perform our local changes
Page 84: Scalable Magento Development with Docker

git flow feature start

Presenter
Presentation Notes
... we create a new feature branch in which we will work...
Page 85: Scalable Magento Development with Docker

Install arvatoscm/dockerize-magento2

Presenter
Presentation Notes
... and now the most important step: We add a Composer package to dockerize Magento 2 It is called arvatoscm/dockerize-magento2 Creative name, uh?
Page 86: Scalable Magento Development with Docker

Adapt .gitignore

Presenter
Presentation Notes
The .gitignore file coming with Magento 2 ignores some of our new files → In order to track them, .gitignore needs to be changed
Page 87: Scalable Magento Development with Docker

Review installed files

Presenter
Presentation Notes
... and then we can see the new files in our project Let‘s have a closer look...
Page 88: Scalable Magento Development with Docker

docker-compose.yml

Presenter
Presentation Notes
A docker-compose.yml More complicated than our examples before, because more components But same structure
Page 89: Scalable Magento Development with Docker

composer.json

Presenter
Presentation Notes
The composer.json with the new package in it...
Page 90: Scalable Magento Development with Docker

config folder

Presenter
Presentation Notes
A config folder, e. g. with files for Nginx MySQL
Page 91: Scalable Magento Development with Docker

config folder

Presenter
Presentation Notes
... and a customized PHP.ini because the one from the Docker standard PHP image is not optimized for Magento 2
Page 92: Scalable Magento Development with Docker

bin/console script

Presenter
Presentation Notes
... and last but not least: A utility script for controlling the dockerized infrastructure
Page 93: Scalable Magento Development with Docker

Make bin/console executable

Presenter
Presentation Notes
We need to make the scripts executable
Page 94: Scalable Magento Development with Docker

bin/console

Presenter
Presentation Notes
Let‘s run the console script: Actions Starting and stopping the infrastructure Action to trigger the Magento 2 installation (Alternative: Use Docker commands to perform the same steps) → And that‘s all we need to dockerize Magento 2
Page 95: Scalable Magento Development with Docker

Install Magento 2

Presenter
Presentation Notes
Let‘s run the install action...
Page 96: Scalable Magento Development with Docker

Install Magento 2: Generate SSL Certificates

Presenter
Presentation Notes
It will generate self-signed SSL certificates... if you haven‘t placed your own certificates in the config/nginx folder
Page 97: Scalable Magento Development with Docker

Install Magento 2: Start containers

Presenter
Presentation Notes
... it then starts the Docker containers for which the images are available on the host already...
Page 98: Scalable Magento Development with Docker

Install Magento 2: Download Docker Images

Presenter
Presentation Notes
... download missing images...
Page 99: Scalable Magento Development with Docker

Install Magento 2: Trigger Magento Installer

Presenter
Presentation Notes
... and start the Magento 2 installer with Given domain name Database credentials from the config files etc. It should look familiar for Magento 2 developers
Page 100: Scalable Magento Development with Docker

Install Magento 2: Display Shop URLs

Presenter
Presentation Notes
At the end, the script displays Frontend URL Backend URL Backend credentials
Page 101: Scalable Magento Development with Docker

Open Magento Frontend & Backend

Presenter
Presentation Notes
We can now open the frontend ... and the backend → A fully dockerized Magento 2 instance is born And now comes the best: If you find that interesting, you can try it on your own!
Page 102: Scalable Magento Development with Docker

Try it yourself

1. Installarvatoscm/dockerize-magento2

2. Have fun with Magento & Docker

Presenter
Presentation Notes
We open sourced this setup You can find the Composer package at Packagist It is called „arvatoSCM/docker-magento2“ Code at github.com/arvatoSCM/dockerize-magento2 Play with it and have fun! We are happy about any comments or pull requests. And then, all that is left to do, is...
Page 103: Scalable Magento Development with Docker

Questions

Feedback, questions and pull-requests are welcome.

Thank you.

github.com/arvatoSCM/dockerize-magento2

Presenter
Presentation Notes
Thank you for your attention on how to scale Magento development processes with Docker If you have questions, I am happy to answer them now or later via internet