jasonmimick / atlas-osb

DEPRECATED: See https://github.com/mongodb/atlas-osb

Home Page:https://github.com/mongodb/atlas-osb

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scrum Call Tues July 21

jasonmimick opened this issue · comments

1st scrum call -- whooopie!! :)

Jumped into going through Sani's list of issues. Here are main todos:

  • why isn't database name in binding, spring music doesn't work

  • how can we specify the name of the database to use by default for adding to the connection string as the database to connect to when calling bind? tracking in #40

  • delete is not deleting everything - reopened this ticket and working on it: #17

  • show example how to set the mongodb version

Here's an example of how to set the MongoDB version on a service.
This same command should work for both create and update service.

cf update-service <SERVICE_NAME> -c '{ "cluster": { "mongoDBMajorVersion": "4.0" } }'

@jasonmimick the create/update service while specifying a specific version has issues. It creates the cluster successfully, but the cf create-service operations hangs in the "create in progress" state. On mongo atlas, i can see that the cluster has been created successfully, but there are no database users (unexpected).

Hi @tanjoht -

Thanks, we will investigate. Is for the sample_basic.yml.tpl ?
It would also help to see your exact command, for example did you get this error trying the example in the comment above or did you change the plan?

In general - plan, command, and then logs from cf logs <your-broker-app> are basic things we need for issues.

Thanks-

Plan:
name: replica-m10
description: This is the Basic Plan template for 1 project, 1 cluster, 1 dbuser, and 1 secure connection.
free: true
apiKey: {{ mustToJson (index .credentials.Orgs (default "" .org_id)) }}
project:
name: {{ .instance_name }}
desc: Created from a template
orgId:
cluster:
name: {{ .instance_name }}
providerBackupEnabled: {{ default "true" .backups }}
providerSettings:
providerName: {{ default "AZURE" .provider }}
instanceSizeName: {{ default "M10" .instance_size }}
regionName: {{ default "US_EAST_2" .region }}
labels:
- key: Infrastructure Tool
value: MongoDB Atlas Service Broker
databaseUsers:

  • username: {{ default "test-user" .username }}
    password: {{ default "test-password" .password }}
    databaseName: {{ default "default" .auth_db }}
    roles:
    • roleName: {{ default "readWrite" .role }}
      databaseName: {{ default "default" .role_db }}
      ipWhitelists:
  • ipAddress: "0.0.0.0/1"
    comment: "everything"
  • ipAddress: "128.0.0.0/1"
    comment: "everything"

command: cf create-service mongodb-atlas-template replica-m10 atlas-replica-m10-test4 -c '{"cluster":{"mongoDBMajorVersion":"4.0"}}'

running the command the first time errors:
Service broker error: POST https://cloud.mongodb.com/api/atlas/v1.0/groups/5f1858f6575ad654e60364bc/databaseUsers: 400 (request "Bad Request") Database name invalid. Users can only be created on the admin database.
FAILED

re-running the command the second time is successful

I can see the cluster created on mongodb atlas, but the task is stuck in creating service in progress for a long time.

about Spring Music application (current version does not support mongo+srv protocol) :

  1. if VCAP_SERVICES has URI = connectionString (master version) - It doesn't work
  2. if VCAP_SERVICES has database field - it doesn't work
  3. if VCAP_SERVICES has connectionString with mongo protocol - it doesn't work
  4. if VCAP_SERVICES has URI with mongo protocol - it works
    if we have to USE spring automation then we should change URI to full Mongo protocol

Here's an example of how to set the MongoDB version on a service.
This same command should work for both create and update service.

cf update-service <SERVICE_NAME> -c '{ "cluster": { "mongoDBMajorVersion": "4.0" } }'

is there a issue to track this? it is stuck on "create in progress"