diff options
| author | 刘永强 <[email protected]> | 2020-09-03 15:06:47 +0800 |
|---|---|---|
| committer | 刘永强 <[email protected]> | 2020-09-03 15:06:47 +0800 |
| commit | f1cff88261f8b04e610c8faacedd23c1822135c3 (patch) | |
| tree | 7fa7346dece7a393e65845d6e1dbd2a14404a0c7 | |
| parent | 537a0ab41972a5e71a229966e1de6173c9b2cf1c (diff) | |
update config file
| -rw-r--r-- | galaxy-job-admin/pom.xml | 13 | ||||
| -rw-r--r-- | galaxy-job-admin/src/main/resources/application.properties | 2 | ||||
| -rw-r--r-- | galaxy-job-executor/pom.xml | 19 | ||||
| -rw-r--r-- | galaxy-job-executor/src/main/resources/application.properties | 26 | ||||
| -rw-r--r-- | pom.xml | 6 |
5 files changed, 23 insertions, 43 deletions
diff --git a/galaxy-job-admin/pom.xml b/galaxy-job-admin/pom.xml index b4da79e..6a899b1 100644 --- a/galaxy-job-admin/pom.xml +++ b/galaxy-job-admin/pom.xml @@ -11,16 +11,6 @@ <artifactId>galaxy-job-admin</artifactId> <packaging>jar</packaging> - <properties> - <docker.build>192.168.40.153</docker.build> - <docker.build.port>2375</docker.build.port> - <!--docker-registry地址--> - <docker.registry>192.168.40.153</docker.registry> - <!--docker-registry的端口--> - <docker.registry.port>9080</docker.registry.port> - <docker.image.prefix>galaxy</docker.image.prefix> - </properties> - <dependencies> <!-- starter-web:spring-webmvc + autoconfigure + logback + yaml + tomcat --> @@ -86,6 +76,7 @@ <artifactId>spring-boot-starter-actuator</artifactId> </dependency> + <!--prometheus--> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> @@ -119,7 +110,7 @@ <imageName>${docker.registry}:${docker.registry.port}/${docker.image.prefix}/${project.artifactId} </imageName> <forceTags>true</forceTags> - <dockerHost>http://192.168.40.153:2375</dockerHost> + <dockerHost>http://${docker.build}:${docker.build.port}</dockerHost> <dockerDirectory>docker</dockerDirectory> <buildArgs> <JDK_IMAGE>192.168.40.153:9080/common/jdk:1.8.0_73</JDK_IMAGE> diff --git a/galaxy-job-admin/src/main/resources/application.properties b/galaxy-job-admin/src/main/resources/application.properties index 1982cf1..09d8bd5 100644 --- a/galaxy-job-admin/src/main/resources/application.properties +++ b/galaxy-job-admin/src/main/resources/application.properties @@ -76,6 +76,6 @@ eureka.client.registry-fetch-interval-seconds=5 eureka.instance.lease-renewal-interval-in-seconds=10 eureka.instance.health-check-url-path=/health eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator -eureka.client.serviceUrl.defaultZone=http://admin:admin@localhost:8501/eureka/ +eureka.client.serviceUrl.defaultZone=http://admin:[email protected]:8501/eureka/ eureka.instance.prefer-ip-address=true eureka.instance.instance-id=${spring.cloud.client.ip-address}:${server.port} diff --git a/galaxy-job-executor/pom.xml b/galaxy-job-executor/pom.xml index efeb08a..3c75a78 100644 --- a/galaxy-job-executor/pom.xml +++ b/galaxy-job-executor/pom.xml @@ -7,20 +7,10 @@ <artifactId>galaxy-job</artifactId> <version>1.0.0</version> </parent> - <modelVersion>4.0.0</modelVersion> <artifactId>galaxy-job-executor</artifactId> <packaging>jar</packaging> - - <properties> - <xxl-job-core.version>2.2.0</xxl-job-core.version> - <galaxy.version>1.0.4</galaxy.version> - <httpclient.version>4.5.6</httpclient.version> - <lombok.version>1.16.20</lombok.version> - </properties> - <dependencies> - <!-- spring-boot-starter-web (spring-webmvc + tomcat) --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> @@ -30,19 +20,16 @@ <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> - <dependency> <groupId>com.xuxueli</groupId> <artifactId>xxl-job-core</artifactId> <version>${xxl-job-core.version}</version> </dependency> - <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> - <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> @@ -73,17 +60,14 @@ </exclusion> </exclusions> </dependency> - <!--eureka-client--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> </dependency> - <!--starter-actuator--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> - <!-- starter-actuator --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> @@ -93,11 +77,9 @@ <artifactId>micrometer-registry-prometheus</artifactId> </dependency> </dependencies> - <build> <finalName>galaxy-job-executor</finalName> <plugins> - <!-- spring-boot-maven-plugin (提供了直接运行项目的插件:如果是通过parent方式继承spring-boot-starter-parent则不用此插件) --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> @@ -110,7 +92,6 @@ </execution> </executions> </plugin> - <plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> diff --git a/galaxy-job-executor/src/main/resources/application.properties b/galaxy-job-executor/src/main/resources/application.properties index b4a6430..18bc671 100644 --- a/galaxy-job-executor/src/main/resources/application.properties +++ b/galaxy-job-executor/src/main/resources/application.properties @@ -36,21 +36,23 @@ http.pool.max.per.route=200 http.pool.connect.timeout=30000 -### spring cloud eureka config -spring.application.name=galaxy-job-executor -eureka.client.registry-fetch-interval-seconds=5 -eureka.instance.lease-renewal-interval-in-seconds=10 -eureka.instance.health-check-url-path=/actuator/health -eureka.client.serviceUrl.defaultZone=http://admin:admin@localhost:8501/eureka/ -eureka.instance.prefer-ip-address=true -eureka.instance.instance-id=${spring.cloud.client.ip-address}:${server.port} - ### management config -management.server.servlet.context-path=/actuator management.health.mail.enabled=false management.endpoint.metrics.enabled=true management.endpoint.prometheus.enabled=true management.metrics.export.prometheus.enabled=true -management.metrics.tags.application=${spring.application.name} management.endpoints.web.exposure.include=* -management.endpoint.health.show-details=always
\ No newline at end of file +management.endpoint.health.show-details=always +management.server.servlet.context-path=/actuator +management.metrics.tags.application=${spring.application.name} + +### spring cloud eureka config +eureka.client.fetchRegistry=true +eureka.instance.prefer-ip-address=true +eureka.client.register-with-eureka=true +spring.application.name=galaxy-job-executor +eureka.client.registry-fetch-interval-seconds=5 +eureka.instance.lease-renewal-interval-in-seconds=10 +eureka.instance.health-check-url-path=/health +eureka.client.serviceUrl.defaultZone=http://admin:[email protected]:8501/eureka/ +eureka.instance.instance-id=${spring.cloud.client.ip-address}:${server.port}
\ No newline at end of file @@ -59,9 +59,15 @@ <gson.version>2.8.6</gson.version> <javax.annotation-api.version>1.3.2</javax.annotation-api.version> <spring.cloud.version>Hoxton.SR1</spring.cloud.version> + <docker.build>192.168.40.153</docker.build> + <docker.build.port>2375</docker.build.port> <docker.registry>192.168.40.153</docker.registry> <docker.registry.port>9080</docker.registry.port> <docker.image.prefix>galaxy</docker.image.prefix> + <xxl-job-core.version>2.2.0</xxl-job-core.version> + <galaxy.version>1.0.4</galaxy.version> + <httpclient.version>4.5.6</httpclient.version> + <lombok.version>1.16.20</lombok.version> </properties> <dependencyManagement> |
