SlideShare une entreprise Scribd logo
1  sur  22
© 2016 Magento, Inc. Page | 1
© 2016 Magento, Inc. Page | 2
Agenda
1. Deployment types
2. File permissions
3. Connecting to Marketplace
4. Upgrading procedure
5. Q&A
© 2016 Magento, Inc. Page | 3
Deployment Types
© 2016 Magento, Inc. Page | 4
Deployment Types
Development DeploymentProduction Deployment
Requirements:
- Secure
- Reliability
- Performance
- Flexible deployment settings
Requirements:
- Easy to deploy
- Developer tools & debugging
© 2016 Magento, Inc. Page | 5
Deployment Types
Extension
Contributing
Self-hosted
Cloud
Shared hosting
Development DeploymentProduction Deployment
© 2016 Magento, Inc. Page | 6
Source of the Code
• Composer
• Git
• Archives
• Ready VM boxes:
– Vagrant
– Docker
Contributing dev
Extension dev Production
Production
© 2016 Magento, Inc. Page | 7
Application Modes
developer
• Errors displayed
• Auto-generated
static files
production
• Errors logged
• Pre-generated
static files
default
• A simplified
“production”
• Errors logged
• Auto-generated
static files
For development
For production
© 2016 Magento, Inc. Page | 8
File permissions
© 2016 Magento, Inc. Page | 9
File Permissions
• Single user
– A single user for both command line and web
– Less flexibility for permissions management
– Simplified setup
– Good for development
– May be the only option for shared hosting
• Two users: a web user and a command line user
– Better flexibility for permissions management
– More complicated setup
– Good for production
Production on shared hostingDevelopment
Production
© 2016 Magento, Inc. Page | 10
Two Users Setup
• Command line user is the owner of the files and has full/extended
permissions
– Run Magento console commands and Cron from this user
• Web user is in the same group and has limited permissions
– Run web server from this user
• Both users are in the same primary group
drwxr-xr-x 15 olga www-data 646 Aug 30 19:16 app
Command line Web user
© 2016 Magento, Inc. Page | 11
Magento Application: Read-Only Paths
• /
• app
• bin
• devlib
• phpserver
• pub
• pub/errors
• pub/static
• setup
• update
• var/di
• var/generation
• vendor
© 2016 Magento, Inc. Page | 12
Magento Application: Writeable Paths
• pub/media
• app/etc/env.php – for cache status management
• var/cache
• var/page_cache
• var/log
• var/report
• var/session
• pub/static/merged – for static files merging
• var/view_preprocessed – for static files merging
• pub/opt/magento/var/resource_config.json - for DB media
storage
• var/composer_home – for Setup Wizard
© 2016 Magento, Inc. Page | 13
Connecting to Marketplace
© 2016 Magento, Inc. Page | 14
Marketplace Credentials
• Marketplace keys ≠ marketplace username and password
© 2016 Magento, Inc. Page | 15
Marketplace Keys Location
• Two places where the keys are stored:
– If you run Composer commands – Composer dir in user home folder
(/home/olga/.composer/auth.json)
– If you use Setup Wizard – Composer dir in Magento folder
(/var/www/magento/var/composer_home/auth.json)
© 2016 Magento, Inc. Page | 16
Upgrading Procedure
© 2016 Magento, Inc. Page | 17
Composer-based Upgrade (Command Line)
• magento maintenance:enable
• composer require magento/product-community-edition
2.1.1 --no-update
• composer update
• magento setup:upgrade
• Generate DI and static view files:
– magento setup:di:compile
– magento setup:static-content:deploy
• magento maintenance:disable
© 2016 Magento, Inc. Page | 18
Git-based Upgrade (Command Line)
Assumption: you are a contributing developer
• git fetch magento
• git merge magento/develop
• composer install
• magento setup:upgrade
© 2016 Magento, Inc. Page | 19
Upgrade via Web Setup Wizard
• Admin Panel > System > Tools > Setup Wizard
• Select “System Upgrade”
• Select version
• Optional: select other components to upgrade
– Some components may require the upgrade to remain compatible with
the new Magento version
• Go through the steps
© 2016 Magento, Inc. Page | 20
Upgrading Production: Steps
On Staging
1. Upgrade the code
2. Clean generated files
3. Upgrade DB
4. Generate DI
5. Generate static view files
If you are an extension developer, reduce your extension’s upgrade time. Optimize setup
scripts:
- Implement one-step upgrade through multiple versions
- Validate upgrade scripts on big DB
On Production
1. Enable maintenance mode
2. Fetch updated code
3. Upgrade DB with --keep-
generated
4. Disable maintenance mode
© 2016 Magento, Inc. Page | 21
Proper Way to Generate Files on Staging
• Configure same set of enabled/disabled modules as on production
– For both DI and static view files
• Static view files:
– Install Magento on the same code on staging
– Locales:
• setup staging store with the same languages
• or specify languages used on production
– Use --theme option to speed-up the process
© 2016 Magento, Inc. Page | 22
Olga Kopylova
Q&A

