From 606bfe7022354dd094d2f2c8c2725ade6c457fcc Mon Sep 17 00:00:00 2001 From: Pivotal Date: Tue, 18 Sep 2018 09:11:39 -0400 Subject: [PATCH] Adds config server --- .../src/main/resources/application.properties | 3 --- .../src/main/resources/bootstrap.properties | 1 + .../src/main/resources/application.properties | 3 --- .../src/main/resources/bootstrap.properties | 1 + .../src/main/resources/application.properties | 3 --- .../src/main/resources/bootstrap.properties | 1 + applications/server.gradle | 8 +++++++- .../src/main/resources/application.properties | 3 --- .../src/main/resources/bootstrap.properties | 1 + .../pivotal/pal/tracker/support/ApplicationServer.java | 1 + manifest-allocations.yml | 5 ++--- manifest-backlog.yml | 5 ++--- manifest-registration.yml | 3 +-- manifest-timesheets.yml | 3 +-- 14 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 applications/allocations-server/src/main/resources/bootstrap.properties create mode 100644 applications/backlog-server/src/main/resources/bootstrap.properties create mode 100644 applications/registration-server/src/main/resources/bootstrap.properties create mode 100644 applications/timesheets-server/src/main/resources/bootstrap.properties diff --git a/applications/allocations-server/src/main/resources/application.properties b/applications/allocations-server/src/main/resources/application.properties index 2814636..f108008 100644 --- a/applications/allocations-server/src/main/resources/application.properties +++ b/applications/allocations-server/src/main/resources/application.properties @@ -1,9 +1,6 @@ -spring.application.name=allocations-server - server.port=8081 spring.datasource.username=tracker spring.datasource.url=jdbc:mysql://localhost:3306/tracker_allocations_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false -registration.server.endpoint=http://registration-server security.oauth2.resource.token-info-uri=http://localhost:8999/oauth/check_token security.oauth2.client.access-token-uri=http://localhost:8999/oauth/token diff --git a/applications/allocations-server/src/main/resources/bootstrap.properties b/applications/allocations-server/src/main/resources/bootstrap.properties new file mode 100644 index 0000000..5cdf061 --- /dev/null +++ b/applications/allocations-server/src/main/resources/bootstrap.properties @@ -0,0 +1 @@ +spring.application.name=allocations-server \ No newline at end of file diff --git a/applications/backlog-server/src/main/resources/application.properties b/applications/backlog-server/src/main/resources/application.properties index c610f5a..c6b3e09 100644 --- a/applications/backlog-server/src/main/resources/application.properties +++ b/applications/backlog-server/src/main/resources/application.properties @@ -1,9 +1,6 @@ -spring.application.name=backlog-server - server.port=8082 spring.datasource.username=tracker spring.datasource.url=jdbc:mysql://localhost:3306/tracker_backlog_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false -registration.server.endpoint=http://registration-server security.oauth2.resource.token-info-uri=http://localhost:8999/oauth/check_token security.oauth2.client.access-token-uri=http://localhost:8999/oauth/token diff --git a/applications/backlog-server/src/main/resources/bootstrap.properties b/applications/backlog-server/src/main/resources/bootstrap.properties new file mode 100644 index 0000000..76e0a5f --- /dev/null +++ b/applications/backlog-server/src/main/resources/bootstrap.properties @@ -0,0 +1 @@ +spring.application.name=backlog-server \ No newline at end of file diff --git a/applications/registration-server/src/main/resources/application.properties b/applications/registration-server/src/main/resources/application.properties index d924afa..117bd54 100644 --- a/applications/registration-server/src/main/resources/application.properties +++ b/applications/registration-server/src/main/resources/application.properties @@ -1,8 +1,5 @@ -spring.application.name=registration-server - server.port=8083 spring.datasource.username=tracker spring.datasource.url=jdbc:mysql://localhost:3306/tracker_registration_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false -registration.server.endpoint=http://registration-server security.oauth2.resource.token-info-uri=http://localhost:8999/oauth/check_token \ No newline at end of file diff --git a/applications/registration-server/src/main/resources/bootstrap.properties b/applications/registration-server/src/main/resources/bootstrap.properties new file mode 100644 index 0000000..cd0bf98 --- /dev/null +++ b/applications/registration-server/src/main/resources/bootstrap.properties @@ -0,0 +1 @@ +spring.application.name=registration-server \ No newline at end of file diff --git a/applications/server.gradle b/applications/server.gradle index 579691e..5e1cbd8 100644 --- a/applications/server.gradle +++ b/applications/server.gradle @@ -14,6 +14,7 @@ dependencies { compile "org.springframework.boot:spring-boot-starter-actuator" compile "io.pivotal.spring.cloud:spring-cloud-services-starter-service-registry" compile "io.pivotal.spring.cloud:spring-cloud-sso-connector:$springCloudSsoVersion" + compile "io.pivotal.spring.cloud:spring-cloud-services-starter-config-client" compile "com.zaxxer:HikariCP:2.3.7" compile "mysql:mysql-connector-java:$mysqlVersion" @@ -27,5 +28,10 @@ bootRun.environment([ "SECURITY_OAUTH2_CLIENT_CLIENT_ID": "tracker-client", "SECURITY_OAUTH2_CLIENT_CLIENT_SECRET": "supersecret", "SECURITY_USER_NAME": "actuator", - "SECURITY_USER_PASSWORD": "operations4red" + "SECURITY_USER_PASSWORD": "operations4red", + "REGISTRATION_SERVER_ENDPOINT": "http://registration-server" +]) + +test.environment([ + "REGISTRATION_SERVER_ENDPOINT": "http://registration-server" ]) \ No newline at end of file diff --git a/applications/timesheets-server/src/main/resources/application.properties b/applications/timesheets-server/src/main/resources/application.properties index 02f62be..6e7ef16 100644 --- a/applications/timesheets-server/src/main/resources/application.properties +++ b/applications/timesheets-server/src/main/resources/application.properties @@ -1,9 +1,6 @@ -spring.application.name=timesheets-server - server.port=8084 spring.datasource.username=tracker spring.datasource.url=jdbc:mysql://localhost:3306/tracker_timesheets_dev?useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false -registration.server.endpoint=http://registration-server security.oauth2.resource.token-info-uri=http://localhost:8999/oauth/check_token security.oauth2.client.access-token-uri=http://localhost:8999/oauth/token diff --git a/applications/timesheets-server/src/main/resources/bootstrap.properties b/applications/timesheets-server/src/main/resources/bootstrap.properties new file mode 100644 index 0000000..6208b2d --- /dev/null +++ b/applications/timesheets-server/src/main/resources/bootstrap.properties @@ -0,0 +1 @@ +spring.application.name=timesheets-server \ No newline at end of file diff --git a/integration-test/src/test/java/test/pivotal/pal/tracker/support/ApplicationServer.java b/integration-test/src/test/java/test/pivotal/pal/tracker/support/ApplicationServer.java index ae87da0..2a39ee9 100644 --- a/integration-test/src/test/java/test/pivotal/pal/tracker/support/ApplicationServer.java +++ b/integration-test/src/test/java/test/pivotal/pal/tracker/support/ApplicationServer.java @@ -41,6 +41,7 @@ public void startWithDatabaseName(String dbName) throws IOException, Interrupted .put("RIBBON_EUREKA_ENABLED", "false") .put("APPLICATION_OAUTH_ENABLED", "false") .put("REGISTRATION_SERVER_RIBBON_LISTOFSERVERS", "http://localhost:8883") + .put("REGISTRATION_SERVER_ENDPOINT", "http://registration-server") .build() ); } diff --git a/manifest-allocations.yml b/manifest-allocations.yml index 94660cd..6a652f7 100644 --- a/manifest-allocations.yml +++ b/manifest-allocations.yml @@ -8,10 +8,9 @@ applications: env: spring.profiles.active: cloud GRANT_TYPE: client_credentials - SECURITY_USER_NAME: actuator - SECURITY_USER_PASSWORD: operations4red services: - tracker-allocations-database - tracker-service-registry - tracker-circuit-breaker-dashboard - - tracker-sso \ No newline at end of file + - tracker-sso + - tracker-config-server \ No newline at end of file diff --git a/manifest-backlog.yml b/manifest-backlog.yml index 7dd5c15..fce8ef6 100644 --- a/manifest-backlog.yml +++ b/manifest-backlog.yml @@ -8,10 +8,9 @@ applications: env: spring.profiles.active: cloud GRANT_TYPE: client_credentials - SECURITY_USER_NAME: actuator - SECURITY_USER_PASSWORD: operations4red services: - tracker-backlog-database - tracker-service-registry - tracker-circuit-breaker-dashboard - - tracker-sso \ No newline at end of file + - tracker-sso + - tracker-config-server \ No newline at end of file diff --git a/manifest-registration.yml b/manifest-registration.yml index 73fa4ce..a11a6a4 100644 --- a/manifest-registration.yml +++ b/manifest-registration.yml @@ -8,9 +8,8 @@ applications: env: spring.profiles.active: cloud GRANT_TYPE: client_credentials - SECURITY_USER_NAME: actuator - SECURITY_USER_PASSWORD: operations4red services: - tracker-registration-database - tracker-service-registry - tracker-sso + - tracker-config-server diff --git a/manifest-timesheets.yml b/manifest-timesheets.yml index d71b13a..306dc42 100644 --- a/manifest-timesheets.yml +++ b/manifest-timesheets.yml @@ -8,10 +8,9 @@ applications: env: spring.profiles.active: cloud GRANT_TYPE: client_credentials - SECURITY_USER_NAME: actuator - SECURITY_USER_PASSWORD: operations4red services: - tracker-timesheets-database - tracker-service-registry - tracker-circuit-breaker-dashboard - tracker-sso + - tracker-config-server