Closed l2fprod closed 8 years ago
@rvennam
The MongoDB database storing the logs will be bound to the dashboard app.
Here is how I'm loading it in the insurance-bot for Compose-for-mongodb: https://github.com/IBM-Bluemix/insurance-bot/blob/new-toolchain/app.js#L51
var mongoDbCredentials = appEnv.getServiceCreds("insurance-bot-db") || appEnv.services["compose-for-mongodb"][0].credentials; if (mongoDbCredentials) { var ca = [new Buffer(mongoDbCredentials.ca_certificate_base64, 'base64')]; mongoDbUrl = mongoDbCredentials.uri; mongoDbOptions = { mongos: { ssl: true, sslValidate: true, sslCA: ca, poolSize: 1, reconnectTries: 1 } };
It tries by name but also by label - as in the toolchain the database service will have different names whether it is dev or the prod.
The dev instance service name is dev-insurance-bot-db.
Dashboard mongo work is done
@rvennam
The MongoDB database storing the logs will be bound to the dashboard app.
Here is how I'm loading it in the insurance-bot for Compose-for-mongodb: https://github.com/IBM-Bluemix/insurance-bot/blob/new-toolchain/app.js#L51
It tries by name but also by label - as in the toolchain the database service will have different names whether it is dev or the prod.