Skip to content

Latest commit

 

History

History
90 lines (66 loc) · 3.58 KB

detail.adoc

File metadata and controls

90 lines (66 loc) · 3.58 KB

JobPack Standard Definition

JobPack is a general standard to aid in the discovery and consumption of discrete units of work contained within a Docker image. While initially developed to support the Scale data processing system with job discovery, it is designed to be readily applied to other systems as well.

JobPack compliant images must be named in a specific fashion due to the lack of label search capability on Docker Hub and Registry services. The suffix -jobpack must be used when naming images to enable discovery, prior to Hub or Registry push. This requirement will be deprecated as label search support is standardized across Docker registry services.

Dockerfile snippet containing required label for JobPack compliance:

link:examples/Dockerfile-snippet[role=include]

The com.jobpack.manifest label contents must be serialized as a string-escaped JSON object. The following is a complete example including required and optional keys:

link:examples/jobpack-full.json[role=include]
  • JavaScript Object Notation (JSON), and the terms object, name, value, array, and number, are defined in IETF RFC 4627.

  • Semantic Versioning (SemVer), and the terms major, minor, and patch version are defined at http://semver.org/spec/v2.0.0.html

  • The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119.

A few requirements must be satisfied when constructing a system capable of executing JobPack standardized images. These are outlined below:

  • Environment variable injection must be performed. May be consumed by job directly as environment variables or shell variable expansion may be leveraged in the interface.args member. The following minimum variables MUST be provided:

    • JOB_OUTPUT_DIR: Root path job must place all products that should be captured as output.

    • ALLOCATED_CPUS: Value of cpus member.

    • ALLOCATED_MEM: Value of mem member.

    • ALLOCATED_STORAGE: Value of storage member.

    • All name member values of interface.inputData elements: Indicate the absolute path of input files. Environment variable name case MUST map exactly from name value.

A primary intention of this standard is for simple job discovery from public images hosted within either Docker Hub, Docker Trusted Registry or Docker Registry. There is significant fragmentation of APIs between the various Docker offerings and the following sections describe the steps that may be taken to access the labels defined by CJSD.

Use ImageLayers /registry/analyze endpoint to extrapolate the Dockerfile contents and retrieve label metadata.

TBD Waiting on forum post response

TODO: Give details on contents and formatting of all JobPack labels

TODO: Give details on manifest usage and explanation of Scale specific use.