Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/desteves/mongodb-atlas-service-broker
Uses the Open Service Broker API standard for MongoDB Atlas.
https://github.com/desteves/mongodb-atlas-service-broker
Last synced: 9 days ago
JSON representation
Uses the Open Service Broker API standard for MongoDB Atlas.
- Host: GitHub
- URL: https://github.com/desteves/mongodb-atlas-service-broker
- Owner: desteves
- License: mit
- Created: 2018-09-11T00:23:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-01-26T01:26:53.000Z (about 3 years ago)
- Last Synced: 2024-06-21T21:06:48.747Z (7 months ago)
- Language: Go
- Size: 8.35 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mongodb-atlas-service-broker
Uses the [Open Service Broker API](https://github.com/openservicebrokerapi/servicebroker) standard for [MongoDB Atlas](https://www.mongodb.com/cloud/atlas). Note, this broker also integrates with [CredHub](https://docs.cloudfoundry.org/credhub/) but that part is "pluggable".
__This was put together for SpringOne 2018__ and it's an UNOFFICIAL, DEMO ONLY repo.
## Offical MongoDB
Great News! MongoDB has an official, production quality OSB!!
Please refer to the [Official MongoDB Atlas OSB](https://github.com/mongodb/mongodb-atlas-service-broker) for more details# How To
## Login to Env
```bash
➜ cf login -a https://api.sys.pas.pcf.cloud.oskoss.com --skip-ssl-validation
admin
https://opsman.pcf.cloud.oskoss.com/api/v0/deployed/products/cf-ee61061cbfd3c03073c1/credentials/.uaa.admin_credentials
```## Create Org/Space
```bash
cf create-org atlas
cf target -o "atlas"
cf create-space broker
cf target -s broker
```## See Apps
```bash
➜ cf apps
Getting apps in org atlas / space broker as admin...
OK
name requested state instances memory disk urls
atlas-broker started 1/1 1G 1G atlas-broker.apps.pas.pcf.cloud.oskoss.com
```## Building the Go App
```bash
cd /Users/d/go/src/code.cloudfoundry.org/credhub-cli
git checkout 863774d30866c04d1dacb75df13ecfbe5f84d163cd /Users/d/go/src/github.com/desteves/mongodb-atlas-service-broker
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build .
mkdir bin
mv mongodb-atlas-service-broker bin
cd bin
```## Pushing the Go App
```bash
➜ cf buildpacks
➜ bin git:(master) ✗ pwd
/Users/d/go/src/github.com/desteves/mongodb-atlas-service-broker/bin➜ cat manifest.yml
applications:
- name: atlas-broker
command: ./mongodb-atlas-service-broker
buildpack: binary_buildpack
env:
ATLAS_USERNAME: diana.esteves
ATLAS_API_KEY: d76d39bf-b356-4e8d-bbd0-b78998e75e56
ATLAS_GROUP_ID: 5b75e84b3b34b9469d01b20e
ATLAS_HOST: cloud.mongodb.com
UAA_ADMIN_CLIENT_SECRET: W6q3YNrRbUrx2-H8wd5sLRTTVRCRhRqH
SECURITY_USER_NAME: admin
SECURITY_USER_PASSWORD: admin➜ cf push -f manifest.yml
➜ cf logs atlas-broker --recent
➜ cf logs atlas-broker```
## Create Service Broker
```bash
cf service-brokers
cf create-service-broker mongodb-atlas-service-broker admin admin http://atlas-broker.apps.pas.pcf.cloud.oskoss.com
cf service-access
cf enable-service-access atlas
cf marketplace
```## Create Service
`cf create-service atlas aws_dev my-frist-atlas-sb`
## Bind Service
```bash
cf apps
cf bind-service my-app my-frist-atlas-sb
cf push -f manifest.yml
cf bind-service my-app my-frist-atlas-sb
cf env my-app
```## Deploy Spring App
## Bind Spring App
➜ bin git:(master) ✗ cf bind-service springdemo atlas2
Binding service atlas2 to app springdemo in org atlas / space broker as admin...
OK
TIP: Use 'cf restage springdemo' to ensure your env variable changes take effect
➜ bin git:(master) ✗ cf restage