-1

In Bluemix, it is possible to connect to MongoDB by Compose as a service to be used by Cloud Foundry Apps. According to the guide, you will need to provide the configuration interface:

  • Username of the database
  • Password of the database
  • Host address of the deployment
  • Port of the deployment

enter image description here

In the example, the database is called "bluemixtest" while the deployment is called "mongo-bluemix-test", so once I have provided the username and password of my database, as well as the host and port of my deployment, where in the configuration interface do I tell the app to use the "bluemixtest" database? It seems strange that the configuration interface only ask for the database password and username but did not ask about the actual database name.

williamli
  • 3,846
  • 1
  • 18
  • 30

1 Answers1

0

According to a response that I received from the Compose.io Team (recent IBM acquisition), you need to complete these steps:

  1. Visit the app.compose.io site and create an account.
  2. Create a MongoDB deployment.
  3. Provide a deployment name and the name of the desired deployment zone. At this point, provisioning will begin and you will need to wait for an indication that the process has completed.
  4. Click the Databases tab, provide a name of the database, and click Create Database.
  5. Provide a collection name and click Run.
Flexo
  • 87,323
  • 22
  • 191
  • 272
  • This describe the configuration of a normal compose.io account. My question is regarding the setup of MongoDB account (hosted in Compose) inside the Bluemix (also own by IBM) control panel. There is a setting to hook up MongoDB @ Compose inside Bluemix but it is unclear how to point a Bluemix app to a specific database running inside of a deployment. – williamli Jan 04 '16 at 16:08
  • Thanks for the clarification and the new graphic in the question. I have contacted the Compose team to get you an answer. – William 'Bill' Wentworth Jan 04 '16 at 16:51
  • Clarification from Compose.io Support: You must create a separate Compose account and get a deployment provisioned within Compose. Then, you can go back to Bluemix and then add the connection information. The plan selection drop-down box specifically says "user-provided." It implies that there is no integration other than through getting a Compose account and then supplying the information to the Bluemix user interface. – William 'Bill' Wentworth Jan 05 '16 at 19:18
  • I have done that. it just lead to my original question. I have multiple database running in my compose deployment. now I have a database call 'bbi', user of db is 'webclient', password of this db is '1234', I can only enter the password and username but there is no way I can tell bluemix that this username / password pair is for the database 'bbi' as oppose to the other databases I have running on the same deployment. – williamli Jan 06 '16 at 17:13
  • More from Compose.io Support: The best bet is to define a variable in the application utilizing whatever syntax the application driver prefers to have replica set information fed to it. You log into your Compose account and get that URI in the Compose UI. It'll look something like this - mongodb://:@candidate.16.mongolayer.com:10973,candidate.19.mongolayer.com:10779/new_database?replicaSet=set-5510340e553e7f94c000005a Use an environmental variable storing the URI as a whole, or elements of the URI, and then let the drive assemble it into whatever it prefers to see. – William 'Bill' Wentworth Jan 08 '16 at 17:01
  • For more detailed information about the use of Compose's database, replica sets, and anything else to do with Compose specifically, contact support@compose.io. – William 'Bill' Wentworth Jan 08 '16 at 17:01