Contenu connexe

Tendances

PWA for PHP Developers
PWA for PHP DevelopersPWA for PHP Developers
PWA for PHP DevelopersBen Marks
 
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Joshua Warren
 
A Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentA Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentJoshua Warren
 
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itIgor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itMeet Magento Italy
 
Meet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen RistićMeet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen RistićAmasty
 
Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015David Alger
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauAmasty
 
Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015David Alger
 
Meet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssMeet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssAmasty
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersJoshua Warren
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalHimanshu Mendiratta
 
How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.Web Visitors
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magentoMathew Beane
 
Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...
Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...
Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...Magecom UK Limited
 
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015Joshua Warren
 
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Joshua Warren
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Stéphane Bégaudeau
 
Tech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco shareTech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco shareAlfresco Software
 
Magento 2: Modernizing an eCommerce Powerhouse
Magento 2: Modernizing an eCommerce PowerhouseMagento 2: Modernizing an eCommerce Powerhouse
Magento 2: Modernizing an eCommerce PowerhouseBen Marks
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupKelly Mason
 

Tendances (20)

PWA for PHP Developers
PWA for PHP DevelopersPWA for PHP Developers
PWA for PHP Developers
 
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
Magento 2 - An Intro to a Modern PHP-Based System - Northeast PHP 2015
 
A Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to DeploymentA Successful Magento Project From Design to Deployment
A Successful Magento Project From Design to Deployment
 
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid itIgor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
Igor Bondarenko - Magento2 Performance Bottlenecks: How to avoid it
 
Meet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen RistićMeet Magento Belarus 2015: Mladen Ristić
Meet Magento Belarus 2015: Mladen Ristić
 
Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015Magento 2: New and Innovative? - php[world] 2015
Magento 2: New and Innovative? - php[world] 2015
 
Meet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir KalashnikauMeet Magento Belarus 2015: Uladzimir Kalashnikau
Meet Magento Belarus 2015: Uladzimir Kalashnikau
 
Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015Fundamentals of Extending Magento 2 - php[world] 2015
Fundamentals of Extending Magento 2 - php[world] 2015
 
Meet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis LukssMeet Magento Belarus 2015: Jurģis Lukss
Meet Magento Belarus 2015: Jurģis Lukss
 
Magento 2 Development for PHP Developers
Magento 2 Development for PHP DevelopersMagento 2 Development for PHP Developers
Magento 2 Development for PHP Developers
 
Integrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere PortalIntegrate any Angular Project into WebSphere Portal
Integrate any Angular Project into WebSphere Portal
 
How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.How to Install Magento 2 on XAMPP Server localhost.
How to Install Magento 2 on XAMPP Server localhost.
 
Phpworld.2015 scaling magento
Phpworld.2015 scaling magentoPhpworld.2015 scaling magento
Phpworld.2015 scaling magento
 
Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...
Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...
Google Page Insights and Magento 2 — Sergey Nezbritskiy | Magento Meetup Onli...
 
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
Magento 2 - An Intro to a Modern PHP-Based System - ZendCon 2015
 
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
Magento 2 Dependency Injection, Interceptors, and You - php[world] 2015
 
Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014Modern Web Application Development Workflow - EclipseCon US 2014
Modern Web Application Development Workflow - EclipseCon US 2014
 
Tech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco shareTech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco share
 
Magento 2: Modernizing an eCommerce Powerhouse
Magento 2: Modernizing an eCommerce PowerhouseMagento 2: Modernizing an eCommerce Powerhouse
Magento 2: Modernizing an eCommerce Powerhouse
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
 

Similaire à Mage Titans USA 2016 M2 deployment

Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2Hanoi MagentoMeetup
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
Oleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performanceOleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performanceMeet Magento Italy
 
Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum PerformanceEugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum PerformanceMeet Magento Italy
 
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and Patching
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and PatchingSAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and Patching
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and PatchingSAP Analytics
 
