I've been trying to understand how to deploy Opa apps on dotcloud. The default app works, but the wiki example from the Opa docs fails to launch with:
==> /var/log/supervisor/opa.log <==
[Opa] _no_name DbGen/Mongo/SynchroStart Db is ready
[Opa] _no_name DbGen/Mongo/SynchroStart Process 0 operations on the db wait list, start
[Opa] _no_name DbGen/Mongo/SynchroStart Process 0 operations on the db wait list, finished
[Opa] Server dispatch Decoded URL to /
[Opa] DbGen/Mongo (failure) Read from wiki set doesn't returns anything
File "stdlib/database/mongo/db.opa", line 776, characters 6-32, (776:6-776:32 | 28076-28102)
fail: undefinedDbSet build error
Error : uncaught OPA exn { 'size`': 2,
fail: 'DbSet build error',
position: 'File "stdlib/database/mongo/db.opa", line 776, characters 6-32, (776:6-776:32 | 28076-28102)' }
Is this something I have improperly set up or a bug in dotcloud's system?
my .yml:
opa:
type: custom
buildscript: builder
process: ~/run
ports:
www: http
db:
type: mongodb
This image shows what the monogdb looks like locally. https://i.stack.imgur.com/mT10d.jpg
UPDATE: I found out mongodb had a separate log. I found this:
auth: couldn't find user root, _no_name.system.users
which seems to point to the fact authentication isn't working.(aka, running the opa program local but pointing to remote mongodb gives same error.) Any ideas why it has this issue?
UPDATE2: Was chasing my tail around the past few days because I didn't quite understand what Cédrics was talking about. Here's what I replaced the database lines in the example with to get working:
database admin {
stringmap(string) /wiki;
/wiki[_] = "This page is empty. Double-click to edit.";
}
The problem was I was changing the path, not the db name:
ex: database int /admin/wiki
and not
ex. database admin {int /wiki;}
I'm curious if there's a way to use any other named database besides admin through opa, but at least this gets me running.