Loading...

INSTALLATION AND UPDATES

MAGENTO 2 EXTENSION INSTALLATION

Magento 2 has reliable and robust installation process based on composer. Composer is a dependency management tool well supported by the community of PHP developers.

Since composer not only makes the installation and upgrade process easier, but also helps to ensure the compatibility of the components, it is the only supported installation option for Magento 2 Extensions.

The Magento 2 installation process consists of the following steps:

  1. Setup access to composer repository on https://insightsready.com.

  2. Install the composer package with the extension to Magento 2 Instance.

  3. Configure database connections for Sales Cube (if Sales Cube functionality was installed).

  4. Setup crontab configuration for the scheduler.

Setup access to composer repository, M2

Get repository access information

On the website settings page you may find access data for the composer repository. To open website settings, go to Account page on https://insightsready.com, menu item "My Websites" and select a website from the list. Click on "Show repository access data" to display the repository URI, repository username and password.

Add repository to composer.json

Add repository access information to composer.json repositories. Open composer.json file in base folder with Magento Instance installation and add the following section to "repositories":

{
  "type": "composer",
  "url": "https://repo.insightsready.com/"
}

Add authentication information to auth.json

Create file auth.json inside base directory of Magento Instance installation if it was not created before and add the following content to it:

{
  "http-basic": {
    "repo.insightsready.com": {
      "username": "<user from website settings page>",
      "password": "<password from website settings page>"
    }
  }
}

Alternatively, a system wide auth.json could be used in composer home directory (~/.composer).

Installing extension's composer package, M2

Depending on the purchased Power BI Integration Extension package, there will be a composer metapackage available for the installation.

