cloudbees/marathon-client

Name: marathon-client

Owner: CloudBees

Description: Java API client for Mesosphere's Marathon.

Created: 2015-07-21 16:32:01.0

Updated: 2016-01-18 09:47:06.0

Pushed: 2016-06-23 09:07:50.0

Homepage:

Size: 117

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

marathon-client Build Status

This project is a Java library for communicating with Marathon API. At this point this library supports version v2 of Marathon API, please refer docs for more details.

Using marathon-client in your maven project

Add marathon-client as a dependency:

endency>
roupId>com.github.mohitsoni</groupId>
rtifactId>marathon-client</artifactId>
ersion>0.4.2</version>
pendency>

Please look at releases page for more versions.

Usage
Initialization

The following piece of code initializes the client. `MarathonClient.getInstance()` method expects the endpoint for marathon:

ng endpoint = "<Marathon's endpoint>";
thon marathon = MarathonClient.getInstance(endpoint);
Getting all applications

The following will return all the applications that have been created:

ppsResponse appsResponse = marathon.getApps();
Create a new application

The following example demonstrates how a new application can be created:

app = new App();
setId("echohisleepbye-app");
setCmd("echo hi; sleep 10; echo bye;");
setCpus(1.0);
setMem(16.0);
setInstances(1);
thon.createApp(app);
Get details about an existing application

The following example, demostrates how to get details about an already created application:

ppResponse appGet = marathon.getApp("echohisleepbye-app");
Delete an application

The following example demostrate, how one can delete an existing application:

thon.deleteApp("echohisleepbye-app");
Building

This project is built using Apache Maven.

Run the following command from the root of repository, to build the client JAR:

n clean install
Bugs

Bugs can be reported using Github issues.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.