Configuration Files
Unfurl’s configuration files are validated according to the JSON schemas described below. (Note: Required properties are in bold.)
Files
ensemble.yaml
Example:
apiVersion: unfurl/v1.0.0
kind: Ensemble
metadata:
  uri: https://unfurl.cloud/user1/dashboard.git#:ensemble/ensemble.yaml
spec:
  service_template:
    # tosca service template goes here:
    topology_template:
      node_templates:
        aNodeTemplate:
          type: tosca:Root
status:
  # inputs:
  # outputs:
  instances:
    name: # root resource is always named "root"
      template: aNodeTemplate
      attributes:
        .interfaces:
          interfaceName: foo.bar.ClassName
      priority: required
      readyState:
        local: ok
        state: created
      lastConfigChange: A1312XNB0001
      lastStateChange: A1312XNB0001
      created: true
      instances:
        child1:
          template: aNodeTemplate
          # ...
lastJob:
  changeId: A0920aMf0000
  startTime: 2020-09-02-00-36-22-664763
  changelog: jobs/job2020-09-02-00-36-22-664763.yaml
  workflow: deploy
  options:
    force: true
  summary: 1 tasks (1 changed, 1 ok, 0 failed, 0 unknown, 0 skipped)
  startCommit: 628c2a4b633a26c1e8b1c116d3fdeef9bca89716
  specDigest: 037815dc8b56254219a96f359fd996c65e7d0754
  priority: required
  readyState:
    local: ok
jobLog: jobs.tsv
lock:
  runtime:
    unfurl:
      version: 1.1.0
      digest: 9c2c1b4a
    toolVersions: {}
  package_rules:
    - "unfurl.cloud/onecommons/* #main"
    - "unfurl.cloud/onecommons/std github.com/user1/myfork"
  repositories:
    - url: http://unfurl.cloud/onecommons/std
      package_id: unfurl.cloud/onecommons/std
      commit: 2da68fe0d1014805d15fc9134352626cb136e066
      initial: 2da68fe0d1014805d15fc9134352626cb136e066
      discovered_revision: 1.0.0
      tag: v1.0.0 # current commit is on this tag
JSON Schema:
ensemble.yaml
| type | object | |||
| properties | ||||
| 
 | type | string | ||
| enum | unfurl/v1alpha1, unfurl/v1.0.0 | |||
| 
 | type | string | ||
| enum | Manifest, Ensemble | |||
| 
 | type | object | ||
| properties | ||||
| 
 | type | string | ||
| format | uri | |||
| 
 | type | array | ||
| items | ||||
| type | string | |||
| format | uri | |||
| 
 | Environment defaults | |||
| 
 | type | object | ||
| properties | ||||
| 
 | A TOSCA service template | |||
| type | object | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | Discovered Node Templates | |||
| 
 | type | object | ||
| default | {} | |||
| allOf | properties | |||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | type | string | ||
| 
 | Optional list of changes. If missing, changes are saved as separate files | |||
| 
 | ||||
job.yaml
Example:
manifest: ../ensemble.yaml
changes:
- changeId: A0AP4P9C0000
  startTime: 2020-10-25-04-25-09-199310
  previousId: A0AP4OM20000
  workflow: deploy
  options: {}
  summary: 2 tasks (1 changed, 2 ok, 0 failed, 0 unknown, 0 skipped)
  specDigest: 925f61f8c2b3153f2e2e60ffb800f48720095a9a
  priority: required
  readyState:
    effective: error
    local: ok
- changeId: A0AP4P9C0001
  target: ::my_server
  priority: required
  readyState:
    local: ok
  implementation:
    operation: check
    className: unfurl.configurators.terraform.TerraformConfigurator
  inputs: {}
  result:
    args:
    - terraform
    - refresh
    - -state=/Users/adam/_dev/unfurl/tests/examples/my_server/local/terraform.tfstate.json
    - -var-file=/Users/adam/_dev/unfurl/tests/examples/my_server/local/vars.tfvars.json
    returncode: 0
    stdout: >
      Empty or non-existent state file.
    stderr: ''
    cmd: terraform refresh -state=/Users/adam/_dev/unfurl/tests/examples/my_server/local/terraform.tfstate.json
      -var-file=/Users/adam/_dev/unfurl/tests/examples/my_server/local/vars.tfvars.json
JSON Schema:
job.yaml
| Record of an Unfurl job | ||
| type | object | |
| properties | ||
| 
 | const | “unfurl/v1.0.0” | 
