Adds spring cloud config client to the test-runner microservice to support externalizing configuration. This will come in handy once we deploy to the cloud and need to manage configuration easily.
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that will change exisiting functionality)
[ ] Documentation update
Description
Add spring-cloud-starter-config dependency + spring-cloud-dependencies dependency manager. (Simplifies things for eureka later)
Updates actuator endpoints to also include refresh: Allows to refresh configuration just by hitting an endpoint.
Added the @RefreshScope annotation on Swagger config class. Annotation can be used anywhere updateable config values are injected. (We'll add the @RefreshScope elsewhere as needed down the line)
Added bootstrap.yml files to local spring cloud config details for connecting with the config server (bootstrap is loaded before application files)
Motivation/Links
This supports the DevOps principle of externalizing configuration in applications. With this we can securly pull configuration from the config server when deploying to the cloud. It also allows refreshing of the configuration on-the-fly instead of having to redeploy.
How was this tested?
Automated tests pass. Also manually tested connection between microservice & config server works. Automated intergration tests to follow.
Todos
[x] Ensure unit tests pass
[ ] Update documentation for changes (if necessary)
Overview
Similar to https://github.com/puffproject/course-management/pull/17.
Adds spring cloud config client to the test-runner microservice to support externalizing configuration. This will come in handy once we deploy to the cloud and need to manage configuration easily.
Uses the config server microservice: https://github.com/puffproject/config-server With the test-runner configuration values in https://github.com/puffproject/cloud-configuration
This change is a
Description
refresh
: Allows to refresh configuration just by hitting an endpoint.@RefreshScope
annotation on Swagger config class. Annotation can be used anywhere updateable config values are injected. (We'll add the @RefreshScope elsewhere as needed down the line)Motivation/Links
This supports the DevOps principle of externalizing configuration in applications. With this we can securly pull configuration from the config server when deploying to the cloud. It also allows refreshing of the configuration on-the-fly instead of having to redeploy.
How was this tested?
Automated tests pass. Also manually tested connection between microservice & config server works. Automated intergration tests to follow.
Todos