Skip to content

Releases: aatarasoff/spring-cloud-marathon

Finchley.SR1, improvements and fixes

Choose a tag to compare

@aatarasoff aatarasoff released this 11 Oct 08:55

Move to Finchley.SR1

Zones support, matching by service labels and performance improvements

Choose a tag to compare

@aatarasoff aatarasoff released this 10 May 20:20

Matching only by labels

Ignore the service id entirely and only match using service labels:

customer:
    ribbon:
      <your settings here>
      IgnoreServiceId: true
      MetaDataFilter:
        CUSTOMER_ENTITY: V1
        ENVIRONMENT: UAT

i.e. select any service in the UAT environment that supports Version 1 of the Customer Entity.
Note: The service id of 'customer' is ignored, so all services will be filtered by service label

New equality based selectors

Specify equality based selector on service labels

customer:
    ribbon:
    <your settings here>
    MetaDataFilter:
      API_VERSION: '!=V3'  # not equal to V3; note: must be quoted to keep yaml happy
      ENVIRONMENT: '==DEV' # equal to DEV; note: must be quoted to keep yaml happy
      CUSTOMER_ENTITY: V1  # equal to V1; default is equals

Specify set based selector on service labels

customer:
    ribbon:
    <your settings here>
    MetaDataFilter:
      API_VERSION: in(V1,V2)       # is V1 OR is V2
      ENVIRONMENT: notin(UAT,PROD) # is not UAT AND is not PROD

Zones

Zones support is provided by fetching them from instance's hostname. For example, mesos slaves have hostname like following:

slave1.dc1
slave2.dc1
slave1.dc2
...

There is regexp pattern .+\.(.+) for fetching zone (or datacenter) exists. So, you could define it in service configuration:

customer:
    ribbon:
      <your settings here>
      ZonePattern: '.+\.(.+)'

Finally, you should define zone for app:

spring.cloud.marathon.discovery.zone: dc1

And then different zone-aware filters and rules will be applied.

Service Labels support

Choose a tag to compare

@aatarasoff aatarasoff released this 03 May 16:27

Sometimes it is useful discover services that are advertising a specific capability; by API version for example:
Three versions of a service have been deployed, with the following Marathon service ids and labels:

/group1/path/app  "labels":{ "API_VERSION" : "V1" }
/group2/path/app  "labels":{ "API_VERSION" : "V2" }
/group3/path/app  "labels":{ "API_VERSION" : "V2" }

A client is configured to expect the "V2" API Version:

app:
    ribbon:
        <your settings are here>
        MetaDataFilter:
            API_VERSION: V2

Only service instances that contain "app" in the service id and have matching labels will be discovered & used by ribbon.

Where multiple values are specified for MetaDataFilter, all values must match service labels before ribbon will use the service instance:

app:
    ribbon:
        <your settings are here>
        MetaDataFilter:
            API_VERSION: V2
            ENVIRONMENT: UAT
            APPLICATION_OWNER: fred.bloggs@company.com

Combining the loose service id matching with service label filtering permits us to get creative with service discovery:

group.path:
    ribbon:
        <your settings are here>
        MetaDataFilter:
            CUSTOMER_ENTITY: V1

i.e. select any service deployed to /group/path that supports Version 1 of the Customer Entity

Thanks to @tegataiprime

Token authentication support

Choose a tag to compare

@aatarasoff aatarasoff released this 04 Apr 20:15

New token authentication.

Provide a HTTP API token (note: tokens expire after 5 days). Specify a load balanced endpoint or listOfServers that describe the Marathon Endpoint. e.g.

spring:
    cloud:
        marathon:
            listOfServers: m1:8080,m2:8080,m3:8080       #list of marathon masters
            token: <dcos_acs_token>                      #DC/OS HTTP API Token (optional)

Thanks to @tegataiprime

Fix bug: unused basic auth interceptor

Choose a tag to compare

@aatarasoff aatarasoff released this 13 Jan 07:49

During Marathon client building BasicAuthRequestInterceptor was not used

Add multiply Marathon hosts support

Choose a tag to compare

@aatarasoff aatarasoff released this 13 Jan 07:51

Add listOfServers property:

spring:
    cloud:
        marathon:
            endpoint: http://marathon   #this overrides host and port options
            listOfServers: m1:8080,m2:8080,m3:8080   #list of marathon masters

Also starter was upgraded to latest Spring Cloud stable version.

Actuator endpoint and healthcheck endpoint are added

Choose a tag to compare

@aatarasoff aatarasoff released this 13 Jan 07:53
Release of 0.3.0

- d3d70c071987e3b12848312922a090b3bdda7cff: fix conflicts
- 62c8f882974003adaf7f950e6704efa1e09c205b: merge
- 68564a0631d5fdfc87a67a689d49b73318b1462c: add marathon endpoint to actuator
- 5b1151adce9cd8d0572c611ddcfe5b89a0269c58: AbstractHealthIndicator has been implemented (#5)
- bccd9fe4f50f32679f082dca65141887f95b83f4: some fixes
- 6f903a7baa9444d73e7c07ddf1ba238290701734: AbstractHealthIndicator has been implemented