安装部署

环境准备

  • 安装并启动 MySQL 5.7+

  • 初始化数据库 inlong-manager 目录下有 sql/apache_inlong_manager.sql文件,通过下述命令加载此文件,完成表结构及基础数据的初始化:

    1. # 通过用户名和密码,创建DB和表:
    2. mysql -uDB_USER -pDB_PASSWD < sql/apache_inlong_manager.sql

依赖

  • 如果后端连接 MySQL 数据库,请下载 mysql-connector-java-8.0.27.jar, 并将其放入 lib/ 目录。
  • 如果后端连接 PostgreSQL 数据库,不需要引入额外依赖。

配置

前往 inlong-manager 目录,修改 conf/application.properties 文件:

  1. # manager 服务的端口号
  2. server.port=8083
  3. # 默认使用的配置文件为 dev
  4. spring.profiles.active=dev

上面指定了 dev 配置,接下来修改 conf/application-dev.properties 文件:

  1. spring.datasource.druid.url=jdbc:mysql://127.0.0.1:3306/apache_inlong_manager?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&serverTimezone=GMT%2b8
  2. spring.datasource.druid.username=root
  3. spring.datasource.druid.password=inlong

InLong 支持 Manager 发起 Sort 任务进行数据分拣,需要先配置 Flink 环境信息。配置文件为plugins/flink-sort-plugin.properties.

  1. # Flink host split by coma if more than one host, such as 'host1,host2'
  2. flink.rest.address=127.0.0.1
  3. # Flink port
  4. flink.rest.port=8081
  5. # Flink jobmanager port
  6. flink.jobmanager.port=6123
  7. # InLong Audit Proxy Address
  8. metrics.audit.proxy.hosts=127.0.0.1:10081

启动

  1. bash +x bin/startup.sh

注册消息队列

  • 若使用InLong TubeMQ,注册命令为:
  1. curl --header "Content-Type: application/json" --request POST http://localhost:8083/api/inlong/manager/openapi/cluster/save --data '
  2. {
  3. "name": "tube_cluster",
  4. "type": "TUBE",
  5. "mqSetName": "default_set_name",
  6. "extParams": "{\"cluster_tube_manager\": \"127.0.0.1:8080\", \"tube_masterUrl\": \"127.0.0.1:8715\", \"cluster_tube_clusterId\": \"1\"}",
  7. "inCharges": "admin"
  8. }'
  • extParams: 集群配置信息,按照JSON格式设置,比如:
  1. {
  2. "cluster_tube_manager": "http://127.0.0.1:8081",
  3. "tube_masterUrl": "127.0.0.1:8715",
  4. "cluster_tube_clusterId": "1"
  5. }
  • 若使用Pulsar,注册命令为:
  1. curl --header "Content-Type: application/json" --request POST http://localhost:8083/api/inlong/manager/openapi/cluster/save --data '
  2. {
  3. "name": "pulsar_cluster",
  4. "type": "PULSAR",
  5. "url": "pulsar://pulsar:6650",
  6. "token": "null",
  7. "mqSetName": "default_set_name",
  8. "extParams": "{\"pulsar_adminUrl\": \"http://pulsar:8080\"}",
  9. "inCharges": "admin",
  10. "creator": "admin"
  11. }'
  • url为Pulsar集群的地址,形如pulsar://127.0.0.1:6650,127.0.0.1:6650,127.0.0.1:6650
  • pulsar_adminUrl为其它集群配置信息