为现有Cloud Starter项目配置Adobe Commerce Intelligence连接

NOTE
Adobe Commerce Intelligence以前称为Magento Business Intelligence(MBI)。

本文提供了一个解决方案,可用于为现有的Adobe Commerce Intelligence入门项目配置Cloud Starter连接。

受影响的产品和版本

Adobe Commerce on cloud starter(所有版本)

问题

要为现有Commerce Intelligence Starter项目配置Cloud连接。

NOTE
Adobe不再支持新的Cloud Starter订阅,但是如果您现有一个Starter项目,则需要按照下方给出的步骤配置连接。

解决方案

要激活Commerce Intelligence以用于Cloud Starter项目,请创建Commerce Intelligence帐户,创建SSH密钥,最后连接到Adobe Commerce数据库。

请按照以下步骤操作:

  1. 创建您的Adobe Commerce Intelligence帐户:

    • 转到accounts.magento.com/customer/account/login
    • 导航到​ My Account > My MBI Instances
    • 单击​ Create Instance。 如果未看到此按钮,请联系您的客户成功经理或客户技术顾问。
    • 选择您的Cloud Starter订阅。 如果您只有Cloud Starter订阅,则会自动选择此设置。
    • 单击​ Continue
    • 输入您的信息以创建您的帐户。

    创建MBI帐户

    • 转到您的收件箱并验证电子邮件地址。

    验证电子邮件地址

    • 创建密码。

    创建密码

    • 创建帐户后,您可以选择将用户添加到新帐户。 现在可以添加技术管理员以执行以下步骤。

    添加用户

  2. 输入关于您的商店的信息以设置您的首选项。

    添加商店信息

    在连接数据库以进行入门培训流程中的第三步之前,您需要收集一些信息。 您将在步骤9中填写​ Connect your database ​页面。

  3. 创建专用的Commerce Intelligence用户。

    • account.adobe.com上创建新用户。
    • 转到https://accounts.magento.com/customer/account/生成您的Adobe Commerce帐户。
    • 为什么是新用户? Adobe Commerce Intelligence需要添加到项目中的用户不断获取新数据,以传输到帐户的Commerce Intelligence数据仓库。 此用户将用作该连接。 将此用户添加到项目将执行步骤4。
    • 拥有专用Commerce Intelligence用户的原因是,防止添加的用户意外地被停用或删除并停止Commerce Intelligence连接。
  4. 将新创建的用户作为​ 参与者 ​添加到项目的主环境。

    添加用户作为参与者

  5. 获取Commerce Intelligence SSH密钥。

    • 转到Commerce Intelligence设置用户界面的​ Connect your database ​页面,然后向下滚动到​ Encryption settings
    • 对于字段​ Encryption Type,请选择​ SSH Tunnel
    • 从下拉菜单中,您可以复制并粘贴提供的MagentoBI Essentials公钥。

    加密设置

  6. 将新的MagentoBI Essentials公钥添加到在第5步中创建的Commerce Intelligence用户。

    • 转到accounts.magento.com/customer/account/login。 使用您创建的新Commerce Intelligence用户的帐户登录信息登录。 然后转到​ Account Settings ​选项卡。
    • 向下滚动页面,并展开SSH密钥的下拉列表。 然后单击​ Add a public key

    添加公钥

    • 从上面添加MagentoMBI Essentials SSH公钥。

    添加SSH公钥

  7. 提供Business IntelligenceEssentials MySQL凭据。

    • 更新您的.magento/services.yaml
    code language-none
    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
    
    • 更新您的.magento.app.yaml
    code language-none
    relationships:
             database: "mysql:mysql"
             mbi: "mysql:mbi"
             redis: "redis:redis"
    
  8. 获取有关将数据库连接到Commerce Intelligence的信息。

    运行echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 --decode | json_pp以获取有关连接数据库的信息。

    您应会收到与以下输出类似的信息:

    code language-none
    "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]"
               }
            ],
    
  9. 连接您的Adobe Commerce数据库。

    连接您的Adobe Commerce数据库

    输入

    • 集成名称: [为您的集成选择一个名称。]
    • 主机: mbi.internal
    • 端口:3306
    • 用户名:mbi
    • 密码:步骤8的输出中提供了[输入密码。]
    • 数据库名称: main
    • 表前缀:如果没有表前缀],则[留空
  10. 设置您的Timezone Settings。

    时区设置

    输入

    • 数据库:时区:UTC
    • 所需时区: [选择您希望数据显示的时区。]
  11. 获取有关加密设置的信息。

    • 项目UI提供SSH访问字符串。 此字符串可用于收集设置​ Encryption settings ​时远程地址和用户名所需的信息。 选择​ SSH ​以查看您的用户名和远程地址。 @ ​之前的文本字符串是您的用户名,@ ​之后的文本字符串是您的远程地址。

    访问站点母版

  12. 输入您的Encryption Settings的信息。

    加密设置

    输入

    • 加密类型: SSH通道
    • 远程地址:ssh.us-3.magento.cloud
    • 用户名:vfbfui4vmfez6-master-7rqtwti—mymagento
    • 端口:22
  13. 单击​ Save Integration

  14. 您现在已成功连接到Commerce Intelligence Essentials帐户。

  15. 如果您是Adobe Commerce Intelligence Pro客户,请联系您的客户成功经理或客户技术顾问来协调后续步骤。

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a