微应用安装

文档中以MySQL数据安装为示例进行安装。

安装介质说明和准备

微应用安装介质前提是已经安装AFCenter环境, 即已经部署完成了介质EOS_Platform_8.2LA2_Private_Medium_Application.tar.gz,或部署了独立的AFCenter环境。

微应用安装介质有两个:前端介质、后端介质 前端目录如下:

Primeton_MDM_7.1_LA_Console
├── dist
│   ├── assets
│   └── static
│   └── index.html //首页
│   └── remoteEntry.js
├── mdm.conf //nginx配置文件

后端目录如下

Primeton_MDM_7.1_LA_Server
├── bin //启动脚本
├── config //配置文件
├── db-scripts //部署db脚本
├── lib //数据库连接驱动jar
├── mdm-eos-boot-7.1.0-exec.jar //服务jar

替换许可文件

复制Primeton_MDM_7.1_LA_MicroApp\Primeton_MDM_7.1_LA_Server\config\MDM\license下primetonlicense.xml,替换server目录下的primetonlicense.xml   
注意事项:查看目录中文件config/MDM/license/primetonlicense.xml里, 看标签expiration与当前时间对比是否过期

创建数据库

创建mdm和mdm_pub两个数据库。执行如下脚本:

CREATE DATABASE `mdm` DEFAULT CHARACTER SET utf8mb4;
CREATE DATABASE `mdm_pub` DEFAULT CHARACTER SET utf8mb4;

执行初始化脚本

0.在已经安装的EOS_Platform_8.2LA2的数据库afcenter4eos82里,
初始化主数据的数据到库afcenter4eos82,执行如下脚本:

mdm/mysql/00-mdm-afc-data.sql

1.在已经安装的EOS_Platform_8.2LA2目录下server\afcenter\db-scripts\eos执行对应数据库厂商的sql脚本 执行对应:all.sql,如果afc和mdm的库不在同一个下,都需要初始化这里的eos的all.sql

2.mdm数据库初始化,执行如下脚本:

mdm/mysql/10-mdm-ddl.sql
mdm/mysql/11-mdm-data.sql

3.mdm_pub数据库初始化,执行如下脚本:

mdm/mysql/20-mdmpub-ddl.sql

连接redis

在已经启动的afcenter介质,获取到redis的相关配置:host、port、password

添加驱动

下载对应数据库厂商的驱动到文件夹lib

数据库厂商 驱动名 版本
mysql mysql-connector-java 8.0.17
oracle ojdbc6 11.2.0.3
dameng DmJdbcDriver18 8.1.1.193
openGauss opengauss-jdbc 9.1:901

后端修改配置文件

0.AFCenter配置文件config/application-mdm.properties 修改配置连接:afc.application.name=afc的ip:port

1.EOS配置文件:config/MDM/config/user-config.xml 修改两个数据源default与MDM_PUB配置(标签group):驱动DriverClass、Url、UserName、Password

        <group name="default">
            <configValue key="Database-Type">MySql</configValue># db类型
            <configValue key="Jdbc-Type"/>
            <configValue key="C3p0-DriverClass">com.mysql.cj.jdbc.Driver</configValue>#db驱动
            <configValue key="C3p0-Url">jdbc:驱动类型://IP:端口Port/mdm?useSSL=false</configValue>
            <configValue key="C3p0-UserName">用户名</configValue>
            <configValue key="C3p0-Password">密码</configValue>
            <configValue key="C3p0-PoolSize">5</configValue>
            <configValue key="C3p0-MaxPoolSize">30</configValue>
            <configValue key="C3p0-MinPoolSize">5</configValue>

            <!-- //seconds, 0 means connections never expire -->
            <configValue key="C3p0-MaxIdleTime">0</configValue>
            <!-- //idle connections never tested -->
            <configValue key="C3p0-IdleConnectionTestPeriod">0</configValue>
            <configValue key="C3p0-MaxStatements">0</configValue>
            <configValue key="C3p0-NumHelperThreads">3</configValue>

            <configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
            <configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
            <configValue key="Retry-Connect-Count">-1</configValue>
        </group>
        <group name="MDM_PUB">
            <configValue key="Database-Type">MySql</configValue># db类型
            <configValue key="Jdbc-Type"/>
            <configValue key="C3p0-DriverClass">com.mysql.cj.jdbc.Driver</configValue>#db驱动
            <configValue key="C3p0-Url">jdbc:驱动类型://IP:端口Port/库db/mdm_pub?useSSL=false</configValue>
            <configValue key="C3p0-UserName">用户名</configValue>
            <configValue key="C3p0-Password">密码</configValue>
            <configValue key="C3p0-PoolSize">5</configValue>
            <configValue key="C3p0-MaxPoolSize">30</configValue>
            <configValue key="C3p0-MinPoolSize">5</configValue>

            <!-- //seconds, 0 means connections never expire -->
            <configValue key="C3p0-MaxIdleTime">0</configValue>
            <!-- //idle connections never tested -->
            <configValue key="C3p0-IdleConnectionTestPeriod">0</configValue>
            <configValue key="C3p0-MaxStatements">0</configValue>
            <configValue key="C3p0-NumHelperThreads">3</configValue>

            <configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
            <configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
            <configValue key="Retry-Connect-Count">-1</configValue>
        </group>

