Browse Source

🎉 增加turbine集群监控服务

test
smallchill 5 years ago
parent
commit
932793e138
  1. 52
      blade-ops/blade-turbine/pom.xml
  2. 39
      blade-ops/blade-turbine/src/main/java/org/springblade/trubine/TurbineApplication.java
  3. 17
      blade-ops/blade-turbine/src/main/resources/bootstrap.yml
  4. 1
      blade-ops/pom.xml
  5. 2
      pom.xml

52
blade-ops/blade-turbine/pom.xml

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>2.1.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-turbine</artifactId>
<dependencies>
<!--Blade-->
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-common</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-launch</artifactId>
<version>${bladex.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-tool</artifactId>
<version>${bladex.tool.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-cloud</artifactId>
<version>${bladex.tool.version}</version>
<exclusions>
<exclusion>
<groupId>org.springblade</groupId>
<artifactId>blade-core-secure</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
</dependencies>
</project>

39
blade-ops/blade-turbine/src/main/java/org/springblade/trubine/TurbineApplication.java

@ -0,0 +1,39 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package org.springblade.trubine;
import org.springblade.core.launch.BladeApplication;
import org.springblade.core.launch.constant.AppConstant;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.turbine.EnableTurbine;
/**
* Turbine启动器
*
* @author Chill
*/
@EnableTurbine
@EnableHystrixDashboard
@SpringCloudApplication
public class TurbineApplication {
public static void main(String[] args) {
BladeApplication.run(AppConstant.APPLICATION_TURBINE_NAME, TurbineApplication.class, args);
}
}

17
blade-ops/blade-turbine/src/main/resources/bootstrap.yml

@ -0,0 +1,17 @@
server:
port: 7003
undertow:
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
io-threads: 4
# 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载
worker-threads: 20
# 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理
buffer-size: 1024
# 是否分配的直接内存
direct-buffers: true
turbine:
app-config: blade-auth,blade-flow,blade-desk,blade-system,blade-user,blade-log
aggregator:
cluster-config: default
cluster-name-expression: new String("default")

1
blade-ops/pom.xml

@ -21,6 +21,7 @@
<module>blade-flow-design</module>
<module>blade-log</module>
<module>blade-resource</module>
<module>blade-turbine</module>
</modules>
</project>

2
pom.xml

@ -31,7 +31,7 @@
<alibaba.cloud.version>2.1.0.RELEASE</alibaba.cloud.version>
<spring.boot.version>2.1.8.RELEASE</spring.boot.version>
<spring.boot.version>2.1.9.RELEASE</spring.boot.version>
<spring.cloud.version>Greenwich.SR3</spring.cloud.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>

Loading…
Cancel
Save