SlideShare a Scribd company logo
1 of 41
Mage-os.org 22. Apr. 2023
Building
Mage-OS
Or: DIY Magento Releases
Mage-os.org 22. Apr. 2023
Mage-OS is an open
initiative to ensure the
accessibility, longevity,
and success of the
Magento® platform
and ecosystem.
The Mage-OS
Distribution
is a community
owned fork
of Magento Open
Source.
Building a
Distribution
Mage-os.org 22. Apr. 2023
How are Mage-OS release packages built?
Mage-os.org 22. Apr. 2023
Back when we started: the first ideas…
Magento is many modules in a mono-repo
> Symfony uses splitsh/lite, maybe we can use it!
> There also are other existing tools…
Mage-os.org 22. Apr. 2023
First experiments
Splitting the magento repo into subrepos took ~36 hours!
Mage-os.org 22. Apr. 2023
Okay, something custom then!
“The Plan”
- Clone repo
- List all tags
- For each "version" tag…
- Iterate over all folders in app/code/Magento
- Zip the folder as a composer package using the name and version in the
composer.json file in each directory
- Use composer/satis to use the directory with the zips as an artifact type repo
Mage-os.org 22. Apr. 2023
Time to build!
Ivan: Let’s create a Rust repo-splitter that keeps the git repo
in-memory so no working copy is needed!
Vinai: Let’s keep it simple and write a shell script version, too!
> The more implementations we get, the better our understanding of the problem will be and the more
people will be able to work on it (rust, bash, js, …) <
Mage-os.org 22. Apr. 2023
One tool made it to production 🎉
The JavaScript implementation started as an
experiment.
Turned out to be good enough!
Also available as a docker image
magece/mageos-repo-js
to build your own Mage-OS repositories!
Mage-os.org 22. Apr. 2023
Beside the module & framework packages
magento/project-community-edition metapackage (e.g. 2.4.5-p2)
depends on ⬇️
magento/product-community-edition metapackage (e.g. 2.4.5-p2)
depends on ⬇️
EVERY MAGENTO PACKAGE included in 2.4.5-p2 in a specific version (e.g. 103.0.2)
and also ⬇️
magento/magento2-base (2.4.5-p2)
Mage-os.org 22. Apr. 2023
The magento2-base package
Contains base directory filesystem structure, i.e. app/code, bin/, dev/, ...
Mage-os.org 22. Apr. 2023
The magento2-base package
It depends on magento/magento-composer-installer.
It declares extra.map in composer.json.
The magento/magento-composer-installer
copies the extra.map files and folders
from the package into the project base.
Mage-os.org 22. Apr. 2023
There is no way to determine the extra.map contents programmatically.
From what is visible outside of Magento/Adobe, the map seems to be maintained manually.
The magento2-base package
Mage-os.org 22. Apr. 2023
Solution for mirror packages:
copy the magento2-base composer.json of
all past releases from upstream
The magento2-base package
Mage-os.org 22. Apr. 2023
There be Dragons Inconsistencies!
The git repos don’t match the old Magento releases exactly…
- Version mismatch in package composer.json and base package composer.json
- No version in package composer.json
- Missing release tags
- Branches with version name instead of a tag (did that branch change after the release??)
- For some releases, no commit in public repo matches the released code exactly
(file missing or file is different)
Mage-os.org 22. Apr. 2023
Workarounds
Each problem requires a
different workaround,
e.g. adding missing tags or files.
Mage-os.org 22. Apr. 2023
You did this for all versions of Magento 2?
Nope.
We only support releases since 2.3.7-p2.
Mage-os.org 22. Apr. 2023
Finally: it installs!
Mage-os.org 22. Apr. 2023
Why is there no 2FA for Admin login?
Mage-os.org 22. Apr. 2023
Ups! There is more than one git repo!
- https://github.com/mage-os/mirror-security-package
- https://github.com/mage-os/mirror-inventory
- https://github.com/mage-os/mirror-magento2-page-builder
- https://github.com/mage-os/mirror-inventory-composer-installer
- https://github.com/mage-os/mirror-adobe-ims
- https://github.com/mage-os/mirror-adobe-stock-integration
- https://github.com/mage-os/mirror-magento-composer-installer
- https://github.com/mage-os/mirror-composer-root-update-plugin
- https://github.com/mage-os/mirror-composer-dependency-version-audit-plugin
- https://github.com/mage-os/mirror-magento2-sample-data (not a direct dep)
- https://github.com/mage-os/mirror-commerce-data-export (not a direct dep)
Mage-os.org 22. Apr. 2023
Different repos, different Structures
- Single package repos, like mage-os/mirror-inventory-composer-installer
- Multiple packages in base, like mage-os/mirror-security-package
- Meta-package in _metapackage dir, like mage-os/mirror-security-package
- Special case subdirectory package, like
mage-os/mirror-magento2/tree/2.4-develop/lib/internal/Magento/Framework/Amqp
- Repos that change the directory structure, like mage-os/mirror-inventory
(first a clone of magento/magento2, then only app/code/Magento/* folders + _metapackage)
Mage-os.org 22. Apr. 2023
Additional dependencies!
The dependency on the packages from those repos are added to the magento/product-
community-edition package.
Mage-os.org 22. Apr. 2023
Bundled Core Extensions
- amzn/amazon-pay-and-login-magento-2-module
- dotmailer/dotmailer-magento2-extension
- klarna/m2-payments
- paypal/module-braintree
- temando/module-shipping
- vertex/product-magento-module
- yotpo/magento2-module-yotpo-reviews
Mage-os.org 22. Apr. 2023
Bundled Core Extensions
- Magento forked the public upstream repos
- These forks are not public
- Solution for mirror:
copy released packages from upstream
- Solution for Mage-OS distro:
no core bundled modules
Mage-os.org 22. Apr. 2023
Are you sure everything is working now?
Mage-os.org 22. Apr. 2023
Quality Assurance
- Install release from mirror.mage-os.org
- Install release from repo.magento.com
- Compare versions and files
Mage-os.org 22. Apr. 2023
We have mirror releases ✅
Mage-os.org 22. Apr. 2023
We have mirror releases ✅
Next step: nightly builds!
Mage-os.org 22. Apr. 2023
What is different from a mirror build?
Use the head of a branch instead of a git tag.
Figure out a nightly-build version for each package instead of relying on a version
in composer.json.
Mage-os.org 22. Apr. 2023
Nightly Package Versions
After considering many options, we now use
- get the latest release tag of the repo
- get the version of all packages
- if less than 4 parts are present: increment last part of the current version,
otherwise increment the last part
- if there is no stability suffix, add an -aYYYYMMDD suffix to version
- otherwise keep the stability suffix and add YYYYMMDD
Mage-os.org 22. Apr. 2023
What deps to use in the base package?
- clone repo
- run composer install
- use github.com/mage-os/php-dependency-list to scan every .php, .phtml and di.xml file
- For each referenced PHP class
- Use the composer autoloader to determine which package contains the class
- Record the package name and version as a composer dependency for the base package
Mage-os.org 22. Apr. 2023
Upstream Nightly Releases ✅
composer create-project magento/project-community-edition 
--repository-url https://upstream-nightly.mage-os.org 
--stability alpha ./current-nightly
Mage-os.org 22. Apr. 2023
Mage-OS Nightly Releases ✅
The same process as upstream-nightly works
for the mageos-nightly builds, too!
Mage-os.org 22. Apr. 2023
New upstream Magento Open Source release?
- copy project-community-edition, product-community-edition and base-package composer.json into
the respective resources/history/magento/* folder with the release version as the name
- run the build
- install and validate new version
- add workarounds for missing tags and such to build config, re-build and test until everything works
- PR to github.com/mage-os/generate-mirror-repo-js, run action against preview-mirror.mage-os.org
- Merge PR, new packages are built and deployed to mirror.mage-os.org
Mage-os.org 22. Apr. 2023
GitHub Actions
Mage-os.org 22. Apr. 2023
Time for a wee bit of code?
Mage-os.org 22. Apr. 2023
The Build Config
Everything is declared in
“the build config”.
Base config extended by build type
(mirror, upstream-nightly or mageos-nightly)
Config is processed by the build script to
generate the package ZIP files.
Mage-os.org 22. Apr. 2023
The Build Config
Mage-os.org 22. Apr. 2023
Next steps
Come! Pls halp!
Mage-os.org 22. Apr. 2023
Next steps
Active Projects:
- Generate a real Mage-OS release
- Faster Integration & Unit Tests - (hi Adam + Damien!)
- New Features - (hey Gowri + Ivan!)
- Content!
Mage-os.org 22. Apr. 2023
Join our Community
Adam Crossland (UK)
Alexander Buch (DE)
Andreas Mautz (DE)
Anton Siniorg (EE)
Arron Moss (UK)
Barbaros Selim Büyükelçi (TR)
Benno Lippert (DE)
Bernard Robbins (US)
Brent Peterson (US)
Christian Münch (DE)
Damien Retzinger (US)
Daniel Fahlke (DE)
Daniel Sloof (NL)
David Lambauer (DE)
Dominik Rammert (DE)
Erik Hanson (US)
Gowri Sankar (AU)
Jisse Reitsma (NL)
John Prendergast (IE)
Nicole Mentzen (DE)
Roland Haselager (NL)
Sergei Derzap (BY)
Tim Bucciarelli (US)
Timon de Groot (NL)
Vitaliy Golomozy (UA)
Willem Wigman (NL)
Wouter Steenmeijer (NL)
Thank you to the contributors!
Mage-os.org 22. Apr. 2023
Mage-OS
Fork it, Own it, Grow it, Better!
TOGETHER

More Related Content

Similar to Building Mage-OS - MageTitans 2023

OSGi Enablement For Apache Tuscany
OSGi Enablement For Apache TuscanyOSGi Enablement For Apache Tuscany
OSGi Enablement For Apache TuscanyRaymond Feng
 
自分たちのコードを Composer パッケージに分割して開発する
自分たちのコードを Composer パッケージに分割して開発する自分たちのコードを Composer パッケージに分割して開発する
自分たちのコードを Composer パッケージに分割して開発するShohei Okada
 
Maven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working TogetherMaven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working TogetherCarlos Sanchez
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolelliando dias
 
Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3Angie Ihirwe
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging PipelineMaciej Pasternacki
 
9 steps to awesome with kubernetes
9 steps to awesome with kubernetes9 steps to awesome with kubernetes
9 steps to awesome with kubernetesBaraniBuuny
 
How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0Daniele Crupi
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionMeet Magento Italy
 
Magento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions DistributionMagento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions DistributionSergii Shymko
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOpsNicola Baldi
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionFabio Kung
 
Mongo db program_installation_guide
Mongo db program_installation_guideMongo db program_installation_guide
Mongo db program_installation_guidePhilip Zhong
 
GR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven BuildsGR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven BuildsGR8Conf
 
Software development made serious
Software development made seriousSoftware development made serious
Software development made seriousDanilo Pianini
 

Similar to Building Mage-OS - MageTitans 2023 (20)

OSGi Enablement For Apache Tuscany
OSGi Enablement For Apache TuscanyOSGi Enablement For Apache Tuscany
OSGi Enablement For Apache Tuscany
 
自分たちのコードを Composer パッケージに分割して開発する
自分たちのコードを Composer パッケージに分割して開発する自分たちのコードを Composer パッケージに分割して開発する
自分たちのコードを Composer パッケージに分割して開発する
 
Maven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working TogetherMaven, Eclipse And OSGi Working Together
Maven, Eclipse And OSGi Working Together
 
GlassFish v3 Update Center
GlassFish v3 Update CenterGlassFish v3 Update Center
GlassFish v3 Update Center
 
Maven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension toolMaven 2.0 - Project management and comprehension tool
Maven 2.0 - Project management and comprehension tool
 
Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3Xgboost readthedocs-io-en-release 1.3.3
Xgboost readthedocs-io-en-release 1.3.3
 
A Continuous Packaging Pipeline
A Continuous Packaging PipelineA Continuous Packaging Pipeline
A Continuous Packaging Pipeline
 
9 steps to awesome with kubernetes
9 steps to awesome with kubernetes9 steps to awesome with kubernetes
9 steps to awesome with kubernetes
 
MongoSV 2011
MongoSV 2011MongoSV 2011
MongoSV 2011
 
Install mongo db on centos
Install mongo db on centosInstall mongo db on centos
Install mongo db on centos
 
How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0How to-create-a-simple-module-in-magento-2.0
How to-create-a-simple-module-in-magento-2.0
 
Sergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions DistributionSergii Shymko: Magento 2: Composer for Extensions Distribution
Sergii Shymko: Magento 2: Composer for Extensions Distribution
 
Magento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions DistributionMagento 2 Composer for Extensions Distribution
Magento 2 Composer for Extensions Distribution
 
The journey to GitOps
The journey to GitOpsThe journey to GitOps
The journey to GitOps
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 
Mongo db program_installation_guide
Mongo db program_installation_guideMongo db program_installation_guide
Mongo db program_installation_guide
 
First Bucharest GTUG event 02 Mar 2010
First Bucharest GTUG event 02 Mar 2010First Bucharest GTUG event 02 Mar 2010
First Bucharest GTUG event 02 Mar 2010
 
Java User Group Cologne
Java User Group CologneJava User Group Cologne
Java User Group Cologne
 
GR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven BuildsGR8Conf 2011: Groovy Maven Builds
GR8Conf 2011: Groovy Maven Builds
 
Software development made serious
Software development made seriousSoftware development made serious
Software development made serious
 

More from vinaikopp

Hyvä: Compatibility Modules
Hyvä: Compatibility ModulesHyvä: Compatibility Modules
Hyvä: Compatibility Modulesvinaikopp
 
Hyvä from a developer perspective
Hyvä from a developer perspectiveHyvä from a developer perspective
Hyvä from a developer perspectivevinaikopp
 
Property Based Testing in PHP
Property Based Testing in PHPProperty Based Testing in PHP
Property Based Testing in PHPvinaikopp
 
Property based testing - MageTestFest 2019
Property based testing - MageTestFest 2019Property based testing - MageTestFest 2019
Property based testing - MageTestFest 2019vinaikopp
 
Becoming Certified - MageTitansMCR 2018
Becoming Certified - MageTitansMCR 2018Becoming Certified - MageTitansMCR 2018
Becoming Certified - MageTitansMCR 2018vinaikopp
 
SOS UiComponents
SOS UiComponentsSOS UiComponents
SOS UiComponentsvinaikopp
 
ClojureScript in Magento 2 - PHPUGMRN
ClojureScript in Magento 2 - PHPUGMRNClojureScript in Magento 2 - PHPUGMRN
ClojureScript in Magento 2 - PHPUGMRNvinaikopp
 
Magento 2 TDD Code Kata
Magento 2 TDD Code KataMagento 2 TDD Code Kata
Magento 2 TDD Code Katavinaikopp
 
Magento 2 TDD Code Kata Intro
Magento 2 TDD Code Kata IntroMagento 2 TDD Code Kata Intro
Magento 2 TDD Code Kata Introvinaikopp
 
Testing Magento 2
Testing Magento 2Testing Magento 2
Testing Magento 2vinaikopp
 
ClojureScript in Magento 2 - MageTitansMCR 2017
ClojureScript in Magento 2 - MageTitansMCR 2017ClojureScript in Magento 2 - MageTitansMCR 2017
ClojureScript in Magento 2 - MageTitansMCR 2017vinaikopp
 
Lizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17deLizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17devinaikopp
 
Stories from the other side
Stories from the other sideStories from the other side
Stories from the other sidevinaikopp
 
Writing Testable Code (for Magento 1 and 2) 2016 Romaina
Writing Testable Code (for Magento 1 and 2)  2016 RomainaWriting Testable Code (for Magento 1 and 2)  2016 Romaina
Writing Testable Code (for Magento 1 and 2) 2016 Romainavinaikopp
 
Writing Testable Code (for Magento 1 and 2)
Writing Testable Code (for Magento 1 and 2)Writing Testable Code (for Magento 1 and 2)
Writing Testable Code (for Magento 1 and 2)vinaikopp
 
Writing testable Code (MageTitans Mini 2016)
Writing testable Code (MageTitans Mini 2016)Writing testable Code (MageTitans Mini 2016)
Writing testable Code (MageTitans Mini 2016)vinaikopp
 
Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)vinaikopp
 
Getting your hands dirty testing Magento 2 (at MageTitansIT)
Getting your hands dirty testing Magento 2 (at MageTitansIT)Getting your hands dirty testing Magento 2 (at MageTitansIT)
Getting your hands dirty testing Magento 2 (at MageTitansIT)vinaikopp
 
Architecture in-the-small-slides
Architecture in-the-small-slidesArchitecture in-the-small-slides
Architecture in-the-small-slidesvinaikopp
 
Modern Module Architecture
Modern Module ArchitectureModern Module Architecture
Modern Module Architecturevinaikopp
 

More from vinaikopp (20)

Hyvä: Compatibility Modules
Hyvä: Compatibility ModulesHyvä: Compatibility Modules
Hyvä: Compatibility Modules
 
Hyvä from a developer perspective
Hyvä from a developer perspectiveHyvä from a developer perspective
Hyvä from a developer perspective
 
Property Based Testing in PHP
Property Based Testing in PHPProperty Based Testing in PHP
Property Based Testing in PHP
 
Property based testing - MageTestFest 2019
Property based testing - MageTestFest 2019Property based testing - MageTestFest 2019
Property based testing - MageTestFest 2019
 
Becoming Certified - MageTitansMCR 2018
Becoming Certified - MageTitansMCR 2018Becoming Certified - MageTitansMCR 2018
Becoming Certified - MageTitansMCR 2018
 
SOS UiComponents
SOS UiComponentsSOS UiComponents
SOS UiComponents
 
ClojureScript in Magento 2 - PHPUGMRN
ClojureScript in Magento 2 - PHPUGMRNClojureScript in Magento 2 - PHPUGMRN
ClojureScript in Magento 2 - PHPUGMRN
 
Magento 2 TDD Code Kata
Magento 2 TDD Code KataMagento 2 TDD Code Kata
Magento 2 TDD Code Kata
 
Magento 2 TDD Code Kata Intro
Magento 2 TDD Code Kata IntroMagento 2 TDD Code Kata Intro
Magento 2 TDD Code Kata Intro
 
Testing Magento 2
Testing Magento 2Testing Magento 2
Testing Magento 2
 
ClojureScript in Magento 2 - MageTitansMCR 2017
ClojureScript in Magento 2 - MageTitansMCR 2017ClojureScript in Magento 2 - MageTitansMCR 2017
ClojureScript in Magento 2 - MageTitansMCR 2017
 
Lizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17deLizards & Pumpkins Catalog Replacement at mm17de
Lizards & Pumpkins Catalog Replacement at mm17de
 
Stories from the other side
Stories from the other sideStories from the other side
Stories from the other side
 
Writing Testable Code (for Magento 1 and 2) 2016 Romaina
Writing Testable Code (for Magento 1 and 2)  2016 RomainaWriting Testable Code (for Magento 1 and 2)  2016 Romaina
Writing Testable Code (for Magento 1 and 2) 2016 Romaina
 
Writing Testable Code (for Magento 1 and 2)
Writing Testable Code (for Magento 1 and 2)Writing Testable Code (for Magento 1 and 2)
Writing Testable Code (for Magento 1 and 2)
 
Writing testable Code (MageTitans Mini 2016)
Writing testable Code (MageTitans Mini 2016)Writing testable Code (MageTitans Mini 2016)
Writing testable Code (MageTitans Mini 2016)
 
Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)Getting your Hands Dirty Testing Magento 2 (at London Meetup)
Getting your Hands Dirty Testing Magento 2 (at London Meetup)
 
Getting your hands dirty testing Magento 2 (at MageTitansIT)
Getting your hands dirty testing Magento 2 (at MageTitansIT)Getting your hands dirty testing Magento 2 (at MageTitansIT)
Getting your hands dirty testing Magento 2 (at MageTitansIT)
 
Architecture in-the-small-slides
Architecture in-the-small-slidesArchitecture in-the-small-slides
Architecture in-the-small-slides
 
Modern Module Architecture
Modern Module ArchitectureModern Module Architecture
Modern Module Architecture
 

Recently uploaded

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Building Mage-OS - MageTitans 2023

  • 1. Mage-os.org 22. Apr. 2023 Building Mage-OS Or: DIY Magento Releases
  • 2. Mage-os.org 22. Apr. 2023 Mage-OS is an open initiative to ensure the accessibility, longevity, and success of the Magento® platform and ecosystem. The Mage-OS Distribution is a community owned fork of Magento Open Source. Building a Distribution
  • 3. Mage-os.org 22. Apr. 2023 How are Mage-OS release packages built?
  • 4. Mage-os.org 22. Apr. 2023 Back when we started: the first ideas… Magento is many modules in a mono-repo > Symfony uses splitsh/lite, maybe we can use it! > There also are other existing tools…
  • 5. Mage-os.org 22. Apr. 2023 First experiments Splitting the magento repo into subrepos took ~36 hours!
  • 6. Mage-os.org 22. Apr. 2023 Okay, something custom then! “The Plan” - Clone repo - List all tags - For each "version" tag… - Iterate over all folders in app/code/Magento - Zip the folder as a composer package using the name and version in the composer.json file in each directory - Use composer/satis to use the directory with the zips as an artifact type repo
  • 7. Mage-os.org 22. Apr. 2023 Time to build! Ivan: Let’s create a Rust repo-splitter that keeps the git repo in-memory so no working copy is needed! Vinai: Let’s keep it simple and write a shell script version, too! > The more implementations we get, the better our understanding of the problem will be and the more people will be able to work on it (rust, bash, js, …) <
  • 8. Mage-os.org 22. Apr. 2023 One tool made it to production 🎉 The JavaScript implementation started as an experiment. Turned out to be good enough! Also available as a docker image magece/mageos-repo-js to build your own Mage-OS repositories!
  • 9. Mage-os.org 22. Apr. 2023 Beside the module & framework packages magento/project-community-edition metapackage (e.g. 2.4.5-p2) depends on ⬇️ magento/product-community-edition metapackage (e.g. 2.4.5-p2) depends on ⬇️ EVERY MAGENTO PACKAGE included in 2.4.5-p2 in a specific version (e.g. 103.0.2) and also ⬇️ magento/magento2-base (2.4.5-p2)
  • 10. Mage-os.org 22. Apr. 2023 The magento2-base package Contains base directory filesystem structure, i.e. app/code, bin/, dev/, ...
  • 11. Mage-os.org 22. Apr. 2023 The magento2-base package It depends on magento/magento-composer-installer. It declares extra.map in composer.json. The magento/magento-composer-installer copies the extra.map files and folders from the package into the project base.
  • 12. Mage-os.org 22. Apr. 2023 There is no way to determine the extra.map contents programmatically. From what is visible outside of Magento/Adobe, the map seems to be maintained manually. The magento2-base package
  • 13. Mage-os.org 22. Apr. 2023 Solution for mirror packages: copy the magento2-base composer.json of all past releases from upstream The magento2-base package
  • 14. Mage-os.org 22. Apr. 2023 There be Dragons Inconsistencies! The git repos don’t match the old Magento releases exactly… - Version mismatch in package composer.json and base package composer.json - No version in package composer.json - Missing release tags - Branches with version name instead of a tag (did that branch change after the release??) - For some releases, no commit in public repo matches the released code exactly (file missing or file is different)
  • 15. Mage-os.org 22. Apr. 2023 Workarounds Each problem requires a different workaround, e.g. adding missing tags or files.
  • 16. Mage-os.org 22. Apr. 2023 You did this for all versions of Magento 2? Nope. We only support releases since 2.3.7-p2.
  • 17. Mage-os.org 22. Apr. 2023 Finally: it installs!
  • 18. Mage-os.org 22. Apr. 2023 Why is there no 2FA for Admin login?
  • 19. Mage-os.org 22. Apr. 2023 Ups! There is more than one git repo! - https://github.com/mage-os/mirror-security-package - https://github.com/mage-os/mirror-inventory - https://github.com/mage-os/mirror-magento2-page-builder - https://github.com/mage-os/mirror-inventory-composer-installer - https://github.com/mage-os/mirror-adobe-ims - https://github.com/mage-os/mirror-adobe-stock-integration - https://github.com/mage-os/mirror-magento-composer-installer - https://github.com/mage-os/mirror-composer-root-update-plugin - https://github.com/mage-os/mirror-composer-dependency-version-audit-plugin - https://github.com/mage-os/mirror-magento2-sample-data (not a direct dep) - https://github.com/mage-os/mirror-commerce-data-export (not a direct dep)
  • 20. Mage-os.org 22. Apr. 2023 Different repos, different Structures - Single package repos, like mage-os/mirror-inventory-composer-installer - Multiple packages in base, like mage-os/mirror-security-package - Meta-package in _metapackage dir, like mage-os/mirror-security-package - Special case subdirectory package, like mage-os/mirror-magento2/tree/2.4-develop/lib/internal/Magento/Framework/Amqp - Repos that change the directory structure, like mage-os/mirror-inventory (first a clone of magento/magento2, then only app/code/Magento/* folders + _metapackage)
  • 21. Mage-os.org 22. Apr. 2023 Additional dependencies! The dependency on the packages from those repos are added to the magento/product- community-edition package.
  • 22. Mage-os.org 22. Apr. 2023 Bundled Core Extensions - amzn/amazon-pay-and-login-magento-2-module - dotmailer/dotmailer-magento2-extension - klarna/m2-payments - paypal/module-braintree - temando/module-shipping - vertex/product-magento-module - yotpo/magento2-module-yotpo-reviews
  • 23. Mage-os.org 22. Apr. 2023 Bundled Core Extensions - Magento forked the public upstream repos - These forks are not public - Solution for mirror: copy released packages from upstream - Solution for Mage-OS distro: no core bundled modules
  • 24. Mage-os.org 22. Apr. 2023 Are you sure everything is working now?
  • 25. Mage-os.org 22. Apr. 2023 Quality Assurance - Install release from mirror.mage-os.org - Install release from repo.magento.com - Compare versions and files
  • 26. Mage-os.org 22. Apr. 2023 We have mirror releases ✅
  • 27. Mage-os.org 22. Apr. 2023 We have mirror releases ✅ Next step: nightly builds!
  • 28. Mage-os.org 22. Apr. 2023 What is different from a mirror build? Use the head of a branch instead of a git tag. Figure out a nightly-build version for each package instead of relying on a version in composer.json.
  • 29. Mage-os.org 22. Apr. 2023 Nightly Package Versions After considering many options, we now use - get the latest release tag of the repo - get the version of all packages - if less than 4 parts are present: increment last part of the current version, otherwise increment the last part - if there is no stability suffix, add an -aYYYYMMDD suffix to version - otherwise keep the stability suffix and add YYYYMMDD
  • 30. Mage-os.org 22. Apr. 2023 What deps to use in the base package? - clone repo - run composer install - use github.com/mage-os/php-dependency-list to scan every .php, .phtml and di.xml file - For each referenced PHP class - Use the composer autoloader to determine which package contains the class - Record the package name and version as a composer dependency for the base package
  • 31. Mage-os.org 22. Apr. 2023 Upstream Nightly Releases ✅ composer create-project magento/project-community-edition --repository-url https://upstream-nightly.mage-os.org --stability alpha ./current-nightly
  • 32. Mage-os.org 22. Apr. 2023 Mage-OS Nightly Releases ✅ The same process as upstream-nightly works for the mageos-nightly builds, too!
  • 33. Mage-os.org 22. Apr. 2023 New upstream Magento Open Source release? - copy project-community-edition, product-community-edition and base-package composer.json into the respective resources/history/magento/* folder with the release version as the name - run the build - install and validate new version - add workarounds for missing tags and such to build config, re-build and test until everything works - PR to github.com/mage-os/generate-mirror-repo-js, run action against preview-mirror.mage-os.org - Merge PR, new packages are built and deployed to mirror.mage-os.org
  • 34. Mage-os.org 22. Apr. 2023 GitHub Actions
  • 35. Mage-os.org 22. Apr. 2023 Time for a wee bit of code?
  • 36. Mage-os.org 22. Apr. 2023 The Build Config Everything is declared in “the build config”. Base config extended by build type (mirror, upstream-nightly or mageos-nightly) Config is processed by the build script to generate the package ZIP files.
  • 37. Mage-os.org 22. Apr. 2023 The Build Config
  • 38. Mage-os.org 22. Apr. 2023 Next steps Come! Pls halp!
  • 39. Mage-os.org 22. Apr. 2023 Next steps Active Projects: - Generate a real Mage-OS release - Faster Integration & Unit Tests - (hi Adam + Damien!) - New Features - (hey Gowri + Ivan!) - Content!
  • 40. Mage-os.org 22. Apr. 2023 Join our Community Adam Crossland (UK) Alexander Buch (DE) Andreas Mautz (DE) Anton Siniorg (EE) Arron Moss (UK) Barbaros Selim Büyükelçi (TR) Benno Lippert (DE) Bernard Robbins (US) Brent Peterson (US) Christian Münch (DE) Damien Retzinger (US) Daniel Fahlke (DE) Daniel Sloof (NL) David Lambauer (DE) Dominik Rammert (DE) Erik Hanson (US) Gowri Sankar (AU) Jisse Reitsma (NL) John Prendergast (IE) Nicole Mentzen (DE) Roland Haselager (NL) Sergei Derzap (BY) Tim Bucciarelli (US) Timon de Groot (NL) Vitaliy Golomozy (UA) Willem Wigman (NL) Wouter Steenmeijer (NL) Thank you to the contributors!
  • 41. Mage-os.org 22. Apr. 2023 Mage-OS Fork it, Own it, Grow it, Better! TOGETHER

Editor's Notes

  1. I’m so happy to see you, and have the opportunity to talk about Mage-OS! My name is Vinai, and I’m happy I can be with you in person today, as with all previous MageTitans events here in Manchester! I’ve got very, very fond memories of MageTitans, it’s the best! Let’s get started!
  2. In a nutshell: this is what is on our website: “Mage-OS is an open initiative…[read left side of slide]” The foundation of Mage-OS is the Mage-OS Distribution. “The Mage-OS distribution is a…[read right side of slide]” What does community-owned mean? It’s easy to gloss over that, but it’s actually the heart of everything. What is community?
  3. > Magento is many modules in a single repo, (a.k.a. “mono-as-poly”) > Synfony uses splitsh/lite, maybe we can use it! > There also are other tools that can be used to build packages from a monorepo
  4. Thanks to Rafael Kassner for his work on https://github.com/magefm/repository-generator
  5. The name “generate-mirror-repo-js” is not fitting any more! A better name would be “generate-mageos-composer-repo”.
  6. Thanks to Daniel Sloof! 🙌🏻
  7. Next: nightly releases of upstream!
  8. Next: nightly releases of upstream!
  9. Special shoutout to Damien Retzinger of Mappia helm chart fame.
  10. There are dozens of people who already have helped and contributed to Mage-OS, even though we are only just getting started. Thank you to everyone who took joint ownership and move Mage-OS forward!
  11. We look forward to creating the future together with you! Thank you!