Magento Business Intelligence Help Center

How to setup MBI Essentials for Magento Commerce Starter

Connect Magento Business Intelligence Essentials via SSH Tunnel

Magento Business Intelligence Essentials uses an SSH tunnel to connect to your production database to draw data on which to create reports.  In the following steps we will be setting up an SSH Tunnel to connect Magento Business Intelligence Essentials.

  1. Create your Magento BI Account
    • Go to https://magento.com/products/business-intelligence/essentials
    • Click ‘START FREE ESSENTIALS TRIAL’.
    • Input your GMV Tier. Please ignore the signage language regarding pricing for now. This will be resolved by submitting a support ticket with Magento BI in Step 2 once you have created your account.
      Picture1.png
    • Input your information to create your account.
      Picture2.png
    • Go to your inbox and verify your email address.
      Picture3.png
    • Create your password.
      Picture4.png
    • After creating your account you will then have the option to add users to your new account. Technical admin can now be added to carry out the following steps.
      Picture5.png
  2. Submit a support request.
    • Now that you have created an account using the trial sign up, submit a support request to support@rjmetrics.com requesting that your trial account be converted to a Business Intelligence Essentials account as part of your Starter package. Please include your username and project name in the ticket.
  3. Next, input information about your store to set your preferences.
    Picture6.png
    There is some information you need to gather before you can connect your database for the third step in the onboarding flow. You will be filling in the ‘Connect your database’ page in Step 10.
  4. Create dedicated MBI User
    • Create a new user on https://accounts.magento.com.
    • Why a new user? Magento BI needs a user added to the project to continuously fetch new data to be transferred to the account's MBI data warehouse. This user will serve as that connection. Adding this user to the project will come in Step 5.
    • The reason for having a dedicated MBI user is to prevent the added user from inadvertently being deactivated or deleted and stopping the MBI connection.
  5. Add the newly created user to the project’s Master environment as a ‘Contributor’.
    Picture7.png
  6. Get your MBI SSH keys.
    • Go to the ‘Connect your database’ page of the MBI set up user interface and scroll down to ‘Encryption settings’
    • For the field ‘Encryption Type’ chose ‘SSH Tunnel’. 
    • From the dropdown you can copy and paste the provided Magento BI Essentials Public Key.
      Picture8.png
  7. Add your new Magento BI Essentials Public key to the MBI user created in Step 4.
    • Go to https://accounts.magento.cloud/. Sign in with your account log in information for the new MBI user created. Then go to the ‘Account Settings’ tab.
    • Scroll down the page and expand the drop down for SSH keys. Then click ‘Add a public key’.
      Picture9.png
    • Add the Magento MBI Essentials SSH Public Key from Step 6.c above.
      Picture10.png
  8. Provide Magento Business Intelligence Essentials MySQL credentials
    • Update your .magento/services.yaml
      ‘mysql:
          type: mysql:10.0
          disk: 2048
          configuration:
              schemas:
                  - main
              endpoints:
                  mysql:
                      default_schema: main
                      privileges:
                          main: admin
                  mbi:
                      default_schema: main
                      privileges:
                          main: ro’
    • Update your .magento.app.yaml
      ‘relationships:
          database: "mysql:mysql"
          mbi: "mysql:mbi"
          redis: "redis:redis"’
  9. Get information for connecting your database to Magento Business Intelligence.
    Run
          ‘echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 --decode | json_pp’
    to get information on connecting your database.

    You should receive information similar to the output below:

    "mbi" : [
          {
             "scheme" : "mysql",
             "rel" : "mbi",
             "cluster" : "vfbfui4vmfez6-master-7rqtwti",
             "query" : {
                "is_master" : true
             },
             "ip" : "169.254.169.143",
             "path" : "main",
             "host" : "mbi.internal",
             "hostname" : "3m7xizydbomhnulyglx2ku4wpq.mysql.service._.magentosite.cloud",
             "username" : "mbi",
             "service" : "mysql",
             "port" : 3306,
             "password" : "[password]"
          }
       ],
  10. Connect your Magento Database
    Picture11.pngInputs
    • Integration Name: [Choose a name for your integration.]
    • Host: mbi.internal
    • Port: 3306
    • Username: mbi
    • Password: [input password provided in Step 9’s output.]
    • Database Name: main
    • Table Prefixes: [leave blank if there are no table prefixes]
  11. Set your Timezone Settings.
    Picture12.pngInputs
    • Database: Timezone: UTC
    • Desired Timezone: [Choose the timezone you want your data to display in.]
  12. Get information for your encryption settings.
    • The project UI provides an SSH access string.  This string can be used for gathering the information needed for the ‘Remote Address’ and ‘Username’ in setting up your ‘Encryption settings’.  Use the SSH Access string found by clicking the access site button on your Master branch of your Project UI and find your ‘User Name’ and ‘Remote Address’ as shown below.
      Picture13.png
      Picture14.png
  13. Input information for your Encryption Settings
    Picture15.png
    Inputs
    • Encryption Type: SSH Tunnel
    • Remote Address: ssh.us-3.magento.cloud
    • Username: vfbfui4vmfez6-master-7rqtwti--mymagento
    • Port: 22
  14. Click ‘Save Integration’
  15. Enjoy your newly connected Magento Business Intelligence Essentials account!
Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk