Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/144 remove the spring cloud config dependency in admin #158

Merged
merged 10 commits into from
Nov 9, 2021
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# - a CoatRack build requires some mail configuration parameters to be set
# - the configuration values in this file are just dummy/fallback values for development builds

mvn clean package -Dygg.mail.sender.user="" -Dygg.mail.sender.password="" -Dygg.mail.server.url="" -Dygg.mail.server.port=0 -Dygg.mail.sender.from="" -Dygg.proxy.executable-jar.template.url="" -Dygg.proxy.executable-jar.generated.path=""
mvn clean package
2 changes: 1 addition & 1 deletion run-admin-web-application.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ if [ ! -z $1 ]; then
VM_ARG_SPRING_PROFILE="-Dspring.profiles.active=$1"
fi

java -jar $VM_ARG_SPRING_PROFILE -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y -Dygg.mail.sender.user=$2 -Dygg.mail.sender.password=$3 $COATRACK_JAR_FILE
java -jar $VM_ARG_SPRING_PROFILE -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Dygg.mail.sender.user=$2 -Dygg.mail.sender.password=$3 $COATRACK_JAR_FILE

9 changes: 0 additions & 9 deletions spring-boot/admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@
<artifactId>org.eclipse.jgit</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
Expand All @@ -109,11 +105,6 @@
<artifactId>spring-security-oauth2</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-oauth2</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
Expand Down
106 changes: 89 additions & 17 deletions spring-boot/admin/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,101 @@

mvn.pom.project.version: @@project.version@@

# user and password are expected to be for a gmail account
ygg.mail.verification.server.url: http://localhost:8080

logging:
level:
org.springframework.security: INFO
nl.corizon.ygg: DEBUG

# Necessary in order to run offline
ygg.admin.database.insertSampleDataOnStartup: true
ygg.admin.gettingStarted.consumer.testService.id: 1
ygg.admin.gitService.url: http://localhost
ygg.admin.gitService.user: user
ygg.admin.gitService.password: password
ygg.admin.api-base-url-for-gateway: http://localhost
ygg.proxy.executable-jar.path: path
ygg.proxy.executable-jar.filename-original-prefix: prefix
ygg.proxy.executable-jar.filename-custom.prefix: prefix
ygg.proxy.executable-jar.filename-custom.suffix: suffix
ygg.proxy.generate-bootstrap-properties.spring.application.name.prefix: prefix
ygg.proxy.generate-bootstrap-properties.spring.cloud.config.uri: http://localhost
ygg:
mail:
server:
url: "smtp.serviciodecorreo.es"
port: 465
sender:
from: "coatrack@kyoe.es"
user: ""
password: ""
verification.server.url: http://localhost:8080

admin:
database.insertSampleDataOnStartup: true
server:
url: http://localhost:8080
servicecovers:
path: /tmp
url: http://localhost/coatrack-servicecovers/
payment.commision:
variable: 50
fix: 1
bookKeeping.contact: fperezduran@bebr.nl
call-request-fee: 0

gettingStarted.consumer.testService.id: 1
perezdf marked this conversation as resolved.
Show resolved Hide resolved
gitService:
url: http://localhost
gr-hovest-atb marked this conversation as resolved.
Show resolved Hide resolved
user: user
password: password
api-base-url-for-gateway: http://localhost
perezdf marked this conversation as resolved.
Show resolved Hide resolved

gettingStarted:
consumer:
testService:
# the following two elements are required to load the test service for getting started wizard
provider.username: BrunoSilvaATB
uriIdentifier: getting-started-service-consumer
proxy:
executable-jar:
generated.path: /tmp
template.url: https://www.kyoe.es/proxies/coatrack-proxy-2.0.0-SNAPSHOT.jar
perezdf marked this conversation as resolved.
Show resolved Hide resolved
path: path
filename-original-prefix: prefix
perezdf marked this conversation as resolved.
Show resolved Hide resolved
filename-custom:
prefix: coatrack-gateway-
suffix: suffix
perezdf marked this conversation as resolved.
Show resolved Hide resolved
generate-bootstrap-properties:
spring.application.name.prefix: prefix
perezdf marked this conversation as resolved.
Show resolved Hide resolved
spring.cloud.config.uri: http://localhost
perezdf marked this conversation as resolved.
Show resolved Hide resolved
server.port.defaultValue: 8088

# Necessary to define the threshold times to display different
# status (warning and critical) on the Gateway Health Monitor
ygg.gateway-health-monitor.warning.threshold.minutes: 5
ygg.gateway-health-monitor.critical.threshold.minutes: 60
ygg.gateway-health-monitor:
warning.threshold.minutes: 5
critical.threshold.minutes: 60

spring:
data:
rest:
base-path: /api

spring.application.name: ygg-admin

# Still require for the service generated proxies, maybe we can consider the idea to rename the property in order to not confuse
spring.cloud.config:
username: admin
password: password
uri: https://config.coatrack.eu


security:
oauth2:
client:
clientId: e188a243cc57ef90f2b5
perezdf marked this conversation as resolved.
Show resolved Hide resolved
clientSecret: a5630e2f873890bdc8366aac0155e8113ece0997
perezdf marked this conversation as resolved.
Show resolved Hide resolved
accessTokenUri: https://github.com/login/oauth/access_token
userAuthorizationUri: https://github.com/login/oauth/authorize
tokenName: oauth_token
# send client id/secret to Github as ...
#clientAuthenticationScheme: form # form fields
clientAuthenticationScheme: header # headers
# send oauth token to Github as ...
authenticationScheme: header # header
#authenticationScheme: query # query parameter
scope:
- user:email
- read:user
resource:
userInfoUri: https://api.github.com/user

management.security.enabled: false
7 changes: 0 additions & 7 deletions spring-boot/admin/src/main/resources/bootstrap.properties

This file was deleted.