The name of the metapackage could be found in the "Licensed Software Details" list on website details page ("My Websites" on https://insightsready.com -> "Details").

Meta-package name on client website details page on Insights Ready
Website
Picture: Meta-package name on client website details page on Insights Ready Website

Meta-package name on client website details page on Insights Ready Account

Following is example of commands that will trigger the installation of the extension:

composer require bim/pbi-sales-cube-metapackage-magento2:2.2.16.10

bin/magento setup:upgrade

bin/magento setup:di:compile

"bim/pbi-sales-cube-metapackage-magento2:2.2.16.10" would need to be replaced with the available metapackage name and their version.

Sales Cube database configuration, M2

Create database for DWH storage in MySQL 5.6 or MySQL 5.7.

Add "bim_dwh" and "bim_data_export" connection information to app/etc/env.php file of Magento installation.

"bim_dwh" should point to the newly created MySQL database for DWH storage.

"bim_data_export" should point to Magento database. This connection might also be pointing to a read-only replica of the main Magento database for decreasing the load on the productive Magento database. It could be just a copy of Magento database settings for the initial setup.

Configuring database connections on Magento 2:

<?php
return array( 
    'db' => array(
        'connection'
            'default' => array(
                'host' => 'localhost', 
                'dbname' => 'magento2', 
                'username' => 'magento2_user'
                'password' =>'********', 
                'model' => 'mysql4'
                'engine' => 'innodb' 
                'initStatements' => 'SET NAMES utf8;'
                 'active' => '1', 
            ), 
            'bim_data_export' => array( 
                'host' => 'localhost',
                'dbname' => 'magento2',
                'username' => 'magento2_user',
                'password' => '********'
                'model' => 'mysql4',
                'engine' => 'innodb',
                'initStatements' => 'SET NAMES utf8;', 
                'active' => '1', 
            ), 
            'bim_dwh' => array( 
                'host' => 'localhost', 
                'dbname' => 'magento2_dwh',
                'username' => 'dwh_user',
                'password' => '******* '
                'model' => 'mysql4', 
                'engine' => 'innodb', 
                'initStatements' => 'SET NAMES utf8; 'active' => '1',
            ),
            ...

Additionally, the connections needs to be added in resources section in the app/etc/env.php file.

    ...
    'resource' => [ 
        'default_setup' => [ 
            'connection' => 'default'
        ],
        'bim_dwh' => [ 
            'connection' => 'bim_dwh' 
        ],
        'bim_data_export' => [ 
            'connection' => 'bim_data_export'
        ],
    ... 

Setup crontab scheduler, M2

Run by crontab the following command every minute:

bin/magento bim:etl:scheduler

Below you will find the example of the corntab configuration (type "crontab -e" in command line to start editing the crontab configuration).

Configuring crontab scheduler job on Magento 2:

* * * * * php /path/to/magento2/bin/magento bim:etl:scheduler >> /path/to/magento2/crontab-bim.log 2>&1

UPDATING TO THE LATEST VERSION

Check current and latest versions

This section describes the update process for Magento 2 setup.

It is recommended to always specify the exact version of the installed package in composer.json file. So, instead of having the version defined as "^2.1.0" or "2.*" or ">2.1.0", just enter the version number without any prefixes: "2.1.0".

In order to verify, what version is installed, the command composer show might be used:

composer show | grep bim

or use the exact package name

composer show bim/pbi-sales-cube-beta-metapackage-magento2

To see the list of available versions, add -all option to the show command.

composer show bim/pbi-sales-cube-beta-metapackage-magento2 -all

Alternatively you may login to the account who owns the license on https://insightsready.com website and check if the metapackage version was increased for the package.

Information about the critical updates will be sent via the contact email, specified for the account on https://insightsready.com

Installing the update

You can install the update by changing the version of the package in composer.json file and running the standard composer update command:

composer update

Or use the composer require --update-with-dependencies command in order to avoid updating other packages, not related to the extension:

composer require --update-with-dependencies bim/pbi-sales-cube-beta-metapackage-magento2:2.3.0

Troubleshooting unsuccessful updates

Sometimes you may face issues with the update. Please, do the following in case of issues:

  1. Uninstall the package:
composer remove bim/pbi-sales-cube-beta-metapackage-magento2
  1. Clean up composer cache:
composer clear-cache
  1. Retry installing the package :
composer require bim/pbi-sales-cube-beta-metapackage-magento2:2.3.0
\newpage

MAGENTO 1 EXTENSION INSTALLATION

The Magento 1 installation process consists of the following steps:

  1. Download the extension package.

  2. Install the package to Magento Instance.

  3. Configuring database connections for Sales Cube (in case if Sales Cube functionality comes with the extension).

  4. Setup crontab configuration for the scheduler.

The downloaded Magento 1 extension package needs to be manually installed, so the access to the server via FTP/SSH is needed.

Download the Magento 1 Extension package

After purchasing the license (read "Obtaining Extension License" section of this documentation) the extension package should be available on the Downloads page. To open the Downloads, navigate to "Downloads" menu on the Account page on https://insightsready.com, menu item "My Websites". Just select the latest version and the appropriate package to download.

Extract downloaded extension package archive file on some temporary folder on your local machine or on the remote server with Magento Platform instance. Using your ftp client or ssh (scp) copy all of the extracted files onto the store root of the Magento instance.

After copying the files go to the admin page System Cache Management and click on "Flush Cache Storage".

Sales Cube database configuration, M1

Create database for DWH storage in MySQL or other similar databases supported by your Magento edition.

Add "bim_dwh" connection information to local.xml.

"bim_dwh" should point to the newly created MySQL database for DWH storage.

Configuring database connections for Magento:

<?xml version="1.0"?>
<config>
    <global>
        <resources>
            <default_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[magento_user]]></username >
                    <password><![CDATA[********]]>
                    </password>
                    <dbname><![CDATA[magento]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]>
                    </initStatement> 
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
            <bim_dwh>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[magento_user]]></username>
                    <password><![CDATA[********]]></password>
                    <dbname><![CDATA[magento_dwh]]></dbname>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <active>1</active>
                </connection>
            </bim_dwh>
            ...
        </resources>
        ...
    </global>
    ...
</config>

Setup crontab scheduler, M1

Run by crontab the following command every minute:

php shell/bim_etl.php scheduler

Below you will find the example of the corntab configuration (type "crontab -e" in command line to start editing the crontab configuration).

Configuring crontab scheduler job for Magento 1:

* * * * * php /path/to/magento/shell/bim_etl.php scheduler >> /path/to/magento/crontab-bim.log 2>&1
\newpage