2.主数据配置文件:config/application-mdm.properties

2.1 如果要更改端口,则修改
server.port=xxx
2.2 如果要更改db库厂商,则开放对应配置对应方言

## MySQL  
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect  
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DmDialect  
###GaussDB  
#spring.jpa.database=postgresql  
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect  
#spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false  
## Oracle  
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect  
## SQLServer  
# spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect  

2.3 推送email配置:换成自己的服务器配置spring.mail:host、username、password、protocol

#email  
spring.mail.host=smtp.126.com #邮件服务协议地址  
spring.mail.username=jianggangli@126.com #用来发送邮件的邮箱地址  
spring.mail.password=RNGFEHNEKHJHVKKB #邮箱密码  
spring.mail.protocol=smtp #协议  
spring.mail.default-encoding=UTF-8  

2.4 redis连接配置:换成以上获取到的redis的连接属性spring.redis:host、port、password
spring.redis.host=xxx #ip
spring.redis.port=6379 #port

#spring.redis.password=primeton #密码  

前端配置

根据EOS_Platform_8.2已配置eos8.conf的server,新增mdm的配置

server {
    listen 80;

    location /afc/api {
          proxy_set_header X-EOS-SourceSysKey dc6baaed30e541d78bb91274803d9432;
        proxy_pass http://eosgateway/afc/api ;
    }

    location / {
        root "/opt/idc/apps/eos-8.2-app/web/afcenter";
        access_log /opt/idc/apps/eos-8.2-app/web/afcenter/access.log ;
        error_log /opt/idc/apps/eos-8.2-app/web/afcenter/error.log warn;
        index  index.html index.htm;
        try_files $uri /index.html;
    }
    location /afc/mdm {# 固定不变
            proxy_pass      http://后端部署IP:端口Port/;# 根据主数据后端启动IP修改
    }
}
0.找到已经部署完的介质EOS_Platform_8.2的前端部署路径/web/afcenter
1.把介质Primeton_MDM_7.1_LA_Console里目录dist重命名成mdm,复制到介质EOS_Platform_8.2的前端资源\web\afcenter内
2.重启nginx:/usr/local/nginx/sbin/nginx -s restart

启动服务

linux:
1.重命名后端文件夹为mdm,并复制到已安装EOS_Platform_8.2部署server\目录,与afcenter同一级别目录
2.执行脚本:bin/startup.sh,并查看日志logs/eos-trace.log是否有错

windows:
1.重命名后端文件夹为mdm,并复制到已安装EOS_Platform_8.2部署server\目录,与afcenter同一级别目录
2.执行脚本:bin/startup.cmd,并查看日志logs/eos-trace.log是否有错

环境登录和验证

访问http://nginx机器IP:前端Port,使用初始用户登录,用户名/密码为:admin/000000

1.进入[组织权限中心]->[账号管理]->[账号:admin]
2.点击角色进行添加角色【主数据管理员】
3.刷新页面,看导航栏多出一个模块【主数据】,点击即可展示左侧主数据的菜单与主数据首页

results matching ""

    No results matching ""