Skip to content

Commit

Permalink
完成修改management port与management context path后的Spring Boot Admin与Turbin…
Browse files Browse the repository at this point in the history
…e的兼容
  • Loading branch information
prontera committed Mar 27, 2017
1 parent 45695a9 commit a7d5839
Show file tree
Hide file tree
Showing 13 changed files with 999 additions and 6 deletions.
12 changes: 11 additions & 1 deletion account-ms/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
server:
port: 8030
port: 10014
management:
port: 10248
context-path: '/78d504ff-82e8-4a87-82e8-724d72d1171b'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
spring:
application:
Expand Down
12 changes: 11 additions & 1 deletion api-gateway-ms/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
## SERVER
server:
port: 8000
port: 7291
management:
port: 10211
context-path: '/fb83deee-dd46-472b-99a9-f0ebffe20d0e'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
spring:
application:
Expand Down
11 changes: 11 additions & 0 deletions config-ms/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
server:
port: 10888
management:
port: 10481
context-path: '/f7597180-e480-400e-81a0-847c22e2e0b8'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
spring:
rabbitmq:
Expand Down Expand Up @@ -35,3 +45,4 @@ spring:
name: 'config-server'
encrypt:
key: '*&3loa#@9no_0*(!'

38 changes: 38 additions & 0 deletions config-ms/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>

<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<jmxConfigurator/>

<!-- 异步输出 -->
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
<discardingThreshold>0</discardingThreshold>
<!-- 更改默认的队列的深度,该值会影响性能.默认值为256 -->
<queueSize>512</queueSize>
<!-- 添加附加的appender,最多只能添加一个 -->
<appender-ref ref="FILE"/>
</appender>

<springProfile name="default">
<logger name="com.github.prontera" level="DEBUG"/>
</springProfile>
<springProfile name="dev">
<logger name="com.github.prontera" level="DEBUG"/>
</springProfile>
<springProfile name="test">
<logger name="com.github.prontera" level="DEBUG"/>
</springProfile>
<springProfile name="stag">
<logger name="com.github.prontera" level="WARN"/>
</springProfile>
<springProfile name="prod">
<logger name="com.github.prontera" level="WARN"/>
</springProfile>

<root level="WARN">
<!--<appender-ref ref="ASYNC"/>-->
<!--<appender-ref ref="FILE"/>-->
<appender-ref ref="CONSOLE"/>
</root>
</configuration>
848 changes: 848 additions & 0 deletions docker-gogs/share/gogs/log/gogs.log

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions eureka-registry-ms/src/main/resources/application-peer1.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
server:
port: ${port:${PORT:8763}}
management:
port: 9274
context-path: '/55395018-70b7-47c3-8fef-5bf24c9da9af'
eureka:
instance:
hostname: peer1
prefer-ip-address: false
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
client:
service-url:
defaultZone: 'http://peer2:8762/eureka/'
Expand Down
10 changes: 10 additions & 0 deletions eureka-registry-ms/src/main/resources/application-peer2.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
server:
port: ${port:${PORT:8762}}
management:
port: 10177
context-path: '/e5da837b-a575-4447-b037-100850226a11'
eureka:
instance:
hostname: peer2
prefer-ip-address: false
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/'
Expand Down
16 changes: 15 additions & 1 deletion hystrix-dashboard-ms/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
server:
port: 7001
port: 8193
management:
port: 7104
context-path: '/9511d89d-6488-4293-8df8-c4feb8681e83'
turbine:
app-config: account,gateway,order,product,tcc
aggregator:
clusterConfig: prontera
cluster-name-expression: metadata['cluster']
instanceUrlSuffix:
prontera: '/78d504ff-82e8-4a87-82e8-724d72d1171b/hystrix.stream'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
spring:
application:
name: hystrix
Expand Down
12 changes: 11 additions & 1 deletion order-ms/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
server:
port: 8080
port: 8295
management:
port: 10848
context-path: '/78d504ff-82e8-4a87-82e8-724d72d1171b'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
spring:
application:
Expand Down
11 changes: 10 additions & 1 deletion product-ms/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
server:
port: 8040
management:
port: 10912
context-path: '/78d504ff-82e8-4a87-82e8-724d72d1171b'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
spring:
application:
Expand Down Expand Up @@ -41,4 +51,3 @@ mybatis:
type-handlers-package: 'com.github.prontera.domain.type.handler'
mapper-locations: 'classpath*:mapper/**/*Mapper.xml'
type-aliases-package: 'com.github.prontera.domain'

10 changes: 10 additions & 0 deletions spring-boot-admin-ms/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
server:
port: 7020
management:
port: 9218
context-path: '/e58a0ff5-9f60-4545-9aa2-2b91c8a6d53b'
eureka:
client:
service-url:
Expand All @@ -8,6 +11,13 @@ eureka:
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
lease-renewal-interval-in-seconds: 10
spring:
Expand Down
10 changes: 10 additions & 0 deletions tcc-coordinator-ms/src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
server:
port: 11020
management:
port: 12841
context-path: '/78d504ff-82e8-4a87-82e8-724d72d1171b'
eureka:
client:
service-url:
defaultZone: 'http://peer1:8763/eureka/,http://peer2:8762/eureka/'
instance:
metadata-map:
cluster: prontera
management:
port: ${management.port}
context-path: ${management.context-path}
health:
path: ${management.context-path}/health
status-page-url-path: ${management.context-path}/info
health-check-url-path: ${management.context-path}/health
prefer-ip-address: false
spring:
application:
Expand Down
5 changes: 4 additions & 1 deletion zipkin-ms/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
server:
port: 9411
port: 9411
spring:
application:
name: zipkin-server

0 comments on commit a7d5839

Please sign in to comment.