CouchDB in CloudFoundry?

情到浓时终转凉″ 提交于 2019-12-02 10:31:00

I decided to try this myself and it appears to work OK. I created a new VCAP instance with vcap_dev_setup and the following configuration ..

---
deployment:
  name: "cloudfoundry"
jobs:
  install:
    - nats_server
    - cloud_controller:
        builtin_services:
          - mysql
          - postgresql
          - couchdb
    - stager
    - router
    - health_manager
    - uaa
    - uaadb
    - ccdb
    - dea
    - couchdb_gateway
    - couchdb_node:
        index: "0"
    - postgresql_gateway
    - postgresql_node:
        index: "0"
    - mysql_gateway
    - mysql_node:
        index: "0"

I was able to bind instances of CouchDB to a node app and read the service info from VCAP_SERVICES, as below;

'{"couchdb-1.2":[{"name":"couchdb-c7eb","label":"couchdb-1.2","plan":"free","tags":["key-value","cache","couchdb-1.2","couchdb"],"credentials":{"hostname":"127.0.0.1","host":"127.0.0.1","port":5984,"username":"7f3c0567-89cc-4240-b249-40d1f4586035","password":"8fef9e88-3df2-46a8-a22c-db02b2917251","name":"dde98c69f-01e9-4e97-b0d6-43bed946da95"}}]}'

I was also able to tunnel the service to a local port and connect to it which you can see in this image

What version of Ubuntu have you used to install VCAP?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!