-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal] Scenario-based deployments #558
Comments
i understand the AWS/Azure versions - but not sure why you think for custom deployments this is better than someone already using Chef/Puppet etc |
@piotrekkaminski This does not replace the CI deployment process but rather augments it as I see it. Instead of having your own scripts (or whatever you're using specific to your stack) that perform various Magento setup tasks (like SCD, DB upgrade, etc.) you can use |
API:
|
This was completed. |
Terms
Magento Cloud ecosystem
Current state
Desired state
The desired state - is to have flexible Magento deployment tools which will be used by Community and will be an easily extendable system.
Introduction
ECE-Tools got a good adoption by the community as a robust and predictable too for Magento deployment. It also includes a bunch of useful tools and Cloud Docker environment. From the beginning of ECE-Tools it was focused on only one type of deployment (de-facto Platform.sh deployment scenario). This was satisfying our needs until ideas with universal Magento deployment solution were proposed.
With time ECE-Tools became a universal Tool, developers were building their custom deployments around. ECE-Tools will lack the next features:
The benefits will be next:
Design
The design proposal fits the current Magento Cloud infrastructure.
Terms
Scenario - an XML configuration files which describes sequence and configuration parameters to deploy Magento
Step - an XML structure which describes a programmatic step to be executed
New ECE-Tools implementation will be targeted to deliver maximum flexibility to end-users. ECE-Tools will provide an easy to use API and predefined scenarios and steps to fit Magento's Cloud infrastructure.
Scenarios
Definition
Magento will will provide default scenarios to deploy Magento in **XML **format. Scenarios can be combined and replaced to satisfy customer's needs.
Composite step
Priority
Default Scenarios
Magento MUST include default scenarios for supported Cloud deployment pipelines.
Steps
StepInterface definition
StepInterface is generally lightweight processing class
StepException definition
Each step may throw only 1 type of exception - StepException
Steps MUST NOT be aware of the existence of other steps and be fully replaceable.
Extensibility
By using the XML format of scenarios, an ECE-Tools will have the possibility to extend default scenarios by 3rd-party extensions.
Extending default deploy scenario
In this example, the custom scenario is merged on top of the default scenario.
Merging rules
Removing default steps
Custom scenario can remove steps from default scenarios:
Replacing steps
Custom scenarios can replace default steps and provide custom implementation.
SI MUST be able to call the original step:
Customizing steps
We'll provide the possibility to customize some of the default steps, like Shell execution:
Validations
ECE-Tools MUST provide an XSD schema for scenarios validation with IDE and static tools.
Backward compatibility
API introduction
ECE-Tools will provide an API interfaces which MUST follow Semantic Versioning standards.
API interfaces MAY include but not limited to:
Logging
New Commands
ece-tools run
This command executes the desired scenario.
Arguments
Options
Implementation phases
Phase 1
Introduce DI component
Laravel DI is a fast and reliable system, but it is too messy due to lack of XML configuration support.
This will be essentially needed for 3rd-party developers for developing custom scenarios. Basic configuration is presented below (Using Symfony DI):
Introduce scenarios processor and parser mechanism
Refactor existing code to fit the new scenario-based deployments
Introduce scenario merger mechanism
Introduce an API endpoints
All Steps are covered with @api annotation
Important interfaces are covered with @api annotation
Add coverage of new functionality to Functional Testing Framework
Document extensibility mechanism and API endpoints
Phase 2
Introduce extensibility mechanism based on Dependency Injection
Introduce priority to Steps
Dependencies
The text was updated successfully, but these errors were encountered: