Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Separation of Code and State Part 2 for M2
Magento DeveloperRaj Chevli@chevli
A bit about me
- Lead Magento Developer- Working at CTI Digital- Working with Magento since 2013- Like to play the Tabla (Indian Drums)
2@chevli
3@chevli
Who remembers this?
4
Back in the day
- Using a shared DB- Importing the staging DB- Making configuration changes on stage and locally- FTP images from stage to local environment- Creating 100’s of data scripts- QA/TDD non-existent
5@chevli
Brief
4 - 5Developers
ShortDeadline
180Websites
200Store Fronts
+/-Websites
6@chevli
Process
7@chevli
Magento Configurator!
For Magento 1
https://github.com/ctidigital/magento-configurator
8
What is it?
- A Magento module to create and maintain database variables using files.
- Allows you to install Magento from scratch with important database based configuration ready.
- Share and collaborate configuration with your team using VCS- Split your configuration based on the environment you're
developing on.
9@chevli
The Process
Drop & Install Database
With Magerun
Run Configurator
Make DevelopmentAnd Database
Changes
Commit Changes
Developer 1
Pull Changes
Drop & Install Database
With Magerun
Run Configurator
Make DevelopmentAnd Database
Changes
Commit Changes
Developer n-1
Pull Changes
Drop & Install Database
With Magerun
Run Configurator
Make DevelopmentAnd Database
Changes
Commit Changes
Developer n
Pull Changes
10@chevli
Magento 2 Configurator
- Magento Configurator is split into components- Each component to address each model in Magento- This will populate each table of the Magento Database- bin/magento configurator:run
- bin/magento configurator:run --env=production
- bin/magento configurator:run --env=local --component=config
11@chevli
Configurator Componentsbin/magento configurator:list
- Admin Roles- Admin Users- API Integrations- Attribute Sets- Attributes- Blocks- Categories- Store Configuration- Customer Groups- Customers
- Media- Pages- Product Links- Products- Review Rating- Rewrites- Tax Rates- Tax Rules- Websites- Widgets
12@chevli
master.yamlhttps://github.com/ctidigital/magento2-configurator/blob/develop/Samples/master.yaml
websites:enabled: 1sources:
- ../configurator/websites.yamlconfig:enabled: 1sources:- ../configurator/Configuration/global.yaml- ../configurator/Configuration/base.config.yaml
env:local:sources:- ../configurator/Configuration/local.yaml
stage:sources:- ../configurator/Configuration/stage.yaml
production:sources:- ../configurator/Configuration/production.yaml
13@chevli
Website Component (websites.yaml)websites:base:
name: Configurator's Website UKstore_groups:
-group_id: 1name: Main Website Storeroot_category_id: 2default_store: defaultstore_views:
default:name: Configurator's Store Viewis_active: 1
usa:name: Configurator's Website USstore_groups:
-name: Configurator's Website Store USroot_category_id: 2default_store: usa_en_usstore_views:
usa_en_us:name: Configurator's USA Store Viewis_active: 1
14@chevli
@chevli15@chevli
Store Configuration Component
global:-path: general/country/defaultvalue: US
websites:base:-path: general/country/defaultvalue: GB
stores:default:-path: general/locale/codevalue: en_GB
16@chevli
17
Free tools!
- n98-magerun- xdebug- robo.li- Travis-ci
- PHP Unit- PHP Code Sniffer- PHP Copy and Paste Detector- PHP Mess Detector
18@chevli
Big Thanks to the Community
- Paul Partington (CTI)- Francis Gallagher (Inviqa)- Chris Gan (CTI)- Matthew Howarth (MH Ltd)- Rob Stanley (CTI)- Evan Johnson (SplashLab)- Dcole (Inviqa)- Adragus (Inviqa)- Suresh Balasubramanian (CTI)- Andy Irvine (CTI)- Bartosz Herba (CTI)- Dan Kenny (Ampersand)- Alex Biddle (Inviqa)
19@chevli
The Community
- Mage Titans inspired module- Developed by the Mage Titans community
20@chevli
Version 1For Magento 2
21
What’s Next
- Magento Open Source (CE) components developed- Magento Commerce (EE) components to be developed- Magento Commerce (B2B) components to be developed- Bluefoot components- Third party extension components
22@chevli
Thank you for listening
Questions
Raj Chevli
@chevli
https://github.com/ctidigital/magento2-configurator
23