存储模式为embedded模式,支持存储类型有redis、jdbc、rocksdb、memory等
安装部署如下:
下载最新RELEASE版本
创建dashboard目录
makdir dashboard
cd dashboard
下载tcc-transaction-dashboard-xxx.tar.gz,解压到dashboard目录
dashboard % tar zxvf tcc-transaction-dashboard-2.0.0.tar.gz
x conf/application.yaml
x lib/tcc-transaction-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
.
├── bin
│ ├── shutdown.cmd
│ ├── shutdown.sh
│ ├── startup.cmd
│ └── startup.sh
├── conf
│ ├── application.yaml
│ └── logback.xml
├── lib
│ └── tcc-transaction-dashboard.jar
└── tcc-transaction-dashboard-2.0.0.tar.gz
3 directories, 8 files
dashboard %
conf/application.yaml配置详见
启动dashboard
sh bin/startup.sh
默认地址为:http://localhost:22332/tcc-transaction-dashboard
默认用户名密码: admin/123456
当前支持的存储类型有
dashboard embedded模式下存储类型为memory,实际意义不大,不过可以方便演示dashboard基本功能
application.yaml可如下配置
server:
servlet:
context-path: /tcc-transaction-dashboard
port: 22332
logging:
level:
root: info
spring:
application:
name: tcc-transaction-dashboard
tcc:
dashboard:
connection-mode: embedded
storage:
storage-type: memory
application.yaml可使用存储类型可以如下配置
server:
servlet:
context-path: /tcc-transaction-dashboard
port: 22332
logging:
level:
root: info
spring:
application:
name: tcc-transaction-dashboard
tcc:
dashboard:
connection-mode: embedded
storage:
storage-type: rocksdb
下载mysql脚本 application.yaml可使用存储类型可以如下配置
spring:
tcc:
dashboard:
connection-mode: embedded
storage:
storage-type: jdbc
jdbc:
driver-class: com.mysql.jdbc.Driver
jdbc-url: jdbc:mysql://127.0.0.1:3306/TCC?useSSL=false&connectTimeout=1000&socketTimeout=5000
username: root
password: welcome1
application.yaml可使用存储类型可以如下配置
server:
servlet:
context-path: /tcc-transaction-dashboard
port: 22332
logging:
level:
root: info
spring:
application:
name: tcc-transaction-dashboard
tcc:
dashboard:
connection-mode: embedded
storage:
storage-type: redis
redis:
host: 127.0.0.1
port: 6379
database: 0
pool-config:
max-total: 100
max-idle: 100
min-idle: 10
max-wait-millis: 300
application.yaml可使用存储类型可以如下配置
server:
servlet:
context-path: /tcc-transaction-dashboard
port: 22332
logging:
level:
root: info
spring:
application:
name: tcc-transaction-dashboard
tcc:
dashboard:
connection-mode: embedded
storage:
storage-type: shard_redis
shard-redis:
nodes:
- host: 127.0.0.1
port: 6379
- host: 127.0.0.1
port: 6380
- host: 127.0.0.1
port: 6381
redis集群搭建可参考 application.yaml可使用存储类型可以如下配置
server:
servlet:
context-path: /tcc-transaction-dashboard
port: 22332
logging:
level:
root: info
spring:
application:
name: tcc-transaction-dashboard
tcc:
dashboard:
connection-mode: embedded
storage:
storage-type: redis_cluster
redis-cluster:
max-attempts: 5
so-timeout: 300
connection-timeout: 1000
nodes:
- host: 127.0.0.1
port: 6379
- host: 127.0.0.1
port: 6380
- host: 127.0.0.1
port: 6381