| 
 | const | “Job” | 
| 
 | type | string | 
| 
 | ||
| 
 | ||
unfurl.yaml
Example:
  apiVersion: unfurl/v1.0.0
  kind: Project
  environments:
    defaults: # "defaults" are merged with optional contexts defined below
      locals:
       schema:
         name1:
           type: string
      secrets:
       schema:
         name1:
           type: string
      # # values are merged with the manifest's context:
      # inputs:
      # locals:
      # secrets:
      # variables:
      # external:
    # user-defined contexts:
    production: {}
    staging: {}
  ensembles:
    - file: "ensemble/ensemble.yaml"
      alias: "named_ensemble"
      project: "in_another_project"
      default: true
      environment: production # "defaults" context is used if not specified
JSON Schema:
unfurl.yaml
| Unfurl configuration file | |||||||
| type | object | ||||||
| properties | |||||||
| 
 | type | string | |||||
| enum | unfurl/v1alpha1, unfurl/v1.0.0 | ||||||
| 
 | const | “Project” | |||||
| 
 | Ensembles contained in this project or managed by this project (but maybe located in a different project). | ||||||
| type | array | ||||||
| items | |||||||
| type | object | ||||||
| properties | |||||||
| 
 | Path to ensemble manifest, relative to the the project it is located in. | ||||||
| type | string | ||||||
| 
 | The project the ensemble is located in if different from the current project. | ||||||
| type | string | ||||||
| 
 | The project that is managing the ensemble if different from the current project. | ||||||
| type | string | ||||||
| 
 | Use this ensemble if not is specified. | ||||||
| type | boolean | ||||||
| 
 | Alternative name to specify this ensemble on the command line instead of its file path | ||||||
| type | string | ||||||
| 
 | The name of the environment to use for this ensemble. | ||||||
| type | string | ||||||
| 
 | anyOf | type | object | ||||
| propertyNames | pattern | ^[A-Za-z._][A-Za-z0-9._-]*$ | |||||
| additionalProperties | anyOf | ||||||
| type | null | ||||||
| type | null | ||||||
| 
 | The name of the environment to deploy into if none was specified for the ensemble in its configuration or by the command line). | ||||||
| type | string | ||||||
| 
 | type | object | |||||
| allOf | |||||||
| additionalProperties | type | object | |||||
| properties | |||||||
| 
 | type | string | |||||
| format | uri | ||||||
| 
 | type | string | |||||
| 
 | type | string | |||||
| 
 | Map of file paths located outside of the project | ||||||
| type | object | ||||||
| additionalProperties | |||||||
| 
 | If set, only register projects in these directories. (If no match, project is included, use “/” in exclude_paths to exclude all by default) (reserved, unused) | ||||||
| anyOf | type | array | |||||
| items | |||||||
| type | string | ||||||
| type | null | ||||||
| 
 | Don’t register projects in these directories (longest path wins if overlaps with an include_paths). (reserved, unused) | ||||||