How to prepare a project for automated deployment?
How to prepare a project for automated deployment?How to prepare a project for automated deployment?
How to prepare a project for automated deployment?ONE BCG
 
Best practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudBest practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudOleg Posyniak
 
Microsoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform InstallerMicrosoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform InstallerGeorge Kanellopoulos
 
Php Performance On Windows
Php Performance On WindowsPhp Performance On Windows
Php Performance On Windowsruslany
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018hernanibf
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webpartsPrabhu Nehru
 
INSTALLING COGNOS ANALYTICS 11
INSTALLING COGNOS ANALYTICS 11INSTALLING COGNOS ANALYTICS 11
INSTALLING COGNOS ANALYTICS 11Senturus
 
Magento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data PatchesMagento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data Patchesatishgoswami
 
Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016
Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016
Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016Gunawan T Wicaksono
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookVMware Tanzu
 
Tips for Installing Cognos Analytics: Configuring and Installing the Server
Tips for Installing Cognos Analytics: Configuring and Installing the ServerTips for Installing Cognos Analytics: Configuring and Installing the Server
Tips for Installing Cognos Analytics: Configuring and Installing the ServerSenturus
 
TeamForge Overview Webinar (8/24)
TeamForge Overview Webinar (8/24)TeamForge Overview Webinar (8/24)
TeamForge Overview Webinar (8/24)CollabNet
 
Was migration benefits, planning, best practices
Was migration benefits, planning, best practicesWas migration benefits, planning, best practices
Was migration benefits, planning, best practicessflynn073
 

Similaire à Mage Titans USA 2016 M2 deployment (20)

Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2Mli 2017 technical intro to magento 2
Mli 2017 technical intro to magento 2
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
Oleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performanceOleh Kobchenko - Configure Magento 2 to get maximum performance
Oleh Kobchenko - Configure Magento 2 to get maximum performance
 
Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum PerformanceEugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
Eugene Shaksuvarov - Tuning Magento 2 for Maximum Performance
 
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and Patching
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and PatchingSAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and Patching
SAP #BOBJ #BI 4.1 Upgrade Webcast Series 5: BI Installation and Patching
 
How to prepare a project for automated deployment?
How to prepare a project for automated deployment?How to prepare a project for automated deployment?
How to prepare a project for automated deployment?
 
Best practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on CloudBest practices for developing your Magento Commerce on Cloud
Best practices for developing your Magento Commerce on Cloud
 
Microsoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform InstallerMicrosoft WebsiteSpark & Windows Platform Installer
Microsoft WebsiteSpark & Windows Platform Installer
 
Php Performance On Windows
Php Performance On WindowsPhp Performance On Windows
Php Performance On Windows
 
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018Aiming for automatic updates - Drupal Dev Days Lisbon 2018
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 
INSTALLING COGNOS ANALYTICS 11
INSTALLING COGNOS ANALYTICS 11INSTALLING COGNOS ANALYTICS 11
INSTALLING COGNOS ANALYTICS 11
 
Magento 2 Deploy Strategies
Magento 2 Deploy StrategiesMagento 2 Deploy Strategies
Magento 2 Deploy Strategies
 
Magento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data PatchesMagento 2.3 Schema and Data Patches
Magento 2.3 Schema and Data Patches
 
Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016
Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016
Open Mic Webcast: IBM Sametime Audio Video Troubleshooting - 04 May 2016
 
Pivotal Platform - December Release A First Look
Pivotal Platform - December Release A First LookPivotal Platform - December Release A First Look
Pivotal Platform - December Release A First Look
 
ch01.pptx
ch01.pptxch01.pptx
ch01.pptx
 
Tips for Installing Cognos Analytics: Configuring and Installing the Server
Tips for Installing Cognos Analytics: Configuring and Installing the ServerTips for Installing Cognos Analytics: Configuring and Installing the Server
Tips for Installing Cognos Analytics: Configuring and Installing the Server
 
TeamForge Overview Webinar (8/24)
TeamForge Overview Webinar (8/24)TeamForge Overview Webinar (8/24)
TeamForge Overview Webinar (8/24)
 
Was migration benefits, planning, best practices
Was migration benefits, planning, best practicesWas migration benefits, planning, best practices
Was migration benefits, planning, best practices
 

Dernier

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 

