Code Monkey home page Code Monkey logo

compose-to-nomad's People

Contributors

uchenic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

compose-to-nomad's Issues

version `GLIBC_2.32' not found

Traceback (most recent call last):
  File "/usr/local/bin/nomadgen", line 7, in <module>
    main(args)
  File "/home/dengolius/.local/lib/python3.8/site-packages/composenomadconvertor/produce_tasks.py", line 103, in main
    l = ComposeParser(filepath)
  File "/home/dengolius/.local/lib/python3.8/site-packages/composeparser/parse.py", line 13, in __init__
    self.lib = ctypes.CDLL(os.path.join(abs_path,"libparse.so"))
  File "/usr/lib/python3.8/ctypes/__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/dengolius/.local/lib/python3.8/site-packages/libparse.so)

image

Python 3.8.5 (default, Jan 27 2021, 15:41:15)
[GCC 9.3.0] on linux

So to use your tools I need to install Ubuntu 20.10 or run it from virtualenv... meh...

Support for .env files

This is a feature request. I have a docker-compose file with a .env file for defining the parameters of the docker-compose file. Would you consider supporting .env files in compose-to-nomad?

How to format your Docker Compose file?

Hi @uchenic,

thank for sharing this code - I have been looking for something like it for a while!

But I keep running into errors when I try to run conversions - e.g.:

Traceback (most recent call last):
  File "/usr/local/bin/nomadgen", line 7, in <module>
    main(args)
  File "/usr/local/lib/python3.9/dist-packages/composenomadconvertor/produce_tasks.py", line 104, in main
    compose_obj = l.load()
  File "/usr/local/lib/python3.9/dist-packages/composeparser/parse.py", line 23, in load
    return json.loads(self.lib.load(s).decode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'decode'

or

Traceback (most recent call last):
  File "/usr/local/bin/nomadgen", line 7, in <module>
    main(args)
  File "/usr/local/lib/python3.9/dist-packages/composenomadconvertor/produce_tasks.py", line 106, in main
    result = pr.gen_nomad_job()
  File "/usr/local/lib/python3.9/dist-packages/composenomadconvertor/produce_tasks.py", line 95, in gen_nomad_job
    job_name = list(self.compose_obj['networks'].keys())[0]
KeyError: 'networks'

The last one above came from a hello world example file - nothing exotic:

version: "3"
services:
  hello:
    image: hello-world:latest

Do you have examples of files that the script worked with? What are potential restrictions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.