Skip to main content

Development environment

Repository

Repository URL is http://rocketweb.beanstalkapp.com/shoppingfeed-m2

Development environment

Development environment URL us http://qa-m2feed.rocketweb.com. Following line needs to be added to /etc/hosts file:

64.41.84.61 qa-m2feed.rocketweb.com

Magento 2 Installation

Environment was built in following way:

1. Prepare filesystem

cd /usr/share/nginx/rocketweb/
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.0.7 qa-m2feed.rocketweb.com/
cd qa-m2feed.rocketweb.com
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento
usermod -g www-data rocketweb
chown -R rocketweb:www-data .

2. Create db user

create database m2feed;
grant all on m2feed.* to 'm2feed'@'%' identified by '****';


3. Run installation

cd bin/
./magento setup:install --base-url=http://qa-m2feed.rocketweb.com/ --backend-frontname=admin --db-host=rsdb --db-name=m2feed --db-user=m2feed --db-password=**** --admin-firstname=Wojtek --admin-lastname=Naruniec --admin-email=wojtek@rocketweb.com --admin-user=wojtek --admin-password=wojtek1 --language=en_US --currency=USD --timezone=America/Indiana/Indianapolis

Admin backend access details looks as follows:

URL: http://qa-m2feed.rocketweb.com/admin_uxllg0/
Password is shared in passpack under "RSF M2 QA qa-m2feed.rocketweb.com".

Magento 2 reinstallation

Magento can be easily reinstalled in following way:

1. Uninstall Magento

bin/magento setup:uninstall

2. Install Magento again using setup:uninstall call shown above

Module installation

Install module using composer in following way:

1. Add repository in composer.json

{
"type": "vcs",
"url": "git@rocketweb.git.beanstalkapp.com:/rocketweb/shoppingfeed-m2.git"
}

2. Add require directive:

"rocketweb/module-shopping-feeds": "dev-master"

3. Update composer

composer update

Use similar steps to install any additional feed type module.

Module deployment

Use composer to deploy code from repository to dev environment:

cd /usr/share/nginx/rocketweb/qa-m2feed.rocketweb.com/
composer update

Local development environment

Use your preference to setup local dev environment. However, the easiest way will be:

  1. Install Magento 2 in any supported way eg. using composer
  2. Clone module repository into app/code
git clone git@rocketweb.git.beanstalkapp.com:/rocketweb/shoppingfeed-m2.git app/code/RocketWeb/ShoppingFeeds

Currently each other feed is stored under separate repository. Fetch other feeds in following way:

git clone git@rocketweb.git.beanstalkapp.com:/rocketweb/shoppingfeed-m2-google.git app/code/RocketWeb/ShoppingFeedsGoogle