All Projects → mesosphere → Marathon Client

mesosphere / Marathon Client

Licence: apache-2.0
Java Integration Library for Mesosphere Marathon

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Marathon Client

dcos-deploy
Deploy, manage and orchestrate services and apps on DC/OS
Stars: ✭ 21 (+40%)
Mutual labels:  dcos
net-modules
Apache Mesos modules for network isolation.
Stars: ✭ 56 (+273.33%)
Mutual labels:  dcos
Marathon Lb
Marathon-lb is a service discovery & load balancing tool for DC/OS
Stars: ✭ 449 (+2893.33%)
Mutual labels:  dcos
dcos-openvpn
No description or website provided.
Stars: ✭ 14 (-6.67%)
Mutual labels:  dcos
dcos-autoscaler
Autoscaler for DC/OS hosted in a cloud provider
Stars: ✭ 12 (-20%)
Mutual labels:  dcos
Universe
The Mesosphere Universe package repository.
Stars: ✭ 308 (+1953.33%)
Mutual labels:  dcos
container-orchestration
A Benchmark for Container Orchestration Systems
Stars: ✭ 19 (+26.67%)
Mutual labels:  dcos
Mesos Dns Pkg
Packaging utilities for Mesos-DNS
Stars: ✭ 16 (+6.67%)
Mutual labels:  dcos
drax
DC/OS Resilience Automated Xenodiagnosis tool
Stars: ✭ 42 (+180%)
Mutual labels:  dcos
Playa Mesos
Quickly build Mesos sandbox environments using Vagrant. Run apps on top!
Stars: ✭ 437 (+2813.33%)
Mutual labels:  dcos
spark-build
Used to build the mesosphere/spark docker image and the DC/OS Spark package
Stars: ✭ 51 (+240%)
Mutual labels:  dcos
terraform-dcos
DC/OS Terraform Installation and Upgrading Scripts
Stars: ✭ 64 (+326.67%)
Mutual labels:  dcos
Predator
A powerful open-source platform for load testing APIs.
Stars: ✭ 356 (+2273.33%)
Mutual labels:  dcos
dcos-vagrant-box
Vagrant box packer for building boxes for dcos-vagrant
Stars: ✭ 54 (+260%)
Mutual labels:  dcos
Mesos Dns
DNS-based service discovery for Mesos.
Stars: ✭ 481 (+3106.67%)
Mutual labels:  dcos
dcos-k8s-rust-skaffold-demo
A demo of pipelining Rust application development to Kubernetes on DC/OS with Skaffold.
Stars: ✭ 40 (+166.67%)
Mutual labels:  dcos
Artifactory Docker Examples
Examples for using Artifactory Docker distribution in various environments
Stars: ✭ 292 (+1846.67%)
Mutual labels:  dcos
Linkerdcosdockerfile
Linker Dcos DockerFile&DockerCompose yml file
Stars: ✭ 8 (-46.67%)
Mutual labels:  dcos
Kubernetes Mesos
A Kubernetes Framework for Apache Mesos
Stars: ✭ 640 (+4166.67%)
Mutual labels:  dcos
Marathon
Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
Stars: ✭ 4,035 (+26800%)
Mutual labels:  dcos

marathon-client

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

Using marathon-client in your maven project

Add marathon-client as a dependency:

For Marathon v1.x:

<dependency>
  <groupId>com.mesosphere</groupId>
  <artifactId>marathon-client</artifactId>
  <version>0.6.0</version>
</dependency>

For Marathon v0.x:

<dependency>
  <groupId>com.mesosphere</groupId>
  <artifactId>marathon-client</artifactId>
  <version>0.2.1</version>
</dependency>

Usage

Initialization

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

String endpoint = "<Marathon's endpoint>";
Marathon marathon = MarathonClient.getInstance(endpoint);

Getting all applications

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

GetAppsResponse appsResponse = marathon.getApps();

Create a new application

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

App app = new App();
app.setId("echohisleepbye-app");
app.setCmd("echo hi; sleep 10; echo bye;");
app.setCpus(1.0);
app.setMem(16.0);
app.setInstances(1);
marathon.createApp(app);

Get details about an existing application

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

GetAppResponse appGet = marathon.getApp("echohisleepbye-app");

Delete an application

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

marathon.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:

$ mvn clean install

Debugging / Logging

Feign is used as the underlying REST library. Sometimes it is useful to see the low level JSON and responses. It is possible to setup debug without directed to stdout or to a log file. This is simplified by set the environment variable DEBUG_JSON_OUTPUT to either a file name debug.log or to System.out.

Bugs

Bugs can be reported using Github issues.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].