Cocaine

99 views
Skip to first unread message

Виталий Исаев

unread,
Feb 12, 2015, 6:08:01 AM2/12/15
to rever...@googlegroups.com
Hello,

I am trying to deploy the Cocaine - Elliptics - Docker cloud according to the well-known manual published on Habr but with a few modifications:

  1. Centos 7 with systemd;
  2. The recent version of Cocaine:
    [root@vm1 ~]# rpm -qa | grep cocaine
    cocaine
    -runtime-0.11.3.1-1.el7.x86_64
    libcocaine
    -core2-0.11.3.1-1.el7.x86_64
    cocaine
    -plugin-elliptics-2.26.3.35-1.el7.x86_64

The Elliptics is running on the vm0 (192.168.122.100), and I want to launch the Cocaine-runtime on vm1 (192.168.122.101). Here is my configuration:

[root@vm1 ~]# cat /etc/cocaine/cocaine-cloud.conf
{
   
"version": 2,
   
"paths": {
       
"plugins": "/usr/lib/cocaine",
       
"runtime": "/var/run/cocaine",
       
"spool": "/var/spool/cocaine"
   
},
   
"network": {
   
"group": "224.168.2.9"
   
},
   
"services": {
       
"logging": {
           
"type": "logging"
       
},
       
"storage": {
           
"type": "elliptics",
           
"args": {
                 
"backend": "core"
           
}
       
},
       
"node": {
           
"type": "node",
           
"args": {
               
"runlist": "default"
           
}
       
}
   
},
   
"storages": {
       
"core":
       
{
           
"type": "elliptics",
           
"args":
           
{
               
"nodes": ["192.168.122.100:1025:2"],
       
"io-thread-num" : 8,
       
"wait-timeout" : 30,
       
"check-timeout" : 60,
       
"net-thread-num" : 8,
       
"groups" : [1],
       
"verbosity" : 2
           
}
       
}
   
},
   
"loggers": {
       
"core": {
           
"type": "syslog",
           
"args": {
               
"identity": "cocaine",
               
"verbosity": "info"
           
}
       
}
   
}
}

The next step is systemd configuration:

[root@vm1 system]# cd /usr/lib/systemd/system
[root@vm1 system]# wget https://raw.githubusercontent.com/cocaine/cocaine-core/master/fedora/cocaine-runtime.service
[root@vm1 system]# sed -i.bak 's/cocaine-default.conf/cocaine-cloud.conf/' cocaine-runtime.service

First start attempt:

[root@vm1 system]# systemctl daemon-reload
[root@vm1 system]# systemctl restart cocaine-runtime.service
[root@vm1 system]# systemctl status cocaine-runtime.service -l
cocaine
-runtime.service - Cocaine runtime components
   
Loaded: loaded (/usr/lib/systemd/system/cocaine-runtime.service; disabled)
   
Active: failed (Result: exit-code) since Thu 2015-02-12 05:58:19 EST; 10s ago
 
Process: 2349 ExecStart=/usr/bin/cocaine-runtime -c /etc/cocaine/cocaine-cloud.conf (code=exited, status=1/FAILURE)
 
Main PID: 2349 (code=exited, status=1/FAILURE)

Feb 12 05:58:19 vm1.vitaly.ru systemd[1]: Starting Cocaine runtime components...
Feb 12 05:58:19 vm1.vitaly.ru systemd[1]: Started Cocaine runtime components.
Feb 12 05:58:19 vm1.vitaly.ru cocaine-runtime[2349]: ERROR: unable to initialize the configuration - the /var/run/cocaine directory does not exist.
Feb 12 05:58:19 vm1.vitaly.ru systemd[1]: cocaine-runtime.service: main process exited, code=exited, status=1/FAILURE
Feb 12 05:58:19 vm1.vitaly.ru systemd[1]: Unit cocaine-runtime.service entered failed state.
[root@vm1 system]#

Ok, I can do it on my own:

[root@vm1 system]# mkdir /var/run/cocaine
[root@vm1 system]# systemctl restart cocaine-runtime.service
[root@vm1 system]# systemctl status cocaine-runtime.service -l
cocaine
-runtime.service - Cocaine runtime components
   
Loaded: loaded (/usr/lib/systemd/system/cocaine-runtime.service; disabled)
   
Active: failed (Result: exit-code) since Thu 2015-02-12 06:01:03 EST; 1s ago
 
Process: 2376 ExecStart=/usr/bin/cocaine-runtime -c /etc/cocaine/cocaine-cloud.conf (code=exited, status=1/FAILURE)
 
Main PID: 2376 (code=exited, status=1/FAILURE)

Feb 12 06:01:03 vm1.vitaly.ru systemd[1]: Starting Cocaine runtime components...
Feb 12 06:01:03 vm1.vitaly.ru systemd[1]: Started Cocaine runtime components.
Feb 12 06:01:03 vm1.vitaly.ru cocaine-runtime[2376]: ERROR: unable to initialize the context - the 'elliptics' component is not available.
Feb 12 06:01:03 vm1.vitaly.ru systemd[1]: cocaine-runtime.service: main process exited, code=exited, status=1/FAILURE
Feb 12 06:01:03 vm1.vitaly.ru systemd[1]: Unit cocaine-runtime.service entered failed state.
[root@vm1 system]#

I have no idea why elliptics is unavailable? It seemed that all the dependencies were installed properly.

Thank you.

Виталий Исаев

unread,
Feb 12, 2015, 6:40:53 AM2/12/15
to rever...@googlegroups.com
I was told that cocaine is looking for the extensions in /usr/lib/cocaine, but the package moves them to /usr/lib64. Here is a workaround.

[root@vm1 system]# repoquery -l cocaine-plugin-elliptics
/usr/lib64/cocaine/elliptics-extensions.cocaine-plugin
[root@vm1 system]# cd /usr/lib/
[root@vm1 lib]# ln -s /usr/lib64/cocaine/ .



Andrey Sibiryov

unread,
Feb 18, 2015, 4:55:53 PM2/18/15
to rever...@googlegroups.com
You could simply change the "paths/plugins" (line 4 in your example) configuration entry to "/usr/lib64/cocaine", specifying that plugins should be looked for in a different location on the filesystem.

Антон Тюрин

unread,
Feb 18, 2015, 4:57:02 PM2/18/15
to rever...@googlegroups.com
Hello,

A path, where  cocaine looks for plugins, is configuried by option  "pluigns" in "path" section. In your configuration file it points to '/usr/lib/cocaine'.
So you can change without any symlinks magic.

четверг, 12 февраля 2015 г., 14:40:53 UTC+3 пользователь Виталий Исаев написал:
Reply all
Reply to author
Forward
0 new messages