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 .
  2. Install the composer package with the extension to Magento 2 Instance.
  3. Configure database connections for Sales Cube (in case if Sales Cube functionality comes with the extension).
  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, menu item “My Websites” and select a website from the list. Click on “Show repository access data” to display the repository URI, repository user name 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": ""

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": {
        "": {
            "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 composer package with an Extension, 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 -> “Details”).

Meta-package name on client website details page on BIM Website

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

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

composer require bim/pbi-sales-cube-metapackage-magento2:~2.1.2
bin/magento setup:upgrade
bin/magento setup:di:compile

“bim/pbi-sales-cube-metapackage-magento2:~2.1.2” 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. If could be just a copy of Magento database settings for the initial setup.

configuring database connections on Magento 2

Picture: configuring database connections on Magento 2

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

Picture: configuring crontab scheduler job on Magento 2