Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Latest commit

 

History

History
28 lines (21 loc) · 906 Bytes

README.md

File metadata and controls

28 lines (21 loc) · 906 Bytes

nomad-compose

Use docker-compose yml files as input for Hashicorp's nomad

This script converts docker-compose yml files to nomad job templates

Usage: ./compose2nomad compose.yml [servicename]

This script resolves extends stanzas. You can add specific labels the compose file to influence some nomad-specific options, such as count, constraints, etc. The implementation depends on the setting. Examples:

    nomad.count: 1
    nomad.datacenters:
      - mydc
    nomad.constraints._cluster._type: constraint
    nomad.constraints._cluster.attribute: '${meta.role}'
    nomad.constraints._cluster.value: myrole
    nomad.constraints._distinct._type: constraint
    nomad.constraints._distinct.distinct_hosts: true

TODO:

  • currently only a single task is generated (while both compose and nomad support multiple tasks in a single file)
  • add more nomad-specific configuration options