• Stars
    star
    112
  • Rank 305,085 (Top 7 %)
  • Language
    Scala
  • License
    Apache License 2.0
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Apache Mesos framework for scheduled jobs

Metronome Issues

Metronome is an Apache Mesos framework for scheduled jobs.

Documentation

Metronome documentation is available on the Metronome Project Site or DC/OS documentation site.

Issue Tracking

Metronome issues are tracked as JIRA tickets in Mesosphere's on-premise JIRA instance that anyone is able to view and add to using GitHub SSO. If you create a ticket, please set component metronome.

Installation

The by far easiest way to get Metronome running is to use DC/OS.

Manual setup

Dependencies

When rolling the deployment of Metronome yourself make sure to align with the dependency on Marathon to match the version noted in the release notes of Metronome.

Download

Releases can be downloaded by finding out the version number and short commit hash from the github releases to form the url like

https://s3.amazonaws.com/downloads.mesosphere.io/metronome/builds/0.6.33-b28106a/metronome-0.6.33-b28106a.tgz

Installation

It is assumed that you have a running Mesos and Marathon setup. https://mesosphere.github.io/marathon/docs/ details how to setup Mesos and Marathon.

You can start Metronome via systemd after unarchiving the download to e.g. /opt/mesosphere/metronome

[Unit]
Description=Metronome
After=network.target
Wants=network.target
[Service]
EnvironmentFile=-/etc/sysconfig/metronome
ExecStart=/opt/mesosphere/metronome/bin/metronome
Restart=always
RestartSec=20
[Install]
WantedBy=multi-user.target

Configuration in the case of above systemd file happens via EnfironmentFile at /etc/sysconfig/metronome

# configure the url to reach zookeeper on your managers
METRONOME_ZK_URL=zk://manager0:2181,manager1:2181,manager2:2181/metronome
# configure the url to reach the mesos zookeeper state
METRONOME_MESOS_MASTER_URL=zk://manager0:2181,manager1:2181,manager2:2181/mesos
# in case you have configured mesos roles and/or authentication
# METRONOME_MESOS_ROLE=metronome
# METRONOME_MESOS_AUTHENTICATION_ENABLED=true
# METRONOME_MESOS_AUTHENTICATION_PRINCIPAL=metronome
METRONOME_MESOS_AUTHENTICATION_SECRET_FILE=/etc/mesos/metronome.secret
# configures url of Metronome web interface
METRONOME_WEB_UI_URL=127.0.0.1:9999/ui

Getting Started

Get familiar with Metronome with this step-by-step Getting Started guide.

API Reference

Consult the full Metronome REST API reference.

An unofficial Go client library, metronome-client has been created for the v1 API.

Contributing

We heartily welcome external contributions to Metronome's codebase and documentation. Please see our Contributor Guidelines.

Building from Source

To build Metronome from source, check out this repo and use sbt to build a universal package:

    git clone https://github.com/dcos/metronome.git
    cd metronome
    sbt universal:packageBin

Running in Development Mode

Mesos local mode allows you to run Metronome without launching a full Mesos cluster. It is meant for experimentation and not recommended for production use. Note that you still need to run ZooKeeper for storing state. The following command launches Metronome on Mesos in local mode.

sbt run

If you want to run Metronome against a real Mesos cluster, you can use the following command.

./run.sh

The script is already pre-filled with a default values for zookeeper and mesos running locally. You can specify your own like this:

./run.sh "zk://127.0.0.1:2181/metronome" "127.0.0.1:5050" "8989"

Example Job with Placement Constraint

{
   "id": "sample-job",
   "description": "A sample job that sleeps",
   "run": {
   "cmd": "sleep 1000",
   "cpus": 0.01,
   "mem": 32,
   "disk": 0,
   "placement": {
       "constraints": [
   	{
   	    "attribute": "hostname",
   	    "operator": "LIKE",
   	    "value": "<host-name>"
   	}
       ]
   }
   },
   "schedules": [
        {
            "id": "sample-schedule",
            "enabled": true,
            "cron": "0 0 * * *",
            "concurrencyPolicy": "ALLOW"
        }
    ]
}

This job will sleep every day at midnight and will land on the host defined by <host-name> which could be the hostname or IP of a node in the cluster. If you don't care where it lands in the cluster remove the placement element.

Help

Have you found an issue? Feel free to report it using our JIRA. Please set component metronome for issues related to Metronome. In order to speed up response times, please provide as much information on how to reproduce the problem as possible.

More Repositories

1

dcos

DC/OS - The Datacenter Operating System
Python
2,341
star
2

dcos-ui

The UI for The Datacenter Operating System
TypeScript
255
star
3

dcos-cli

The command line for DC/OS.
Go
224
star
4

lashup

A distributed CRDT store with multicast and failure detector capabilities
Erlang
210
star
5

examples

DC/OS examples
Shell
138
star
6

demos

Repository with DC/OS demos to show specific use cases, usually industry specific.
TSQL
102
star
7

dcos-e2e

Spin up and manage DC/OS clusters in test environments
Python
61
star
8

cosmos

Provides an API for the orderly, harmonious, and complete management of DC/OS service packages
Scala
58
star
9

dcos-net

A networking layer of DC/OS
Erlang
45
star
10

adminrouter

Nginx config running on the DCOS master servers to provide a proxy for the admin parts of the cluster
38
star
11

shakedown

DC/OS test harness
Python
29
star
12

dcos-ansible

Ansibles roles to manage a Mesosphere DC/OS clusters life cycle
Python
29
star
13

dcos-website

Source for the official DC/OS website
JavaScript
25
star
14

prometheus-alert-rules

22
star
15

dcos-oauth

DC/OS OAuth Service (only used up to DC/OS version 1.12)
Go
22
star
16

dcos-log

dcos-log: is a HTTP server for systemd journal events
Go
18
star
17

dcos-mesos-modules

Mesos Modules used in DC/OS
C++
17
star
18

dcos-go

DC/OS golang shared libraries
Go
15
star
19

dcos-launch

Turn-key deployments of DC/OS on AWS (template and onprem), Azure, and GCE
Python
15
star
20

grafana-dashboards

Official DC/OS Grafana dashboards
14
star
21

exhibitor

ZooKeeper co-process for instance monitoring, backup/recovery, cleanup and visualization.
Java
13
star
22

pve

Erlang
8
star
23

client-go

DC/OS Client for Go.
Go
7
star
24

dcos-test-utils

Utilities for testing and interacting with DC/OS services
Python
6
star
25

dcos-diagnostics

DC/OS Distributed Diagnostics Tool & Aggregation Service
Go
6
star
26

bouncer

The DC/OS identity and access management service (IAM)
Python
6
star
27

dcos-images

Repository is used to qualify DC/OS releases on multiple operating systems.
Shell
4
star
28

dcos-http-cli

HTTP requests against your DC/OS cluster!
Go
3
star
29

mesos_state

Erlang
3
star
30

raml-validator-loader

A webpack plugin that converts RAML rules into pure javascript-only validation routines
JavaScript
3
star
31

kminuteman

C
2
star
32

dcos-ui-update-service

DC/OS component responsible for updating dcos-ui served version
Go
2
star
33

dcos-core-cli

Core plugin for the DC/OS CLI
Python
2
star
34

dcos-cni

DC/OS specific CNI plugins.
Go
2
star
35

terraform-aws-spot-instance

HCL
2
star
36

sbt-dcos

An SBT plugin for common build settings of Scala projects in DC/OS.
Scala
2
star