Open mouradsm opened 9 years ago
Are you installing the API on the VM or as a tsuru application?
If you're install on the VM, please ensure that you install all packages listed in the file requirements.apt. This libevent.h error comes from the fact that you don't have libevent-dev installed. So, the following command should fix it:
% cat requirements.apt | xargs sudo apt-get install -y
You can also deploy mysqlapi as an app in tsuru, and tsuru will handle that for you.
We should add a note about requirements.apt
in the readme
which platform should I install to put it as an application ?
@mouradsm you can deploy mysqlapi to tsuru using "python" plataform.
Just clone and push to master repository ?
After deploy in Admin/containers : de0e6483139d mysqlapi python web 172.17.0.7 32771 error
How can I solve this?
app log: 2015-10-17 18:37:37 +0000 [web][a2958a5296f9]: 2015-10-17 18:37:37 [1] [INFO] Using worker: gevent 2015-10-17 18:37:37 +0000 [web][a2958a5296f9]: 2015-10-17 18:37:37 [9] [INFO] Booting worker with pid: 9 2015-10-17 18:37:37 +0000 [web][a2958a5296f9]: 2015-10-17 18:37:37 [9] [INFO] Worker exiting (pid: 9) 2015-10-17 18:37:39 +0000 [web][a2958a5296f9]: 2015-10-17 18:37:39 [1] [INFO] Shutting down: Master 2015-10-17 18:37:39 +0000 [web][a2958a5296f9]: 2015-10-17 18:37:39 [1] [INFO] Reason: Worker failed to boot.
@mouradsm you should define some environment variables.
Here is an example if you want to create the mysql api using the shared database mode:
DJANGO_SETTINGS_MODULE=mysqlapi.settings
MYSQLAPI_DB_HOST=<host-ip>
MYSQLAPI_DB_PASSWORD=<db-passwoard>
MYSQLAPI_SHARED_PASSWORD=<db-shared-password>
MYSQLAPI_SHARED_SERVER=<db-shared-server>
MYSQLAPI_SHARED_SERVER_PUBLIC_HOST=<db-shared-host>
you can set them using tsuru env-set
command.
@andrewsmedina desculpa eu falar em português mas já gastei meu inglês todo rs
Eu coloquei as variáveis assim: DJANGO_SETTINGS_MODULE=mysqlapi.settings MYSQLAPI_DB_HOST=localhost MYSQLAPI_DB_PASSWORD=123456 MYSQLAPI_SHARED_PASSWORD=123456 MYSQLAPI_SHARED_SERVER=localhost MYSQLAPI_SHARED_SERVER_PUBLIC_HOST=mysqlapi.192.168.50.4.nip.io
Eu tenho quase certeza que não são essas informações... pois mesmo após o tsuru env-set está dando erro.
Pode me ajudar?
A api não deve estar executando corretamente por que você nao deve ter o mysql instalado.
Primeiramente você precisa de um mysql para armazenar os metadados da mysqlapi
e um mysql para distribuir como serviço. Esses bancos podem serem o mesmo.
Após ter esse mysql instalado é so configurar os dados deles nas variaveis de ambiente.
Command: sudo pip install -r requirements.txt
running build_ext
building 'gevent.core' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/gevent
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c gevent/core.c -o build/temp.linux-x86_64-2.7/gevent/core.o
In file included from gevent/core.c:253:0:
gevent/libevent.h:9:19: fatal error: event.h: No such file or directory
include "event.h"
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip_build_root/gevent/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-a8ZjvC-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/gevent Storing debug log for failure in /home/vagrant/.pip/pip.log