{"id":13740204,"url":"https://github.com/dcos/metronome","last_synced_at":"2025-04-23T05:31:43.977Z","repository":{"id":10026150,"uuid":"58449744","full_name":"dcos/metronome","owner":"dcos","description":"Apache Mesos framework for scheduled jobs","archived":false,"fork":false,"pushed_at":"2022-10-05T22:47:19.000Z","size":13123,"stargazers_count":111,"open_issues_count":29,"forks_count":35,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-08-04T04:06:18.515Z","etag":null,"topics":["dcos","dcos-orchestration-guild"],"latest_commit_sha":null,"homepage":"https://dcos.github.io/metronome/","language":"Scala","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcos.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-10T09:55:12.000Z","updated_at":"2024-06-17T20:08:28.000Z","dependencies_parsed_at":"2022-08-31T08:11:56.420Z","dependency_job_id":null,"html_url":"https://github.com/dcos/metronome","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fmetronome","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fmetronome/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fmetronome/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcos%2Fmetronome/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcos","download_url":"https://codeload.github.com/dcos/metronome/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223909905,"owners_count":17223592,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dcos","dcos-orchestration-guild"],"created_at":"2024-08-03T04:00:44.393Z","updated_at":"2024-11-10T04:14:39.468Z","avatar_url":"https://github.com/dcos.png","language":"Scala","funding_links":[],"categories":["大数据","Frameworks"],"sub_categories":["Spring Cloud框架","Service/Meta Schedulers/ PaaS"],"readme":"# Metronome [![Issues](https://img.shields.io/badge/Issues-JIRA-ff69b4.svg?style=flat)](https://jira.mesosphere.com/issues/?jql=project%20%3D%20DCOS_OSS%20AND%20component%20%3D%20metronome)\n\nMetronome is an [Apache Mesos](http://mesos.apache.org) framework for scheduled jobs.\n\n\n## Documentation\n\nMetronome documentation is available on the [Metronome Project Site](https://dcos.github.io/metronome/) or [DC/OS documentation site](https://dcos.io/docs/1.10/deploying-jobs/).\n\n\n## Issue Tracking\nMetronome issues are tracked as JIRA tickets in Mesosphere's [on-premise JIRA instance](https://jira.mesosphere.com/issues/?jql=project%20%3D%20DCOS_OSS%20AND%20component%20%3D%20metronome) that anyone is able to view and add to using GitHub SSO. If you create a ticket, please set component `metronome`.\n\n\n## Installation\n\nThe by far easiest way to get Metronome running is to use DC/OS.\n\n### Manual setup\n\n#### Dependencies\n\nWhen rolling the deployment of Metronome yourself make sure to align with the dependency on [Marathon](https://github.com/mesosphere/marathon) to match the version noted in the release notes of Metronome.\n\n#### Download\n\nReleases can be downloaded by finding out the version number and short commit hash from the [github releases](https://github.com/dcos/metronome/releases) to form the url like\n\n`https://s3.amazonaws.com/downloads.mesosphere.io/metronome/builds/0.6.33-b28106a/metronome-0.6.33-b28106a.tgz`\n\n#### Installation\n\nIt is assumed that you have a running Mesos and Marathon setup. https://mesosphere.github.io/marathon/docs/ details how to setup Mesos and Marathon.\n\nYou can start Metronome via systemd after unarchiving the download to e.g. `/opt/mesosphere/metronome`\n\n```\n[Unit]\nDescription=Metronome\nAfter=network.target\nWants=network.target\n[Service]\nEnvironmentFile=-/etc/sysconfig/metronome\nExecStart=/opt/mesosphere/metronome/bin/metronome\nRestart=always\nRestartSec=20\n[Install]\nWantedBy=multi-user.target\n```\n\nConfiguration in the case of above systemd file happens via EnfironmentFile at `/etc/sysconfig/metronome`\n\n```\n# configure the url to reach zookeeper on your managers\nMETRONOME_ZK_URL=zk://manager0:2181,manager1:2181,manager2:2181/metronome\n# configure the url to reach the mesos zookeeper state\nMETRONOME_MESOS_MASTER_URL=zk://manager0:2181,manager1:2181,manager2:2181/mesos\n# in case you have configured mesos roles and/or authentication\n# METRONOME_MESOS_ROLE=metronome\n# METRONOME_MESOS_AUTHENTICATION_ENABLED=true\n# METRONOME_MESOS_AUTHENTICATION_PRINCIPAL=metronome\nMETRONOME_MESOS_AUTHENTICATION_SECRET_FILE=/etc/mesos/metronome.secret\n# configures url of Metronome web interface\nMETRONOME_WEB_UI_URL=127.0.0.1:9999/ui\n```\n\n\n## Getting Started\n\nGet familiar with Metronome with this step-by-step [Getting Started](https://dcos.io/docs/1.10/deploying-jobs/) guide.\n\n## API Reference\n\nConsult the full [Metronome REST API reference](http://dcos.github.io/metronome/docs/generated/api.html).\n\nAn unofficial Go client library, [metronome-client](https://github.com/mindscratch/metronome-client) has been created for the v1 API.\n\n## Contributing\n\nWe heartily welcome external contributions to Metronome's codebase and documentation.\nPlease see our [Contributor Guidelines](https://dcos.github.io/metronome/docs/contributing.html).\n\n\n### Building from Source\n\nTo build Metronome from source, check out this repo and use sbt to build a universal package:\n\n        git clone https://github.com/dcos/metronome.git\n        cd metronome\n        sbt universal:packageBin\n\n### Running in Development Mode\n\nMesos local mode allows you to run Metronome without launching a full Mesos\ncluster. It is meant for experimentation and not recommended for production\nuse. Note that you still need to run ZooKeeper for storing state. The following\ncommand launches Metronome on Mesos in *local mode*.\n\n    sbt run\n\nIf you want to run Metronome against a real Mesos cluster, you can use the following command.\n\n    ./run.sh\n\nThe script is already pre-filled with a default values for zookeeper and mesos running locally. You can specify your own like this:\n\n    ./run.sh \"zk://127.0.0.1:2181/metronome\" \"127.0.0.1:5050\" \"8989\"\n\n\n ## Example Job with Placement Constraint\n\n ```\n {\n    \"id\": \"sample-job\",\n    \"description\": \"A sample job that sleeps\",\n    \"run\": {\n\t\"cmd\": \"sleep 1000\",\n\t\"cpus\": 0.01,\n\t\"mem\": 32,\n\t\"disk\": 0,\n\t\"placement\": {\n\t    \"constraints\": [\n\t\t{\n\t\t    \"attribute\": \"hostname\",\n\t\t    \"operator\": \"LIKE\",\n\t\t    \"value\": \"\u003chost-name\u003e\"\n\t\t}\n\t    ]\n\t}\n    },\n    \"schedules\": [\n         {\n             \"id\": \"sample-schedule\",\n             \"enabled\": true,\n             \"cron\": \"0 0 * * *\",\n             \"concurrencyPolicy\": \"ALLOW\"\n         }\n     ]\n}\n ```\n This job will sleep every day at midnight and will land on the host defined by `\u003chost-name\u003e` 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`\nelement.\n\n## Help\n\nHave you found an issue? Feel free to report it using our [JIRA](https://jira.mesosphere.com/issues/?jql=project%20%3D%20DCOS_OSS%20AND%20component%20%3D%20metronome). Please set component `metronome` for issues related to Metronome.\nIn order to speed up response times, please provide as much information on how to reproduce the problem as possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcos%2Fmetronome","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcos%2Fmetronome","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcos%2Fmetronome/lists"}