Giter Club home page Giter Club logo

marathon-scaler's Introduction

marathon-scaler

Simple bash script calling Mesos for slave count, and then scaling given Marathon services to the same count. Suitable for log collection, monitoring services etc. that need one service instance per slave. Run with a scheduling tool (Chronos, Metronome) on your Mesos or DC/OS cluster.

Services, that are scaled like this, need to have the hostname:UNIQUE constraint on their Marathon descriptor, and they need to accept all slave types:

"constraints": [
    [
        "hostname",
        "UNIQUE"
    ]
],
"acceptedResourceRoles": [
    "slave_public", "*"
],

Unfortunately even the above skips Mesos master nodes, so if something needs to be collected from them it needs a manual installation.

Works with both local copy of JQ, or JQ from $PATH. Mesos agents might not have Jq installed, but it can be copied in with Mesos URI fetcher. Sample Chronos setup that does this:

{
    "schedule": "R/2016-01-01T10:13:00Z/PT10M",
    "name": "scale-per-node-services",
    "owner": "[email protected]",
    "cpus": "0.05",
    "mem": "40",
    "uris": [
        "https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64",
        "https://raw.githubusercontent.com/armadainteractive/marathon-scaler/master/scale.sh"
    ],
    "command": "mv jq-linux64 jq && chmod +x jq scale.sh && ./scale.sh http://leader.mesos:5050 http://marathon.mesos:8080 logspout,dogstatsd"
}

marathon-scaler's People

Contributors

teelahti avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

marathon-scaler's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.