This project helps with integration between Spring Cloud and Marathon framework for Apache Mesos
Add jcenter
repository:
repositories {
jcenter()
}
And add dependency with latest version (or feel free to choose specific)
compile 'info.developerblog.spring.cloud:spring-cloud-marathon-starter:+'
Spring Cloud DiscoveryClient
implementation (supports Ribbon and Zuul)
Build sample application docker image:
./gradlew dockerBuild
Install native docker on Linux or docker-beta on MacOS X or Windows and run docker-compose
:
docker-compose up -d
Then upload test-marathon-app-manifest.json
as application manifest:
curl -XPOST http://localhost:8080/v2/apps?force=true -H "Content-Type: application/json" --data-binary @test-marathon-app-manifest.json -v
and run the example application:
./gradlew bootRun
Add following record into your /etc/hosts
file:
127.0.0.1 mesos-slave
and test application by curl:
curl localhost:9090/instances
curl localhost:9090/feign