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

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

License

Notifications You must be signed in to change notification settings

jovandeginste/nomad-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published