Hi,
I am using https://github.com/tsuru/tsuru-bootstrap.git and decided to try mysql as well. For that, I did this:
git clone [email protected]:tsuru/mysqlapi.git
tsuru app-create mysqlapi python -t namoroon
git remote add tsuru [email protected]:mysqlapi.git
git push tsuru
tsuru env-set MYSQLAPI_SHARED_SERVER=localhost -a mysqlapi
tsuru env-set DJANGO_SETTINGS_MODULE=mysqlapi.settings -a mysqlapi
crane create service.yaml
tsuru service-add mysqlapi namoroonmysql small -t namoroon
Error: Failed to create the instance namoroonmysql: Post http://mysqlapi.com/resources: dial tcp: lookup mysqlapi.com: no such host
Makes sense, so I edited service.yaml:
crane remove mysqlapi
vi service.yaml, production: mysqlapi.192.168.46.226.nip.io
crane create service.yaml
tsuru service-add mysqlapi namoroonmysql small -t namoroon
Error: Failed to create the instance namoroonmysql:
<title>Error 502 - Application Not Responding</title>
<style>
body { background-color: #fff; margin: 0px; padding-top: 280px; text-align: center; }
h1 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: normal; }
h2 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; color: #999; font-weight: normal; }
</style>
Application Not Responding
Please try again in a few moments.
tsuru app-log --lines 5 -a mysqlapi
2015-03-31 08:18:07 -0300 [web][7a92435c6ad4]: Using worker: gevent
2015-03-31 08:18:07 -0300 [web][7a92435c6ad4]: Booting worker with pid: 186
2015-03-31 08:18:07 -0300 [web][7a92435c6ad4]: Worker exiting (pid: 186)
2015-03-31 08:18:08 -0300 [web][7a92435c6ad4]: Shutting down: Master
2015-03-31 08:18:08 -0300 [web][7a92435c6ad4]: Reason: Worker failed to boot.
No extra info in the logs. This did not help: tsuru env-set MYSQLAPI_DEBUG=1 -a mysqlapi
If I can suggest something, I'd say the documentation could be improved . It is not clear to the reader if the mysql instance is managed by mysqlapi itself, via docker instances it manages, or if I really need to pre-install a shared MySQL server and mysqlapi manages just databases in it (I suspect it is this option). But if I want a DEV environment, is it ok if I install mysql in the tsar-bootstrap VM itself? Or can I have it as a Docker? I would like to automate the database install as well.
Basically I am trying to use tsar for DEV deploys on developers machines for now (still using Heroku for LIVE). If it works, I will try STAGING next and LIVE last.
Note: I am having a similar problem with redisapi (ticket 28 there). So, it is probably something missing in the docs (assumes the person is a tsar expert).
Thanks!