- package add
- package list
- package describe
- package delete
- schedule add
- schedule list
- schedule describe
- schedule delete
- job submit
- job list
- job describe
- job cancel
Add a package to a repo.
package add
--package-name <value>
--package-version <value>
--package-repo <value>
--package-name
The name of the package to add to the repo.
--package-version
The version of the package to add to the repo.
--package-repo
The repo to add the package to.
List packages.
package list
[--package-type <value>]
[--package-repo <value>]
--package-type
Filter by type of package.
Possible values:
job
service
--package-repo
Filter by package repo.
package-name
The name of the package.
package-version
The version of the package.
package-type
The type of package.
Possible values:
jobs
services
package-repo
The repo the package is registered with.
package-definition
The URI of the package definition.
{
"packages": [
{
"package-name": "backup-cassandra",
"package-version": "3",
"package-type": "job",
"package-repo": "repo-1",
"package-definition": "package://repo-1/backup-cassandra:3"
}
]
}
Describe a package.
package describe
--package-name <value>
--package-version <value>
--package-repo <value>
--package-name
The name of the package to describe.
--package-version
The version of the package to describe.
--package-repo
The repo the package is registered with.
(pacakge definition)
Delete a package from a repo.
package delete
--package-name <value>
--package-version <value>
--package-repo <value>
--package-name
The name of the package to delete.
--package-version
The version of the package to delete.
--package-repo
The repo to delete the package from.
Add a job schedule.
schedule add
--schedule-name <value>
--schedule-options <value>
--job-name <value>
--job-definition <value>
[--job-options <value>]
--job-queue <value>
--schedule-name
The name of the job schedule.
--schedule-options (json)
The parameters of the job schedule.
--job-name
The name of the job the job schedule submits.
--job-definition
The definition of the job the job schedule submits.
--job-options
The parameters of the job the job schedule submits.
--job-queue
The job queue the job scheduler submits the job to.
List job schedules.
schedule list
--job-queue <value>
[--job-name <value>]
--job-queue
The job queue to query.
--job-name
Filter by the name of the job the schedule submits.
schedule-name
The name of the job schedule.
job-name
The name of the job the job schedule submits.
next-submit-at
The next time the job schedule will submit the job.
last-submit-at
The most recent time the job schedule submitted the job.
last-status
The status of the most recent job submittion.
Possible values:
- SUBMITTED
- PENDING
- RUNNABLE
- RUNNING
- SUCCEEDED
- FAILED
- CANCELLED
last-succeeded-at
The most recent time the scheduled job returned SUCCEEDED.
last-failed-at
The most recent time the scheduled job returned FAILED.
schedule-enabled
If the job schedule is enabled.
Possible values:
TRUE
FALSE
{
"schedules": [
{
"schedule-name": "backup-dev-cassandra",
"job-name": "backup-dev-cassandra",
"last-status": "SUCCEEDED",
"last-submit-at": 14804813016253,
"next-submit-at": 14804919726301,
"last-succeeded-at": 148048193241,
"last-failed-at": 148028638541,
"schedule-enabled": "TRUE"
}
]
}
Describe a job schedule.
schedule describe
--schedule-name <value>
--job-queue <value>
--schedule-name
The name of the job schedule to describe.
--job-queue
The job queue to query.
schedule-name
The name of the schedule.
schedule-description
A description of the schedule.
schedule-format
The format of the schedule.
Possible values:
cron
iso8601
schedule
The schedule.
schedule-enabled
If the schedule is enabled.
Possible values:
TRUE
FALSE
--job-name
The name of the job the job schedule submits.
--job-definition
The definition of the job the job schedule submits.
--job-options
The parameters of the job the job schedule submits.
{
"schedules": [
{
"schedule-name": "nightly-dev-cassandra-backup",
"schedule-description": "Nightly job to backup of dev cassandra cluster to S3.",
"schedule-format": "cron",
"schedule": "0 4 * * *",
"schedule-enabled": "TRUE",
"job-name": "backup-dev-cassandra",
"job-definition": "package://repo-1/backup-cassandra:3",
"job-options": {
"cassandra-nodes": "cassandra-node-1.thisdcos.dcos:9042,cassandra-node-2.thisdcos.dcos:9042",
"backup-user": "user://eng/dev/cassandra-backup-user",
"backup-secret": "secret://eng/dev/cassandra-backup-secret",
"backup-target": "s3://mesosphere.aws.com/backups/dev-cassandra"
}
}
]
}
Delete a job schedule.
schedule delete
--schedule-name <value>
--schedule-name
The name of the job schedule to delete.
Submit a job to a job queue.
job submit
--job-name <value>
--job-definition <value>
[--job-options <value>]
--job-queue <value>
--job-name
The name for the job.
--job-definition
The definition for the job.
Possible URI schemes:
package://[repo]/<package-name>:<package-version>
file://[path]/<job-definition>
http://<host>[:port][/path]/<job-definition>
https://<host>[:port][/path]/<job-definition>
--job-options
Parameters for the job.
--job-queue
The job queue for the job.
job-id
The unique identifier of the job.
List jobs.
job list
--job-queue <value>
[--job-status <value>]
--job-queue
The job queue.
--job-status
Filter by the status of the job.
Possible values:
- SUBMITTED
- PENDING
- RUNNABLE
- RUNNING
- SUCCEEDED
- FAILED
- CANCELLED
job-name
The name of the job.
job-id
The unique identifier for the job.
status
The status of the job.
Possible values:
- SUBMITTED
- PENDING
- RUNNABLE
- RUNNING
- SUCCEEDED
- FAILED
- CANCELLED
service-account
The service account for the job.
submitted-at
The time the job was submitted.
started-at
The time the job started.
ended-at
The time the job ended.
attempts
The number of job attempts.
{
"jobs": [
{
"job-name": "backup-dev-cassandra",
"job-id": "48172167-3e3f-4e18-bae5-0fb6ee5e7728",
"status": "SUCCEEDED",
"service-account": "backup-user",
"submitted-at": 1480481301253,
"started-at": 1480481313993,
"ended-at": 148048193241,
"attempts": 2
},
{
"job-name": "etl-logs-to-hdfs",
"job-id": "48172167-3e3f-4e18-bae5-0fb6ee5e7728",
"status": "FAILED",
"service-account": "backup-user",
"submitted-at": 1521556785556,
"started-at": 1521556785556,
"ended-at": 152155692321,
"attempts": 5
},
{
"job-name": "train-credit-risk-model",
"job-id": "70dfed04-17c3-4dab-99a4-84a99a3bf89a",
"status": "RUNNING",
"service-account": "backup-user",
"submitted-at": 1521556785556,
"started-at": 1521556882351,
"attempts": 1
},
{
"job-name": "train-checking-risk-model",
"job-id": "70dfed04-17c3-4dab-99a4-84a99a3bf89a",
"status": "RUNNABLE",
"service-account": "backup-user",
"submitted-at": 1521556785556
}
]
}
Description of a job.
job describe
--job-id <value>
--job-queue <value>
--job-id
The unique identifier of the job to describe.
--job-queue
The job queue of the job to describe.
job-name
The name of the job.
job-id
The unique identifier for the job.
status
The status of the job.
Possible values:
- SUBMITTED
- PENDING
- RUNNABLE
- RUNNING
- SUCCEEDED
- FAILED
- CANCELLED
service-account
The service account for the job.
submitted-at
The time the job was submitted.
started-at
The time the job started.
ended-at
The time the job ended.
attempts
The number of job attempts.
{
"jobs": [
{
"status": "SUCCEEDED",
"job-name": "backup-dev-cassandra",
"job-id": "48172167-3e3f-4e18-bae5-0fb6ee5e7728",
"job-definition": "package://repo-1/backup-cassandra:3",
"job-options": {
"backup-user": "backup-account",
"backup-secret": "secret://eng/dev/backup-secret",
"backup-target": "s3://mesosphere.aws.com/backup/dev-cassandra-1"
},
"depends-on": [
{
"job-name": "send-backup-event-to-pager-duty",
"job-id": "9595e4aa-3c5a-4ad7-935a-1f983b9ec918"
}
],
"submitted-by": "schedule://scheduler-1.thisdcos.dcos/eng/dev/nightly-cassandra-backup",
"submitted-at": 1480481301253,
"started-at": 1480481313993,
"ended-at": 148048193241,
"attempts": [
{
"attempt": 1,
"attempt-id": "96cde48b-fea9-46c0-b3fc-7b4dc9b282e5",
"status": "FAILED",
"started-at": 1480481313993,
"ended-at": 1480481317000
},
{
"attempt": 2,
"attempt-id": "2de9c6ae-0662-4a67-ae7f-838ec45baadb",
"status": "SUCCEEDED",
"started-at": 1480481317001,
"ended-at": 148048193241
}
]
}
]
}
Cancel a job.
job cancel
--job-id <value>
--job-id
The unique identifier for the job.
-
SUBMITTED The job that has been submitted to the job queue.
-
PENDING The job resides in the job queue and is not yet able to run due to a dependency on another job.
-
RUNNABLE The job has its dependencies defined and waiting to run.
-
RUNNING The job is running.
-
SUCCEEDED The job has finished and exited with code 0.
-
FAILED The job has failed on all attempts and exited with non-zero code.
-
CANCELLED The job was cancelled by a user.
Flo builds a job-package and submits to Universe (Mesosphere hosted public package-repo)
Dan adds Flo’s job-package to his private package-registry by ...
Step 1: Downloading the job-package from Universe
Step 2: Adding to private package-repo
Dan builds his own job-package and adds to private package-repo.
Boris registers a job-definition from ...
Boris schedules a job from...
Boris runs an ad-hoc job from...
Misc: