AGG文档

dashboard server模式部署 #

存储模式为server模式,即通过调用server来实现存储操作。 另外此模式支持任务管理,需要配置quartz cluster数据库链接

前置条件 #

初始化quartz数据库脚本
server部署

安装并部署 #

下载最新RELEASE版本

linux/mac环境 #

创建dashboard目录

makdir dashboard 
cd  dashboard  

下载aggregate-framework-dashboard-xxx.tar.gz,解压到dashboard目录

dashboard % tar zxvf aggregate-framework-dashboard-4.0.0-SNAPSHOT.tar.gz
x conf/application.yaml
x lib/aggregate-framework-dashboard.jar
x conf/
x conf/logback.xml
x bin/
x bin/startup.sh
x bin/startup.cmd
x bin/shutdown.sh
x bin/shutdown.cmd
dashboard % tree
.
├── aggregate-framework-dashboard-4.0.0-SNAPSHOT.tar.gz
├── bin
│   ├── shutdown.cmd
│   ├── shutdown.sh
│   ├── startup.cmd
│   └── startup.sh
├── conf
│   ├── application.yaml
│   └── logback.xml
└── lib
    └── aggregate-framework-dashboard.jar

3 directories, 8 files
dashboard % 

conf/application.yaml配置详见

启动dashboard

sh bin/startup.sh

停止dashboard

sh bin/shutdown.sh

windows环境 #

  • 创建dashboard目录。
  • 下载aggregate-framework-dashboard-xxx.zip,到dashboard目录,并解压。
  • 双击bin/startup.cmd,启动dashboard。
  • 双击bin/shutdown.cmd,停止dashboard。

打开dashbaord #

默认地址为:http://localhost:22332/aggregate-framework-dashboard 默认用户名密码: admin/123456 首页

注册中心 #

server模式下,需要和server服务交互。
注意: dashboard选择nacos或者zookeeper注册中心,前提是server端以对应的注册中心来暴露。
这里提供了三种server服务发现的方式:

  • direct(默认)
  • nacos
  • zookeeper

direct(默认) #

application.yaml可如下配置

server:
  servlet:
    context-path: /aggregate-framework-dashboard
  port: 22332

logging:
  level:
    root: info
spring:
  application:
    name: aggregate-framework-dashboard
  resources:
    static-locations: classpath:templates/
    chain:
      cache: false
  freemarker:
    enabled: true
    cache: false
    charset: UTF-8
    suffix: .html
    check-template-location: true
    template-loader-path: classpath:/templates/
  agg:
    dashboard:
      userName: admin
      password: 123456
      connection-mode: server
    registry:
      registry-type: direct
      registry-role: dashboard
      direct:
        addresses-for-dashboard: localhost:12332
    recovery:
      recovery-enabled: false
      quartz-clustered: true
      quartz-data-source-url: jdbc:mysql://localhost:3306/AGG_SERVER?useSSL=false&allowPublicKeyRetrieval=true
      quartz-data-source-driver: com.mysql.jdbc.Driver
      quartz-data-source-user: root
      quartz-data-source-password: welcome1
feign:
  path: /aggregate-framework-server

nacos #

需要安装nacos
application.yaml可如下配置

server:
  servlet:
    context-path: /aggregate-framework-dashboard
  port: 22332

logging:
  level:
    root: info
spring:
  application:
    name: aggregate-framework-dashboard
  resources:
    static-locations: classpath:templates/
    chain:
      cache: false
  freemarker:
    enabled: true
    cache: false
    charset: UTF-8
    suffix: .html
    check-template-location: true
    template-loader-path: classpath:/templates/
  agg:
    dashboard:
      userName: admin
      password: 123456
      connection-mode: server
    registry:
      registry-type: nacos
      registry-role: dashboard
      nacos:
        server-addr: localhost:8848
    recovery:
      recovery-enabled: false
      quartz-clustered: true
      quartz-data-source-url: jdbc:mysql://localhost:3306/AGG_SERVER?useSSL=false&allowPublicKeyRetrieval=true
      quartz-data-source-driver: com.mysql.jdbc.Driver
      quartz-data-source-user: root
      quartz-data-source-password: welcome1
feign:
  path: /aggregate-framework-server

zookeeper #

需要安装zookeeper
application.yaml可如下配置

server:
  servlet:
    context-path: /aggregate-framework-dashboard
  port: 22332

logging:
  level:
    root: info
spring:
  application:
    name: aggregate-framework-dashboard
  resources:
    static-locations: classpath:templates/
    chain:
      cache: false
  freemarker:
    enabled: true
    cache: false
    charset: UTF-8
    suffix: .html
    check-template-location: true
    template-loader-path: classpath:/templates/
  agg:
    dashboard:
      userName: admin
      password: 123456
      connection-mode: server
    registry:
      registry-type: zookeeper
      registry-role: dashboard
      zookeeper:
        connect-string: localhost:2181
    recovery:
      recovery-enabled: false
      quartz-clustered: true
      quartz-data-source-url: jdbc:mysql://localhost:3306/AGG_SERVER?useSSL=false&allowPublicKeyRetrieval=true
      quartz-data-source-driver: com.mysql.jdbc.Driver
      quartz-data-source-user: root
      quartz-data-source-password: welcome1
feign:
  path: /aggregate-framework-server