Commit Graph

52 Commits

Author SHA1 Message Date
Biju Kunjummen
910167de09 Ribbon based on Eureka disabled, if Eureka client is not enabled (#1892)
Ribbon client configuration based on Eureka is disabled if eureka.client.enabed is set to false.

Fixes gh-335
2017-04-26 14:45:35 -04:00
Ryan Baxter
1f12902f78 Make sure the EurekaClient bean is recreated after refresh. Fixes #1857. 2017-04-19 11:29:33 -04:00
Michael Tecourt
03740f1369 Make EurekaDiscoveryClient.EurekaServiceInstance constructor public (#1794)
Make EurekaDiscoveryClient.EurekaServiceInstance constructor public

fixes gh-1792
2017-03-23 14:23:25 -04:00
windinn
129e0ce4b5 Use prefer-ip-address in statusPageUrlPath
prefer-ip-address does not work in statusPageUrlPath when management port != server port

This change gets `prefer-ip-address` via a relaxed property resolver to set the value during the creation of the `EurekaInstanceConfigBean`.

fixes gh-1724
2017-02-28 13:07:43 -05:00
utsman
c953d59b5a Refactor ZoneUtils class 2017-02-26 01:45:31 +09:00
Spencer Gibb
652fe97a1b fix logger 2017-02-20 13:54:54 -07:00
Spencer Gibb
601e220411 implement Registration.getServiceId() 2017-02-01 13:45:05 -07:00
Spencer Gibb
f27defbdf4 Make sure service-registry actuator is activated. 2017-01-25 15:15:46 -07:00
Spencer Gibb
41bf8eadfd Rename RESET_OVERRIDE to CANCEL_OVERRIDE 2017-01-25 14:23:34 -07:00
Spencer Gibb
c380039b3e Add test to make sure eureka.instance.*virtualHostName can be set properly. 2016-12-16 14:00:31 -07:00
Spencer Gibb
18b9c46a8b update eureka config first bootstrap for service registry 2016-12-12 10:43:05 -07:00
Spencer Gibb
5b25c9ad1a Only auto-register if conditions are correct.
s-c-commons creates an AutoServiceRegistrationProperties bean if enabled.

This commit only auto registers with eureka if that bean is available.
2016-12-08 12:27:10 -07:00
Spencer Gibb
1fe1ea58f6 Don't override values with defaults.
Defaults were set too late and were overriding values set in the environment.

Specifically, spring.application.name took precedence over eureka.instance.appname.

 fixes gh-1516
2016-11-30 11:55:57 -07:00
Spencer Gibb
b3f1a30027 Move initalizing appname, etc.. to afterPropertiesSet 2016-11-30 11:55:24 -07:00
Spencer Gibb
111a95d262 Fix Eureka Ribbon Auto Config conditions.
Specifically, add `@ConditionalOnBean(EurekaClient.class)`.

Fixes an issue where eureka and ribbon are on the classpath, eureka.client.enabled=false which would cause a bean not found exception.

fixes gh-1511

(cherry picked from commit d1f8c03)
2016-11-29 14:56:55 -07:00
Spencer Gibb
93cd1e7a4a Upgrade to eureka 1.6.0
fixes gh-1345
2016-11-07 10:52:47 -07:00
Spencer Gibb
ea4e5d76e0 Create EurekaServiceRegistry
Use the new ServiceRegistry interface

Creates a new EurekaRegistration object that aggregates classes needed
for a single registration.
2016-11-07 10:52:47 -07:00
Ryan Baxter
85b2fe37e2 Added some additional tests 2016-10-25 13:54:29 -04:00
Ryan Baxter
2dfee97563 Resolve spring.application.name value via a property resolver instead of @Value. Fixes #1398 2016-10-25 12:56:08 -04:00
Matthew Jenkins
4bf64f7005 Use statusPage/healthCheckUrlPath w/ custom management.port (#1349)
Use statusPage/healthCheckUrlPath w/ custom management.port

Added RelaxedPropertyResolver to handle multiple valid formats for
eureka properties.  Added tests.

Fixes gh-1348
2016-09-15 21:20:35 -04:00
Niklas Herder
62521f38e8 Fix lastFetch status calculation.
Was previously milliseconds/seconds when calculating whether to display the message about reporting failures.
2016-09-08 11:24:11 +02:00
Spencer Gibb
43adc84dfd Make moving to https urls consistent.
This fixes a case where the ribbon property is set `ribbon.IsSecure=false`, but because the eureka secure port was enabled, the uri created by ribbon was prefixed with https when it shouldn't have.

All places where isSecure is need have been consolidated into RibbonUtils.

fixes gh-1270
2016-08-22 17:16:13 -06:00
Dave Syer
58cf528463 Remove extra (redundant) condition
A problem in Spring Boot means that the extra conditions are combined
with OR not AND, so it's a bug to have more than one until that
gets fixed (in an AnyNestedCondition).

See https://github.com/spring-projects/spring-boot/pull/6672
2016-08-17 14:04:45 +01:00
Daniel Lavoie
6f32aa95a7 Migrate tests to Spring Boot Test 1.4
Fixes gh-1205
2016-07-22 00:54:48 +02:00
Spencer Gibb
7dc8b86001 Load ribbon classes if defined via properties.
Allows ribbon class name properties to be used to define beans.

This seems like boilerplate, but works, though not easily extensible.

fixes gh-927
2016-06-23 20:20:34 -06:00
Spencer Gibb
856c47138a Don't use deprecated constructor.
Eliminates a legacy use of a static singleton. This will help allow multiple registrations.
2016-06-20 18:27:12 -06:00
Spencer Gibb
6b1113e355 Remove condition for eureka healthcheck.
fixes gh-1051
2016-06-08 17:50:58 -06:00
Dave Syer
32d481df26 Be defensive about classpath in eureka auto config
Before this change we were seeing test failures in
spring-cloud-netflix-eureka-server (but only with Spring Boot 1.4)
caused by annotation processing explosion when
RefreshScopeAutoConfiguration is not on the classpath.
2016-05-16 12:46:03 +01:00
Dave Syer
6087bc755a Use eureka.instance zone data consistently determining client zone
The zone for a remote server comes from its
eureka.instance.metadataMap.zone, but we didn't (until this change)
apply the same logic to the client. If the client is registering
itslef with eureka then it will have a metadataMap itself and
we should be able to just reverse the logic.

Fixes gh-991
2016-04-27 09:10:42 +01:00
Andrei Sfat
1c3de94c42 Add slash to eureka.client.service-url
Makes use of StringUtils.commaDelimitedListToStringArray

Fixes gh-980
2016-04-26 12:14:52 +01:00
Andrei Sfat
9bd3a66b16 #920 add slash when eureka.client.service-url.defaultZone does not contain one 2016-04-26 12:14:41 +01:00
Tyler Van Gorder
05351b7809 Ribbon retry works & fix Content-Length error.
This change requires setting `ribbon.http.client.enabled=true`.

This change addresses issue #648 Getting Retry Working In RestTemplate. There is also a fix in place that addresses the issue #357 RestTemplate Error.

fixes gh-648
2016-04-07 16:15:03 -06:00
Spencer Gibb
c0d767351a Remove need for http basic auth client filter.
https://github.com/Netflix/eureka/releases/tag/v1.4.5

restores http basic auth.
2016-04-04 12:13:24 -06:00
Spencer Gibb
0b9ea25d86 Use config client default service id constant. 2016-04-04 11:53:12 -06:00
Spencer Gibb
1c4db22c28 Angel metadata.instanceId works with Brixton
Fixes gh-642
2016-04-01 13:02:43 -06:00
Spencer Gibb
60f4a5bc13 Move o.s.c.util to o.s.c.commons.util 2016-03-02 11:04:21 -07:00
Dave Syer
ca81f5671a Add HTTP basic back to Eureka client
Latest Eureka from Netflix uses a different HTTP client, and it
ignores the HTTP basic credentials in a service URL. This change
partially restores the old behaviour by providing an interceptor
(ClientFilter) that has a single, global username/password
taken from the first serviceUrl that contains credentials.

Fixes gh-849
2016-02-24 17:57:52 +00:00
Dave Syer
093354e231 Check if client is in bootstrap and default to not register
Eureka now has the option (maybe always there) to not register
and that's a sensible default in the bootstrap phase (when we
might not know the port yet).
2016-02-24 09:14:29 +00:00
Spencer Gibb
bfd4efcd94 Ignore EurekaHealthIndicator (boot) in EurekaHealthCheckHandler (eureka).
See corresponding change in s-c-commons 539a537abb

fixes gh-643
2016-02-22 17:01:57 -07:00
Spencer Gibb
c1704235b4 polish 2016-02-22 15:23:24 -07:00
Spencer Gibb
572220ae1f Default secureVirtualHostName to spring.application.name.
See gh-826
2016-02-22 14:04:53 -07:00
Spencer Gibb
86ac0127a5 Upgrade eureka to 1.4.1
Plus polish

fixes gh-836
2016-02-19 17:01:40 -07:00
Dave Syer
5b86b57771 Rename a test so it gets run in CI
Also does not rename another one because it fails (see gh-804). The
bug can be fixed in feign (https://github.com/Netflix/feign/pull/324),
and if that gets merged and released we can revert some of the recent
changes to the apache load balancer here.
2016-02-03 10:23:05 +00:00
Dave Syer
2e9ff4c7d7 Make eureka application manager @Lazy
So that it isn't instantated eagerly on startup by the RefreshScope.

Fixes gh-789
2016-01-29 13:13:30 +00:00
Dave Syer
3c5126c740 Consolidate tests and bootstrap config for config server 2016-01-25 11:43:11 +00:00
Dave Syer
dbb6059558 Simplify config server discovery with DiscoverClient metadata
Since DiscoverClient now supports metadata natively, we can use that and not rely
on Eureka interafces at all.

Fixes gh-787. Also fixes https://github.com/spring-cloud/spring-cloud-config/issues/302
2016-01-25 10:17:57 +00:00
Dave Syer
92a35ba77f Add explicit docs for eureka.hostname in secure app registration
Eureka supports native placeholders, but Spring can also be used.
Added some docs to show how more explicitly.

See gh-761
2016-01-24 08:29:55 +00:00
Spencer Gibb
ddd7979a25 Don't refresh the ipAddress if set by user config.
fixes gh-573
2016-01-20 13:52:58 -07:00
Spencer Gibb
0b9fc290d2 Upgrade eureka to 1.3.7
fixes gh-779
2016-01-19 17:18:50 -07:00
Dave Syer
a6e47a0b47 Ensure management.port defaults to server.port for eureka registration
Otherwise apps register the wrong health and status URLs by default. If
there is no explicit management.port we just need a default that is
the same as server.port.
2016-01-19 07:04:38 +00:00