| anyOf | type | array | |||||
| items | |||||||
| type | string | ||||||
| type | null | ||||||
| additionalProperties | False | ||||||
cloudmap.yaml
Example (from https://github.com/onecommons/cloudmap/blob/main/cloudmap.yaml):
apiVersion: unfurl/v1.0.0
kind: CloudMap
repositories:
  unfurl.cloud/onecommons/blueprints/mediawiki:
    git: unfurl.cloud/onecommons/blueprints/mediawiki.git
    path: onecommons/blueprints/mediawiki
    name: MediaWiki
    protocols:
    - https
    - ssh
    internal_id: '35'
    project_url: https://unfurl.cloud/onecommons/blueprints/mediawiki
    metadata:
      description: MediaWiki is free and open-source wiki software used in Wikipedia,
        Wiktionary, and many other online encyclopedias.
      issues_url: https://unfurl.cloud/onecommons/blueprints/mediawiki/-/issues
      homepage_url: https://unfurl.cloud/onecommons/blueprints/mediawiki
    default_branch: main
    branches:
      main: 0fc60cb3afd06ae2c4abe038007e9ff4db398662
    tags:
      v1.0.0: 0fc60cb3afd06ae2c4abe038007e9ff4db398662
      v0.1.0: 225932bc2a45473d682e48f272bc48fcd83909bb
    notable:
      ensemble-template.yaml#spec/service_template:
        artifact_type: artifact.tosca.ServiceTemplate
        name: Mediawiki
        version: 0.1
        description: MediaWiki is free and open-source wiki software used in Wikipedia,
          Wiktionary, and many other online encyclopedias.
        type:
          name: Mediawiki@unfurl.cloud/onecommons/blueprints/mediawiki
          title: Mediawiki
          extends:
          - Mediawiki@unfurl.cloud/onecommons/blueprints/mediawiki
          - SQLWebApp@unfurl.cloud/onecommons/std:generic_types
          - WebApp@unfurl.cloud/onecommons/std:generic_types
          - App@unfurl.cloud/onecommons/std:generic_types
        dependencies:
        - MySQLDB@unfurl.cloud/onecommons/std:generic_types
        artifacts:
        - docker.io/bitnami/mediawiki
...
artifacts:
  docker.io/bitnami/mediawiki:
    type: artifacts.OCIImage
JSON Schema:
CloudMap Schema
| CloudMap Schema | ||||||||
| type | object | |||||||
| properties | ||||||||
| 
 | type | string | ||||||
| enum | unfurl/v1alpha1, unfurl/v1.0.0 | |||||||
| 
 | const | “CloudMap” | ||||||
| 
 | type | object | ||||||
| propertyNames | pattern | ^[^s]*$ | ||||||
| additionalProperties | type | object | ||||||
| properties | ||||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | array | ||||||
| items | ||||||||
| type | string | |||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | boolean | ||||||
| 
 | type | string | ||||||
| 
 | type | object | ||||||
| properties | ||||||||
| 
 | type | string | ||||||
| 
 | type | array | ||||||
| items | ||||||||
| type | string | |||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | object | ||||||
| additionalProperties | type | string | ||||||
| 
 | type | object | ||||||
| additionalProperties | type | string | ||||||
| 
 | type | object | ||||||
| additionalProperties | type | object | ||||||
| properties | ||||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | anyOf | type | string | |||||
| type | number | |||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | array | ||||||
| items | ||||||||
| type | string | |||||||
| 
 | type | object | ||||||
| propertyNames | pattern | ^[^s]*$ | ||||||
| additionalProperties | type | object | ||||||
| properties | ||||||||
| 
 | type | string | ||||||
Sections
environment
| type | object | |||
| properties | ||||
| 
 | ||||
| 
 | type | string | ||
| 
 | type | string | ||
| 
 | type | string | ||
| 
 | anyOf | type | object | |
| type | null | |||
| 
 | ||||
| 
 | ||||
| 
 | anyOf | |||
| type | null | |||
| 
 | ||||
| 
 | ||||
| type | object | |||
| 
 | type | object | ||
| properties | ||||
| 
 | type | object | ||
| 
 | type | object | ||
| 
 | type | array | ||
| 
 | type | object | ||
| allOf | ||||
| additionalProperties | ||||
| 
 | Configure the global git lfs lock for jobs. See Job Locking | |||
| type | object | |||
| properties | ||||
| 
 | Whether to use git lfs when locking an ensemble. ‘try’ use locking if lfs is available; ‘require’ means error if unable to lock | |||
| type | string | |||
| enum | no, try, require | |||
| default | no | |||
| 
 | Name of the lock file | |||
| type | string | |||
| 
 | Git LFS server url; if missing, use the ensemble’s git repository | |||
| type | string | |||
| format | uri | |||
Instance
| type | object | |||||
| allOf | properties | |||||
| 
 | anyOf | type | object | |||
| type | string | |||||
| 
 | default | {} | ||||
| 
 | ||||||
| 
 | ||||||
| 
 | ||||||
| 
 | type | array | ||||
| items | ||||||
| 
 | type | string | ||||
External
| Declare external instances imported from another manifest. | |||
| type | object | ||
| properties | |||
| 
 | type | object | |
| properties | |||
| 
 | type | string | |
| 
 | type | string | |
| 
 | type | string | |
| 
 | type | string | |
| format | uri | ||
| 
 | type | string | |
| 
 | |||
| 
 | Imported template requires compatible version. | ||
| 
 | List of connection names to import. | ||
| type | array | ||
| items | |||
| type | string | ||
| additionalProperties | False | ||
repositories
| type | object | |
| properties | ||
| 
 | repository URL | |
| type | string | |
| format | uri | |
| 
 | set if repository is a package | |
| type | string | |
| 
 | name repository (set if package_id is missing) | |
| type | string | |
| 
 | intended revision (branch or tag) declared by user | |
| type | string | |
| 
 | discovered version tag or (MISSING) if not found | |
| type | string | |
| 
 | current commit | |
| type | string | |
| 
 | current commit is on this branch | |
| type | string | |
| 
 | current commit is on this tag | |
| type | string | |
| 
 | initial commit | |
| type | string | |
| 
 | origin url | |
| type | string | |
Status
| type | object | |||
| properties | ||||
| 
 | type | object | ||
| properties | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | type | string | ||
| enum | ignore, optional, required, critical | |||
| 
 | ||||
| 
 | ||||
| 
 | type | boolean | ||
| 
 | anyOf | |||
| type | string | |||
| type | boolean | |||
| 
 | anyOf | |||
| type | boolean | |||
Job Record
| type | object | |||
| allOf | ||||
| properties | ||||
| 
 | ||||
| 
 | ||||
| 
 | type | string | ||
| 
 | ||||
| 
 | ||||
| 
 | type | string | ||
| 
 | job options set by the user | |||
| type | object | |||
| 
 | type | string | ||
| 
 | number of tasks that made changes to the target | |||
| type | integer | |||
| 
 | type | string | ||
| 
 | type | string | ||
| 
 | path to the full job record | |||
| type | string | |||
Task Record
| type | object | |||||
| allOf | properties | |||||
| 
 | ||||||
| 
 | type | string | ||||
| 
 | ||||||
| 
 | ||||||
| 
 | ||||||
| 
 | type | string | ||||
| 
 | ||||||
| 
 | default | {} | ||||
| allOf | additionalProperties | |||||
| 
 | true if the task made changes to the target | |||||
| type | boolean | |||||
| 
 | type | array | ||||
| items | ||||||
| type | object | |||||
| properties | ||||||
| 
 | type | string | ||||
| 
 | type | string | ||||
| 
 | ||||||
| 
 | ||||||
| 
 | type | boolean | ||||
| 
 | type | boolean | ||||
| 
 | type | array | ||||
| 
 | oneOf | enum | skipped | |||
| type | object | |||||
implementation definition
| type | object | |
| properties | ||
| 
 | type | string | 
| 
 | type | string | 
| 
 | ||
| 
 | type | string | 
Changes
| change log entry | |||
| type | array | ||
| items | |||
| type | object | ||
| anyOf | |||
Lock
| Lock Section | ||||||||
| type | object | |||||||
| properties | ||||||||
| 
 | type | object | ||||||
| properties | ||||||||
| 
 | type | object | ||||||
| properties | ||||||||
| 
 | ||||||||
| 
 | type | string | ||||||
| 
 | asdf tools versions used | |||||||
| type | object | |||||||
| 
 | package rules used | |||||||
| type | array | |||||||
| items | ||||||||
| type | string | |||||||
| 
 | type | array | ||||||
| items | ||||||||
| 
 | the state of referenced external ensembles | |||||||
| type | object | |||||||
| allOf | ||||||||
| additionalProperties | type | object | ||||||
| properties | ||||||||
| 
 | type | string | ||||||
| format | uri | |||||||
| 
 | anyOf | |||||||
| type | null | |||||||
| 
 | type | string | ||||||
| 
 | type | object | ||||||
| properties | ||||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
| 
 | type | string | ||||||
Definitions
Enums and Simple Types
readyState
| The operational status of the instance | |
| type | string | 
| enum | unknown, ok, degraded, error, pending, absent | 
state
| the Node state of the instance | |
| type | string | 
| enum | initial, creating, created, configuring, configured, starting, started, stopping, stopped, deleting, deleted, error | 
changeId
| type | string | 
| pattern | ^A[A-Za-z0-9]{11}$ | 
Timestamp
| type | string | 
| format | date-time | 
Generic Version Identifier
| anyOf | type | string | |
| type | number | 
Reusable helper definitions
instances
| type | object | ||
| allOf | |||
| additionalProperties | |||
attributes
| type | object | 
| default | {} | 
atomic
| indicates these properties must be set all at once or replaced | |
| type | object | 
namedObject
| constrains how properties are named | ||
| type | object | |
| default | {} | |
| propertyNames | pattern | ^[A-Za-z._][A-Za-z0-9._:-]*$ | 
schema
| a JSON Schema definition | |
| type | object |