https://github.com/eunmin/marathon-clj
Clojure client library for Mesos Marathon
https://github.com/eunmin/marathon-clj
marathon
Last synced: 8 months ago
JSON representation
Clojure client library for Mesos Marathon
- Host: GitHub
- URL: https://github.com/eunmin/marathon-clj
- Owner: eunmin
- License: epl-1.0
- Created: 2017-02-08T09:20:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-19T04:58:12.000Z (almost 9 years ago)
- Last Synced: 2025-10-21T20:59:04.802Z (8 months ago)
- Topics: marathon
- Language: Clojure
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# marathon-clj
Clojure client library for Mesos Marathon
https://mesosphere.github.io/marathon/docs/rest-api.html
## Usage
[](http://clojars.org/marathon-clj)
```clojure
(require 'marathon-clj.core)
(def client {:url "http://localhost:8080"
:basic-auth ["user" "password"]})
(def app {:constraints [["hostname" "UNIQUE"]]
:mem 50
:healthChecks
[{:gracePeriodSeconds 3
:intervalSeconds 10
:maxConsecutiveFailures 3
:path "/"
:portIndex 0
:protocol "HTTP"
:timeoutSeconds 5}]
:ports [0]
:instances 2
:upgradeStrategy
{:minimumHealthCapacity 0.5
:maximumOverCapacity 0.5}
:container
{:docker {:image "python:3"}, :type "DOCKER"}
:cmd "env && python3 -m http.server $PORT0"
:cpus 0.25})
(create-app client "my-app" app)
(get-app client "my-app")
(update-app client "my-app" {:cmd "sleep 55"
:constraints [["hostname" "UNIQUE" ""]]
:cpus "0.3"
:instances "2"
:mem "9"
:ports [9000]})
;; Example version rollback
(update-app client "my-app" {:version "2014-03-01T23:17:50.295Z"})
(restart-app client "my-app")
```
## License
Copyright © 2017 Eunmin Kim
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.