forked from akeneo/transporteo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a7e108
commit 5c36969
Showing
4 changed files
with
234 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Advance usage | ||
|
||
## Configuration | ||
|
||
In order to avoid answering questions when starting the migration, you can define the default answsers in the [configuration parameters file](../src/Infrastructure/Common/config/parameters.yml) | ||
|
||
## Migration steps | ||
|
||
Transporteo uses [Symfony workflow](https://github.com/symfony/workflow) to define each step of the migration. You can edit the [workflow configuration file](../src/Infrastructure/Common/config/transporteo_state_machine.yml) to move, add, or remove some steps. Be aware that certain steps are mandatory, and that their orders are sometimes important. | ||
|
||
The most common reason to do that would be to want to migrate only structural data without products. In this case you'll have to remove the steps `destination_pim_product_migration` and `destination_pim_product_variation_migration` because the second step can't be performed without the first one. | ||
|
||
Below is an example of how to remove the steps of products migration: | ||
|
||
```yaml | ||
workflows: | ||
transporteo: | ||
type: 'state_machine' | ||
audit_trail: | ||
enabled: false | ||
marking_store: | ||
type: 'single_state' | ||
arguments: | ||
- 'currentState' | ||
supports: | ||
- 'Akeneo\PimMigration\Domain\TransporteoStateMachine' | ||
places: | ||
- 'ready' | ||
- 'source_pim_location_guessed' | ||
- 'source_pim_configured' | ||
- 'source_pim_api_configured' | ||
- 'source_pim_detected' | ||
- 'destination_pim_location_guessed' | ||
- 'destination_pim_downloaded' | ||
- 'destination_pim_pre_configured' | ||
- 'destination_pim_configured' | ||
- 'destination_pim_api_configured' | ||
- 'destination_pim_detected' | ||
- 'destination_pim_requirements_checked' | ||
- 'destination_pim_system_requirements_installed' | ||
- 'destination_pim_file_database_migrated' | ||
- 'destination_pim_structure_migrated' | ||
- 'destination_pim_family_migrated' | ||
- 'destination_pim_system_migrated' | ||
- 'destination_pim_job_migrated' | ||
- 'destination_pim_group_migrated' | ||
- 'destination_pim_extra_data_migrated' | ||
- 'destination_pim_enterprise_edition_data_migrated' | ||
- 'destination_pim_reference_data_migrated' | ||
# - 'destination_pim_product_migrated' | ||
# - 'destination_pim_product_variation_migrated' | ||
- 'migration_finished' | ||
transitions: | ||
ask_source_pim_location: | ||
from: 'ready' | ||
to: 'source_pim_location_guessed' | ||
local_source_pim_configuration: | ||
from: 'source_pim_location_guessed' | ||
to: 'source_pim_configured' | ||
distant_source_pim_configuration: | ||
from: 'source_pim_location_guessed' | ||
to: 'source_pim_configured' | ||
source_pim_api_configuration: | ||
from: 'source_pim_configured' | ||
to: 'source_pim_api_configured' | ||
source_pim_detection: | ||
from: 'source_pim_api_configured' | ||
to: 'source_pim_detected' | ||
ask_destination_pim_location: | ||
from: 'source_pim_detected' | ||
to: 'destination_pim_location_guessed' | ||
download_destination_pim: | ||
from: 'destination_pim_location_guessed' | ||
to: 'destination_pim_downloaded' | ||
destination_pim_pre_configuration: | ||
from: 'destination_pim_downloaded' | ||
to: 'destination_pim_pre_configured' | ||
destination_pim_configuration: | ||
from: ['destination_pim_downloaded', 'destination_pim_pre_configured'] | ||
to: 'destination_pim_configured' | ||
destination_pim_api_configuration: | ||
from: 'destination_pim_configured' | ||
to: 'destination_pim_api_configured' | ||
destination_pim_detection: | ||
from: 'destination_pim_api_configured' | ||
to: 'destination_pim_detected' | ||
destination_pim_check_requirements: | ||
from: 'destination_pim_detected' | ||
to: 'destination_pim_requirements_checked' | ||
local_destination_pim_system_requirements_installation: | ||
from: 'destination_pim_requirements_checked' | ||
to: 'destination_pim_system_requirements_installed' | ||
destination_pim_file_database_migration: | ||
from: 'destination_pim_system_requirements_installed' | ||
to: 'destination_pim_file_database_migrated' | ||
destination_pim_structure_migration: | ||
from: 'destination_pim_file_database_migrated' | ||
to: 'destination_pim_structure_migrated' | ||
destination_pim_family_migration: | ||
from: 'destination_pim_structure_migrated' | ||
to: 'destination_pim_family_migrated' | ||
destination_pim_system_migration: | ||
from: 'destination_pim_family_migrated' | ||
to: 'destination_pim_system_migrated' | ||
destination_pim_job_migration: | ||
from: 'destination_pim_system_migrated' | ||
to: 'destination_pim_job_migrated' | ||
destination_pim_group_migration: | ||
from: 'destination_pim_job_migrated' | ||
to: 'destination_pim_group_migrated' | ||
destination_pim_extra_data_migration: | ||
from: 'destination_pim_group_migrated' | ||
to: 'destination_pim_extra_data_migrated' | ||
destination_pim_enterprise_edition_data_migration: | ||
from: 'destination_pim_extra_data_migrated' | ||
to: 'destination_pim_enterprise_edition_data_migrated' | ||
destination_pim_reference_data_migration: | ||
from: 'destination_pim_enterprise_edition_data_migrated' | ||
to: 'destination_pim_reference_data_migrated' | ||
# destination_pim_product_migration: | ||
# from: 'destination_pim_reference_data_migrated' | ||
# to: 'destination_pim_product_migrated' | ||
# destination_pim_product_variation_migration: | ||
# from: 'destination_pim_product_migrated' | ||
# to: 'destination_pim_product_variation_migrated' | ||
finish_migration: | ||
from: 'destination_pim_reference_data_migrated' | ||
to: 'migration_finished' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Product variants migration | ||
|
||
If you used variant groups and/or inner variation types (with the paid extension InnerVariationBundle for the Enterprise Edition), or both together, the product migration is done in two steps. At first the products are migrated as they are not taking variants in account. Then in a second step, family variants, product models and product variants are created in the PIM 2.0 to reproduce the variants of the PIM 1.7. | ||
|
||
However , 2.0 PIM is stricter about the use of variations: it enforces to use them in a correct way. | ||
Therefore, some misconception in the use of the variation in 1.7 can prevent the migration of the variants in 2.0. | ||
|
||
Here are the rules that must be respected in order to fully migrate the product variants: | ||
|
||
- All the variants of a product must be of the same family | ||
- A family variant must not have more than 5 axes. | ||
- A variant axis must be one of the following types: | ||
- Simple select | ||
- Reference data simple select | ||
- Metric | ||
- Yes/No | ||
|
||
If a variant group or a inner variation type does not comply with these rules, the concerned products will remain without variant and you will be warned if it occurs. You will have to think about a better modeling for these products and then two options are available: | ||
|
||
1- Create manually the family variants, product models and product variants (directly from the UI, or using the API or imports) in the PIM 2.0 | ||
|
||
2- Fix the invalid variant groups and/or inner variation types in the PIM 1.7 and re-perform the migration. | ||
|
||
You can read this articles to learn more about variants in version 2.0: | ||
|
||
- [What about products with variants?](https://help.akeneo.com/articles/what-about-products-variants.html) | ||
- [Offer choice with variants!](https://medium.com/akeneo-labs/offer-choice-with-variants-8460a82fa36) | ||
- [How Akeneo deals with variants?](https://medium.com/akeneo-labs/how-does-akeneo-deal-with-variants-42bcab83a879) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Requirements | ||
|
||
## System | ||
|
||
- php7.1 | ||
- php7.1-mbstring | ||
- php7.1-json | ||
- php7.1-xml | ||
- [composer](https://getcomposer.org/download/) | ||
- a SSH client if the 1.7 source PIM you will migrate from is installed remotely. | ||
|
||
And the same requirements as the PIM as you need a PIM installed on your computer ([instructions](https://docs.akeneo.com/latest/install_pim/manual/system_requirements/system_requirements.html)). | ||
As we don't use Elasticsearch in Transporteo, you can install it the way you want. | ||
|
||
## API | ||
|
||
Transporteo uses the API to migrate the products (and variants if there are any). So it has to be functional and well configured on the 1.7 source PIM. | ||
|
||
### Authentication | ||
|
||
You need to have created a pair of client id / secret on the 1.7 source PIM. You can check if a pair of client id / secret already exists with this Symfony command: | ||
|
||
```bash | ||
php app/console pim:oauth-server:list-clients | ||
``` | ||
|
||
And you can create one with: | ||
|
||
```bash | ||
php app/console pim:oauth-server:create-client | ||
``` | ||
|
||
No need to create one on the 2.0 destination PIM. They will all be migrated from the 1.7 source PIM. | ||
|
||
### User | ||
|
||
If the 1.7 source PIM is an enterprise edition, you have to check that the user you'll use has all the Web API permissions, and that he is allowed to view and edit all the products and attributes. |