uchenic / compose-to-nomad Goto Github PK
View Code? Open in Web Editor NEWcompose to nomad job convertor
compose to nomad job convertor
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)
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...
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?
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.