npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

marathon-validate

v0.3.3

Published

A tiny command line tool to validate application or group configuration files for Marathon

Downloads

10

Readme

marathon-validate

A tiny command line tool to validate application or group configuration files for Marathon and DC/OS.

Purpose

If you're running a Mesos or DC/OS cluster and build custom applications for if, most of the time you'll have to create either a Marathon app definition JSON file, or a group definition JSON file.

As the structure of these files can get a little complicated, marathon-validate was created to be able to do a quick sanity check of these files from the command line.

Therefore, marathon-validate will use the JSON schema files contained in the Marathon GitHub project to validate the input file against.

Installation

To be able to use marathon-validate, you need to have Node.js (and NPM) installed on your system. Then you can use

npm install -g marathon-validate

to install it globally. You can verify the correct installation by issuing

$ marathon-validate --version
0.3.3

Usage

$ marathon-validate --help

  Usage: marathon-validate [options] <file>

  Options:

    -h, --help                 output usage information
    -V, --version              output the version number
    -a, --app                  Check an App JSON
    -g, --group                Check a Group JSON
    -d, --describe <property>  Describe a property. Has to be used with either -a (app schema) or -g (group schema)
    -m, --marathon <version>   Use schema of specific Marathon version
    -t, --tags                 Get a list of tags for the Marathon project

Validate apps and groups

If you want validate your application.json file in the current folder against the master version of the JSON schema, you can do a

$ marathon-validate -a application.json

To validate your application.json against a specific release version (e.g. v1.3.6), you can use

$ marathon-validate -a -m v1.3.6 application.json

This should work with all tags from the Marathon project.

Query tags

You can also get the list of tags like this (output is shortened):

$ marathon-validate -t
--> List of tags:
     * v1.5.0-SNAPSHOT
     * v1.4.3
     * v1.4.2
     * v1.4.2-snapshot5
     * v1.4.2-snapshot4
     * v1.4.2-snapshot3
     * v1.4.2-snapshot2
     * v1.4.2-SNAPSHOT1
     * v1.4.1
     * v1.4.0
...

Search for field description

You can search the JSON schema for a field's description like this (in this example, the type field):

$ marathon-validate -a -d type
 --> Loading remote schema: https://raw.githubusercontent.com/mesosphere/marathon/master/docs/docs/rest-api/public/api/v2/schema/AppDefinition.json
 --> Found 2 matches for 'type':
     * '.container.type': Container engine type. Supported engine types at the moment are DOCKER and MESOS.
     * '.container.volumes.persistent.type': The type of mesos disk resource to use; defaults to root

By using the -a or -g flags, you can specify if you want to query the app or group JSON schema.