Skip to content

Commit

Permalink
Merge pull request #150 from paliarush/Issue-149-Add-Sample-Data-Conf…
Browse files Browse the repository at this point in the history
…iguration

Issue #149 add sample data configuration
  • Loading branch information
paliarush authored Oct 31, 2017
2 parents cc55300 + 4e2cc49 commit df51ca5
Show file tree
Hide file tree
Showing 6 changed files with 633 additions and 81 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added

- Support for new location of `generated` directory in Magento 2.2.0
- Basic data generation can be turned off. Added configurable product and customer address generation

### Fixed

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* [Clear Magento cache](#clear-magento-cache)
* [Switch between CE and EE](#switch-between-ce-and-ee)
* [Sample data installation](#sample-data-installation)
* [Basic data generation](#basic-data-generation)
* [Use Magento CLI (bin/magento)](#use-magento-cli-binmagento)
* [Debugging with XDebug](#debugging-with-xdebug)
* [Connecting to MySQL DB](#connecting-to-mysql-db)
Expand Down Expand Up @@ -186,6 +187,16 @@ During initial project setup or during `bash init_project.sh -fc` (with `-fc` pr

To install Magento with sample data set `install_sample_data` in [config.yaml](etc/config.yaml.dist) to `1` and run `bash m-switch-to-ce -f` or `bash m-switch-to-ee -f`, depending on the edition to be installed. To disable sample data, set this option to `0` and force-switch to necessary edition (using the same commands).

### Basic data generation

Several entities are generated for testing purposes by default using REST API after Magento installation:
- Customer with address (credentials `[email protected]`:`123123qQ`)
- Category
- Couple simple products
- Configurable product

To disable this feature, set `magento/generate_basic_data` in [config.yaml](etc/config.yaml.dist) to `0` and run `bash m-switch-to-ce -f` or `bash m-switch-to-ee -f`, depending on the edition to be installed.

### Use Magento CLI (bin/magento)

Go to 'vagrant-magento' created earlier and run in command line:
Expand Down
2 changes: 2 additions & 0 deletions etc/config.yaml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ environment:
magento:
# [To apply changes: m-switch-to-ce -f OR m-switch-to-ee -f]
install_sample_data: 0
# [To apply changes: m-switch-to-ce -f OR m-switch-to-ee -f] Generate customer ([email protected]:123123qQ), category, simple product, configurable product after successful Magento installation
generate_basic_data: 1
# [To apply changes: init_project.sh -f]
host_name: "magento2.vagrant2"
# [To apply changes: m-reinstall]
Expand Down
Loading

0 comments on commit df51ca5

Please sign in to comment.