cocaine / cocaine-tools Goto Github PK
View Code? Open in Web Editor NEWCocaine Tools
License: GNU Lesser General Public License v3.0
Cocaine Tools
License: GNU Lesser General Public License v3.0
I have installed cocaine
and cocaine-tools
, and tried to install the example ( https://github.com/cocaine/cocaine-framework-python/wiki/Echo-application-example ). When I run cocaine-runtime
as non-daemon with the following configuration file ( other sections are the same as in /cocaine-core/debian/cocaine-runtime.conf ):
"network": {
"pinned": { "locator": 7800 }
},
"services": {
"locator": {
"type": "locator",
"port": "7800"
},
"logging": {
"type": "logging",
"args": {
"backend": "core"
}
},
"storage": {
"type": "storage",
"args": {
"backend": "core"
}
}
}
It seems that it works:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
tcp6 0 0 :::7800 :::* LISTEN 21732/cocaine-runti
tcp6 0 0 :::36090 :::* LISTEN -
tcp6 0 0 :::40411 :::* LISTEN 21732/cocaine-runti
tcp6 0 0 :::56640 :::* LISTEN 21732/cocaine-runti
tcp6 0 0 :::41091 :::* LISTEN -
tcp6 0 0 :::10053 :::* LISTEN -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:10053 0.0.0.0:* -
udp 0 0 0.0.0.0:49628 0.0.0.0:* -
udp6 0 0 :::20488 :::* -
On the other session, I run cocaine-tools and try to upload example app as it is proposed in docs, and after execution of cocaine-tool profile upload, it stucks, to execute next command I need terminate current cocaine-tools process. Moreover, no feedback from cocaine-runtime
.
rshkarin@astor-077-jmj:~/co-ex/app$ cocaine-tool profile upload --name EchoProfile --profile=profile.json --debug=all --port=7800
[2015-08-20 12:30:20,911] cocaine.asio.service: DEBUG : Connecting to the service "locator", candidates: [(10, 1, 6, '', ('::1', 7800, 0, 0)), (2, 1, 6, '', ('127.0.0.1', 7800))]
[2015-08-20 12:30:20,911] cocaine.asio.service: DEBUG : - connecting to "6 ('::1', 7800, 0, 0)"
[2015-08-20 12:30:20,911] cocaine.asio.service: DEBUG : - success
^C[2015-08-20 12:38:44,885] cocaine.tools: ERROR : Terminated by user
Could you please advise what I do wrong, and how to configure it properly?
Thanks!
On fresh installation of cocaine-tools with pip install cocaine-tools
next command fails
cocaine-tool app upload --name flask --docker=unix:///var/run/docker.sock --registry=docker.registry:5000 --manifest manifest.json --timeout 200000 --debug tools
with error FAIL - __init__() takes exactly 9 arguments (8 given)
Error raises from https://github.com/cocaine/cocaine-tools/blob/master/cocaine/tools/helpers/_unix.py#L37
I want to view a cluster map from a locator via cocaine-tools
{
"70fbcae0-0b54-48aa-bf68-95c9f8605cda": [
"2a02:6b8:0:1605::32",
10053
]
}
given runlist {"app":"default"}
named default,
command cocaine-tool remove-app --name default --app app
exits with error message:
"Please specify runlist file path"
and runlist isn't updated.
When there's more than one app in the runlist, command does what it's supposed to do correctly.
Hello!
It seems like this commit implements the ability of pulling Docker image from Registry at the time of cocaine-tool app upload
(instead of building them from scratch on Cocaine Runtime server). Unfortunately I wasn't able to find out how to use this feature from docs. Could you please post example of cocaine application launch with the use of external Docker Registry server? Thank you.
Should return locator response.
When I specify in cocaine-runtime
configuration explicitly IP address of the locator:
"locator": {
"endpoint": "10.0.0.1"
}
cocaine-tool
cannot connect to node
service because it defaults to localhost
address.
> cocaine-tool info --host=10.0.0.1 --debug=all
[2014-08-18 14:16:22,154] cocaine.asio.service: DEBUG : Connecting to the service "locator", candidates: [(2, 1, 6, '', ('10.0.0.1', 10053))]
[2014-08-18 14:16:22,155] cocaine.asio.service: DEBUG : - connecting to "6 ('10.0.0.1', 10053)"
[2014-08-18 14:16:22,155] cocaine.asio.service: DEBUG : - success
[2014-08-18 14:16:22,157] cocaine.asio.service: DEBUG : Connecting to the service "node", candidates: [(2, 1, 6, '', ('127.0.1.1', 36045))]
[2014-08-18 14:16:22,157] cocaine.asio.service: DEBUG : - connecting to "6 ('127.0.1.1', 36045)"
[2014-08-18 14:16:22,157] cocaine.asio.service: DEBUG : - failed - 127.0.1.1:36045 - connection refused
[2014-08-18 14:16:22,157] cocaine.tools: ERROR : Unknown error occurred - test:36045 - service resolving failed. Reason: [127.0.1.1:36045 - connection refused]
If Transfer-Encoding: chunked
presents, encode body chunks according to
http://tools.ietf.org/html/rfc7230#section-4.1. Otherwise proxy should treat a response as non-chunked even if Content-Length
does not present (content length will be calculated after collecting all chunk from an apllication) to support backward compatibility.
When I'm typing cocaine-tool profile upload --name default --profile={pool-limit:4}
Consider absence of quotes in profile arguments.
It fails with following message:
Uploading "default"... [Errno 2] No such file or directory: '{pool-limit:4}'
But, exit code is zero, which tells caller that command was executed succesfully.
Hi, @noxiouz
How about uploading app from image allready presented in docker registry. Suppose I build my own image 'myimage' on development machine, upload it to docker.io site, then pull it on cocaine node and want to upload it as a cocaine application.
My attempt was to create folder and put following dummy Dockfile
there:
FROM myimage
and then run cocaine-tool app upload --docker=... --manifest..
. It works, but I think that there should be a cleaner way like cocaine-tool app upload --docker=... --image=myimage
. And it makes unnecessary image in docker registry.
Also it's not clear from docs what should I specify in slave
option in manifest if I already set startup command via CMD
or ENTRYPOINT
in Dockerfile
. Can I leave it empty like "slave": ""
?
Thanks in advance
Hi.
I do not understand what the problem is.
Cocaine-runtime and elliptics start normal. But when I try to upload test prog (/cocaine-framework-python/examples/flask),I get error:
[ OK ] Creating temporary directory - /tmp/tmpgAih4Q
[ OK ] Copying "." to "/tmp/tmpgAih4Q"
[ OK ] Locating manifest.json - found "./manifest.json"
[ OK ] Creating package
[ OK ] Loading manifest
[ OK ] Reading package "/tmp/tmpgAih4Q/repo/package.tar.gz"
[ FAIL ] Uploading application "example"
error in service "storage" - insufficient results count due to checker: 0 of 1 (1): No such device or address: -6 [6]
In syslog:
cocaine[1689]: storage/core: writing the 'example' object, collection: 'apps'
cocaine[1689]: storage/core: elliptics: 2:75d0d493ffb7...0b5e3fb41ad3: could not find network state for request
cocaine[1689]: storage/core: elliptics: 2:75d0d493ffb7...0b5e3fb41ad3: handled reply from: , cmd: WRITE, flags: 0x1 [need_ack], trans: 0, status: -6, siz$
cocaine[1689]: storage/core: elliptics: Destroying session.
cocaine[1689]: storage/core: write failed: insufficient results count due to checker: 0 of 1 (1): No such device or address: -6
cocaine[1689]: storage/core: elliptics: Destroying session.
Elliptics and cocaine running on the same server.
I have almost succeeded in updating the vagrant example for cocaine 12 compiled from source with the help of this comment (#30 (comment)). I am stuck at this step now: cocaine-tool proxy start --daemon --port=80
. It says that the proxy command is not known to it. I have read the cocaine-tools changelog: it lacks any notes about this change.
$ /usr/bin/cocaine-tornado-proxy --log_to_stderr
Traceback (most recent call last):
File "/usr/bin/cocaine-tornado-proxy", line 9, in <module>
load_entry_point('cocaine-tools==0.12.0.0rc28', 'console_scripts', 'cocaine-tornado-proxy')()
File "/usr/lib/python2.7/dist-packages/cocaine/proxy/proxy.py", line 419, in main
sticky_header=opts.sticky_header)
File "/usr/lib/python2.7/dist-packages/tornado/util.py", line 215, in __new__
instance.initialize(*args, **init_kwargs)
TypeError: initialize() got an unexpected keyword argument 'locators'
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.