Dernier (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 

Mage Titans USA 2016 M2 deployment

  • 1. © 2016 Magento, Inc. Page | 1
  • 2. © 2016 Magento, Inc. Page | 2 Agenda 1. Deployment types 2. File permissions 3. Connecting to Marketplace 4. Upgrading procedure 5. Q&A
  • 3. © 2016 Magento, Inc. Page | 3 Deployment Types
  • 4. © 2016 Magento, Inc. Page | 4 Deployment Types Development DeploymentProduction Deployment Requirements: - Secure - Reliability - Performance - Flexible deployment settings Requirements: - Easy to deploy - Developer tools & debugging
  • 5. © 2016 Magento, Inc. Page | 5 Deployment Types Extension Contributing Self-hosted Cloud Shared hosting Development DeploymentProduction Deployment
  • 6. © 2016 Magento, Inc. Page | 6 Source of the Code • Composer • Git • Archives • Ready VM boxes: – Vagrant – Docker Contributing dev Extension dev Production Production
  • 7. © 2016 Magento, Inc. Page | 7 Application Modes developer • Errors displayed • Auto-generated static files production • Errors logged • Pre-generated static files default • A simplified “production” • Errors logged • Auto-generated static files For development For production
  • 8. © 2016 Magento, Inc. Page | 8 File permissions
  • 9. © 2016 Magento, Inc. Page | 9 File Permissions • Single user – A single user for both command line and web – Less flexibility for permissions management – Simplified setup – Good for development – May be the only option for shared hosting • Two users: a web user and a command line user – Better flexibility for permissions management – More complicated setup – Good for production Production on shared hostingDevelopment Production
  • 10. © 2016 Magento, Inc. Page | 10 Two Users Setup • Command line user is the owner of the files and has full/extended permissions – Run Magento console commands and Cron from this user • Web user is in the same group and has limited permissions – Run web server from this user • Both users are in the same primary group drwxr-xr-x 15 olga www-data 646 Aug 30 19:16 app Command line Web user
  • 11. © 2016 Magento, Inc. Page | 11 Magento Application: Read-Only Paths • / • app • bin • devlib • phpserver • pub • pub/errors • pub/static • setup • update • var/di • var/generation • vendor
  • 12. © 2016 Magento, Inc. Page | 12 Magento Application: Writeable Paths • pub/media • app/etc/env.php – for cache status management • var/cache • var/page_cache • var/log • var/report • var/session • pub/static/merged – for static files merging • var/view_preprocessed – for static files merging • pub/opt/magento/var/resource_config.json - for DB media storage • var/composer_home – for Setup Wizard
  • 13. © 2016 Magento, Inc. Page | 13 Connecting to Marketplace
  • 14. © 2016 Magento, Inc. Page | 14 Marketplace Credentials • Marketplace keys ≠ marketplace username and password
  • 15. © 2016 Magento, Inc. Page | 15 Marketplace Keys Location • Two places where the keys are stored: – If you run Composer commands – Composer dir in user home folder (/home/olga/.composer/auth.json) – If you use Setup Wizard – Composer dir in Magento folder (/var/www/magento/var/composer_home/auth.json)
  • 16. © 2016 Magento, Inc. Page | 16 Upgrading Procedure
  • 17. © 2016 Magento, Inc. Page | 17 Composer-based Upgrade (Command Line) • magento maintenance:enable • composer require magento/product-community-edition 2.1.1 --no-update • composer update • magento setup:upgrade • Generate DI and static view files: – magento setup:di:compile – magento setup:static-content:deploy • magento maintenance:disable
  • 18. © 2016 Magento, Inc. Page | 18 Git-based Upgrade (Command Line) Assumption: you are a contributing developer • git fetch magento • git merge magento/develop • composer install • magento setup:upgrade
  • 19. © 2016 Magento, Inc. Page | 19 Upgrade via Web Setup Wizard • Admin Panel > System > Tools > Setup Wizard • Select “System Upgrade” • Select version • Optional: select other components to upgrade – Some components may require the upgrade to remain compatible with the new Magento version • Go through the steps
  • 20. © 2016 Magento, Inc. Page | 20 Upgrading Production: Steps On Staging 1. Upgrade the code 2. Clean generated files 3. Upgrade DB 4. Generate DI 5. Generate static view files If you are an extension developer, reduce your extension’s upgrade time. Optimize setup scripts: - Implement one-step upgrade through multiple versions - Validate upgrade scripts on big DB On Production 1. Enable maintenance mode 2. Fetch updated code 3. Upgrade DB with --keep- generated 4. Disable maintenance mode
  • 21. © 2016 Magento, Inc. Page | 21 Proper Way to Generate Files on Staging • Configure same set of enabled/disabled modules as on production – For both DI and static view files • Static view files: – Install Magento on the same code on staging – Locales: • setup staging store with the same languages • or specify languages used on production – Use --theme option to speed-up the process
  • 22. © 2016 Magento, Inc. Page | 22 Olga Kopylova Q&A

Notes de l'éditeur

  1. Deployment processes can be divided into two types: “Production deployment”. And “development deployment”, which is also deployment as a developer needs to deploy a Magento instance in order to start working with it. And, as we can see, the requirements are different for different types of deployment: Production is focused on final result: the working store. And so it must be secure, reliable and perform well. Usually, in order to reach all these and to reach specifics of the project, flexible deployment settings are necessary. Form the other hand, Development deployment must be simple, so that the developer could focus on the deployment itself instead of playing with deployment settings. And also it needs developer and debugging tools to simplify the development process.
  2. Each of these types can be divided more into sub-types. Deployment process for production highly depends on the project’s needs and abilities. It can be: Self-hosted, which gives the most flexibility Cloud hosted, which gives flexibility in resources, but still highly depends on the hosting features from flexibility perspective Shared hosting, which gives a simple solution for simple installations. Here I’d recommend to work with hosting providers that provide in-built Magento installation. This guarantee that you have all resources necessary for your Magento store to run. On other hand, development procedures are also different basing on the project’s purposes: This can be an extension development Or contributing development for Magento
  3. Basing on your deployment type, how do you obtain the code? Here are our recommendations: In most cases you should use Composer-based installation, where you run a Composer command and download whole project in “vendor/” directory. Only in case you’re a contributing developer and are working on a contribution to the Magento core code, please, use Git repository. This is the only case, when it should be used. There are also zip/gzip/bzip archives for your convenience. It is an alternative to the Composer-based installation. Just that the Composer commands are pre-run by Magento release tools and the archives are packaged with downloaded code in them. The result should be the same as if Composer is used. This would make sense to use if you just want to try Magento and don’t want to install additional tools or/and if you want to deploy Magento on a shared hosting with no access to console where you’d run the composer commands. Another alternative solution would be to use ready Vagrant or Docker boxes with pre-installed Magento. Or even w/o Magento in it, but with environment ready.
  4. There are three application modes in Magento 2: “developer”, “production” and “default”. Developer mode allows to see errors right on the page or in web API request. Also it makes the application auto-generate necessary static view files. Production mode is faster and safer, as it hides all error in log files and is intended for usage with pre-generated files. Default mode is a compromise between developer and production modes. It still hides errors, but it performs auto-generation of static view files, when necessary. It’s recommended to use either developer or production mode.
  5. There are two recommended ways of setting up file permissions for Magento files. A “single-user setup” is a simplified one. It’s when you have a single user you use for any actions with the files – for the web-server, for console access. It may be the only option with shared hosting. It’s simple in usage because there can’t be any conflicts in access to the files, as all files are created and accessed by the same user. A more flexible approach to permissions management is to use two different users for accessing files. In this case, you’d have one user for console access and another user for web-server. It gives you ability to setup permissions in more flexible way.
  6. The console user should be the owner of the files (in most cases) and should have full (or highest) permissions to the files. Use this user for running console commands and crons. The web user should have limited access: read-access to most of the files and write access to a limited number of files that the Magento web application really needs. Both users should be in the same primary group. So, basically, the web user gets access to the files basing on the group.
  7. Let’s see which permissions are necessary for the web user in case of two-users setup. This is a setup for the group permissions. Follow the rule “deny-allow”, or in our case “read-write”. First, give read-only permissions to, basically, everything.
  8. And then give write permissions only to the files and folders that are really necessary in your case. For production, here is a list of paths that must be writable.
  9. All Magento packages, including extensions and Magento core packages, are distributed via Marketplace. In order to download the packages for your installation, it is necessary to have Marketplace keys. The keys are not the same as Marketplace username and password. The reason for this differentiation is that username and password allow you manage your entire Marketplace account (make purchases, change your information, etc.). And Marketplace keys allow only one thing – download already purchased packages. Also, you can revoke the keys at any time and replace them with the new ones, if the old ones are compromised.
  10. When you deploy Magento, the keys are usually stored for future usages (e.g., in case of upgrade or installation of new extensions). The keys, actually, can be stored in two different places depending on the actions you perform: If you run Composer commands (e.g., “composer create-project”), the keys you specify are stored in the Composer’s home folder, which is usually under your OS user’s folder If you run Magento commands or specify the keys in the Setup Wizard, the keys are stored in a special Composer folder under Magento project. The reason for existence and usage of these two places is a potentially different version of Composers used in different processes. Magento actions (console commands and Setup Wizard) use a specific version, embedded in the Magento project. Composer used as a separate tool and installed in your system may be of a totally different versions. And if these versions store data in different format, the results can be unexpected in case auth.json file is stored by one version of Composer and then loaded by another.
  11. Upgrade is another big topic. There are different ways to upgrade Magento store. And it highly depends on how you deployed it. I’ll go through a few options, which should be general enough to be applied for other specific cases.
  12. Composer-based upgrade via console. It is applicable in case you have a Composer-based or an archive-based deployment AND you have access to console and want to use console for the upgrade process. It’s the preferable procedure. So… If it’s necessary to lock the store, enable maintenance mode Uprgade dependency on a new version of Magento product using “composer require” command with “--no-update” option composer upgrade. It’s necessary to run these two commands instead of only “require” command because in this case all dependencies will be updated vs. only specified one, which helps avoid compatibility issues Upgrade Magento DB: magento setup:upgrade By default the upgrade command cleans generated files. If you’re in production mode or want to speed-up the store, generate new files Disable maintenance mode
  13. Another console-based approach is for Git-based installation. It is the way contributing developers would go with. Assuming you have a remote named “magento” for the original Magento repository Fetch magento Merge magento/develop into your branch Run “composer install” to update dependencies. It’s important to run “composer install”, not “composer update” – it guarantees that all developers will work with the same set of dependencies, even if some of them are not strictly defined Upgrade DB: magento setup:upgrade Now your Magento installation should be on the new version.
  14. And one more way to upgrade is to use Setup Wizard. It is applicable in case you don’t have access to the command line. Go to Admin Panel > System > Tools > Web Setup Wizard. And there select System Upgrade. Select version Optionally select other components to upgrade. It is recommended to do this though, as some installed components may be incompatible with new version of Magento, so it’s better to upgrade them to the new, compatible versions. Then just go through the steps
  15. Now, I’d like to focus for a moment on how you’d upgrade real production. Though, in general the result should be the same, you’d like to reduce downtime as much as possible. In this case it’s recommended to have a staging server additionally to the production one. The staging server should have a copy of your production - same code base. DB and user data may differ, but the application must be installed. Then, to perform upgrade: Do the upgrade on the staging server: Upgrade the code (Composer-based precedure via console) Clean generated files Upgrade DB Generate DI and static view files Then you need to move the updated code to production: Put production in maintenance code Replace the code with the one from staging. Here you may use Git and make ”git pull” or you may copy a zip archive to the production and now unzip it. But, independenctly on the approach, ensuew that you REPLACE the files, not COPYING them ON TOP. You must be sure that files that are not present in the new version, are removed. Just be sure that you don’t replace user data and environment configuration. Upgrade DB with --keep-generated option (as you already have files generated for the new version, you do not want them to be removed) Disable maintenance mode With this approach, the only downtime is caused by two actions: replacing the code (with can be very quick depending on your approach to doing this; e.g., you could pre-populate the new Magento folder and then just rename it to the “current” on in an instant) DB upgrade. This highly depends on the size of your DB and on efficiency of upgrade scripts of the extensions. If there are extension developers here, a request to you would be to test upgrades of your extensions on big DB, and optimize the scripts if possible.
  16. About files generation. During deployment and upgrade it is necessary to generate DI and static view files for your production. As I just described, in order to reduce downtime on production, it is recommended to generate these files on staging. Here are few insights about this process: Use “setup:di:compile” command for generating DI files Use “setup:static-content:deploy” command for generating static view files. A few notes about this command: It requires installed Magento instance to run. But it’s not necessary to have an identical DB, as on production. What must be identical is to have same themes on staging (Magento will register them in DB automatically, so the DB will have same set of themes and so will perform files generation compatible with your production). What may be identical, but may be bypassed: same stores with same locales selected. The command automatically identifies set of locales used in the application to deploy files for these locales. But you can bypass this requirement by manually specifying necessary languages as command’s arguments. Just ensure that you don’t forget any language (locale) used on production. In most cases you don’t use default Magento frontend theme on production. To speedup the generation process you can specify only themes you use on production, so files will be generated for these themes only. Use --theme option. An important moment for both commands is to have same set of enabled modules on both staging and production. Both commands may generate different result, if the sets are different.