CloudFoundry中的CouchDB? [英] CouchDB in CloudFoundry?

查看:82
本文介绍了CloudFoundry中的CouchDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了Cloud Foundry项目,并尝试将其安装在服务器上



我将Couchdb用作数据库服务。



我的主要问题是:如何在Cloud Foundry中使用CouchDB?



我使用以下命令安装CF实例:vcap_dev_setup -c devbox_all.yml -D mydomain.com



devbox.yml包含:

  $ install:
-全部。

在此安装中,默认情况下,该属性是ouchdb_node和该couchdb_gateway的存在。
但这似乎通常是错误。
删除应用程序时出现此错误,例如:

  $ vmc delete notes2 
已配置检测到服务[mongodb-d216a],要删除它吗? [yN]:是
检测到预配置服务[redis-8fcdc],您要删除该服务吗? [yN]:y
删除应用程序[notes2]:确定
删除服务[mongodb-d216a]:错误503:服务网关


因此,我尝试使用此配置安装CF实例。
(带有redis,couch和mongo的标准单节点)



conf.yml:

  $作业:
安装:
-nats_server
-路由器
-暂存器
-ccdb
-cloud_controller:
Builtin_services:
-redis
-mongodb
-长沙发
-health_manager
-dea
-uaa
-uaadb
-redis_node:
索引: 0
-benchdb_node:
索引: 0
-mongodb_node:
索引: 0
-coudb_gateway
-redis_gateway
-mongodb_gateway

首先,此配置不有效,因为选项'couchdb'不是有用的关键字(在内置服务中如此)



那么,我做错了什么?
是否正在集成沙发,并且上周还没有完成?



要继续,我成功地安装了没有长沙发内置服务的CF实例选项,但有一个ouchdb_node和一个ouchdb_gateway。他们开始了。
我想该服务是可运行的。



但是我无法在我的应用manifest.yml中使用 couchdb或选择绑定此服务。
(这似乎很正常,因为它不是作为服务安装的)



因此,它似乎已经可以使用了,但是不是。



我在这里寻求有关此主题的建议,因为我没有找到在网上谈论话题的人。



感谢阅读我。
卢卡斯

解决方案

我决定亲自尝试一下,看来效果不错。我用vcap_dev_setup和以下配置创建了一个新的VCAP实例。

  --- 
部署:
名称: cloudfoundry
工作:
安装:
-nats_server
-cloud_controller:
Builtin_services:
-mysql
-postgresql
-长沙发
-登台者
-路由器
-health_manager
-uaa
-uaadb
-ccdb
-dea
-长沙发网关
-长沙发节点:$ b​​ $ b索引: 0
-postgresql_gateway
-postgresql_node:
索引: 0
-mysql_gateway
-mysql_node:
索引: 0

我能够绑定CouchDB实例到节点应用程序,并从VCAP_SERVICES读取服务信息,如下所示;

 '{ couchdb-1.2:[{名称: couchdb-c7eb,标签: couchdb-1.2,计划:免费,标签:[键值,缓存, couchdb-1.2, couchdb ],凭据:{主机名: 127.0.0.1,主机: 127.0.0.1,端口:5984,用户名: 7f3c0567-89cc-4240-b249-40d1f4586035,  password: 8fef9e88-3df2-46a8-a22c-db02b2917251, name: dde98c69f-01e9-4e97-b0d6-43bed946da95}}}}''

我还能够将服务隧道传输到本地端口并连接到该端口,您可以在此图像中看到





什么版本的Ubuntu您曾经安装过VCAP吗?


I review the Cloud Foundry project and try to install it on a server

I will use Couchdb as a database service.

My principal question is : How use CouchDB in Cloud Foundry?

I install a CF instance with : vcap_dev_setup -c devbox_all.yml -D mydomain.com

The devbox.yml contains :

$  install : 
      - all.

In this install the couchdb_node and the couchdb_gateway is present by default. But it seems to be bug in general. When I delete a app and I have this error for example :

$ vmc delete notes2   
  Provisioned service [mongodb-d216a] detected, would you like to delete it? [yN]: y  
  Provisioned service [redis-8fcdc] detected, would you like to delete it? [yN]: y   
  Deleting application [notes2]: OK   
  Deleting service [mongodb-d216a]: Error 503: Unexpected response from service gateway 

So I tried to install a CF instance with this config. (A standard single-node with redis, couch and mongo)

conf.yml :

$ jobs:
  install:
     - nats_server
    - router
    - stager
    - ccdb
    - cloud_controller:
        builtin_services:
         - redis
         - mongodb
         - couchdb
    - health_manager
    - dea
    - uaa
    - uaadb
    - redis_node:
        index: "0"
    - couchdb_node:
        index: "0"
    - mongodb_node:
        index: "0"
    - coudb_gateway
    - redis_gateway
    - mongodb_gateway

First, this config doesn't work, because the option 'couchdb' is not a valable keyword (In the part built-in services)

So, what I do wrong? Is in the way to integrate couch and it's not finished last week ?

To continue, I success to install the CF instance without the couchdb built-in services option but with a couchdb_node, and a couchdb_gateway. And they start. I suppose the service is runnable.

But i can't use 'couchdb' in my app manifest.yml or choose this service to bind on. (It's seems normal because it's not install as a service)

So, It seems to be close to work, but it's not.

I resquest Ideas, Advice on this subject here because I didn't find people talking about around the web.

Thank's to read me. Lucas

解决方案

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?

这篇关于CloudFoundry中的CouchDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