Skip to content

ATLAS schema collection

Lukas edited this page Feb 16, 2016 · 13 revisions

I'm just collecting some schemas and test instances here for this issue

https://github.com/cernanalysispreservation/analysis-preservation.cern.ch/issues/70

once this is done, we can delete this page

Environment Schemas

Docker-Enabled Environment:

Description: This schema defines a Docker Environment

mandatory fields:

  • environment-type
  • image

optional fields:

  • resources
  • environment variables
  • environment script
  • image tag

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://jsonschema.net",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "environment-schema": {
      "id": "http://jsonschema.net/environment-schema",
      "type": "string",
      "enum":["docker-encapsulated"],
      "default":"docker-encapsulated"
    },
    "image": {
      "id": "http://jsonschema.net/image",
      "type": "string"
    },
    "imagetag": {
      "id": "http://jsonschema.net/imagetag",
      "type": "string",
      "default":"latest"
   },
    "resources": {
      "id": "http://jsonschema.net/resources",
      "type": "array",
      "default":null
    },
    "envscript": {
      "id": "http://jsonschema.net/envscript",
      "type": "string",
      "default":null
    },
    "envvars": {
      "id": "http://jsonschema.net/envars",
      "type": "object",
      "default":null
    }
  },
  "required": [
    "environment-type",
    "image"
  ]
}

Test Instances

{
  "environment-type": "docker-encapsulated",
  "image": "lukasheinrich/walkthrough_one",
}
{
  "environment-type": "docker-encapsulated",
  "image": "lukasheinrich/walkthrough_one",
  "imagetag":"latest",
  "resources":["CVMFS","GRIDProxy"],
  "envscript":"/resources/setup.sh",
  "envvars":{"ROOTSYS":"/usr/local"}
}

Publisher Schemas:

Attribute-Based Publisher

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://jsonschema.net",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "publisher-type": {
      "id": "http://jsonschema.net/publisher-type",
      "type": "string",
      "enum": [
        "process-attr-pub"
      ]
    },
    "outputmap": {
      "id": "http://jsonschema.net/outputmap",
      "type": "object"
    }
  },
  "required": [
    "publisher-type"
  ]
}

Test instances

{
  "publisher-type": "process-attr-pub"
}
{
  "publisher-type": "process-attr-pub",
  "outputmap": {
    "output": "outList",
    "another output": ["onePar", "anotherPar"]
  }
}

Process Schemas:

simple command process (string interpolated)

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://jsonschema.net",
  "type": "object",
  "properties": {
    "cmd": {
      "id": "http://jsonschema.net/cmd",
      "type": "string"
    }
  },
  "required": [
    "cmd"
  ]
}

Test Instances

{
  "cmd":"./command {someattr} {anotherattr}"
}
{
  "cmd":"./hello_world"
}
Clone this wiki locally