hpcloud / cf-services-connector-nodejs Goto Github PK
View Code? Open in Web Editor NEWA Cloud Foundry v2 service API compatible service broker implementation in Node.js
License: Apache License 2.0
A Cloud Foundry v2 service API compatible service broker implementation in Node.js
License: Apache License 2.0
Using stackato micro cloud:
After deploying the example echo service:
stk add-service-broker
Enter name: echo-broker
Enter url: http://echo-service-broker.stackato-w3br.local
Enter username: demouser
Enter password: demopassword
Creating new service broker [echo-broker] ... Error 10001: The service broker API returned an error from http://echo-service-broker.stackato-w3br.local/v2/catalog: 412 Precondition Failed (500)
Stackato logs:
cloud_controller_ng - Request failed: 500: {"code"=>10001, "description"=>"The service broker API returned an error from http://echo-service-broker.stackato-w3br.local/v2/catalog: 412 Precondition Failed", "error_code"=>"CF-ServiceBrokerBadResponse", "backtrace"=>["/home/stackato/stackato/code/cloud_controller_ng/lib/services/service_brokers/v2/client.rb:109:in `parse_response'", "/home/stackato/stackato/code/cloud_controller_ng/lib/services/service_brokers/v2/client.rb:12:in `catalog'", "/home/stackato/stackato/code/cloud_controller_ng/lib/services/service_brokers/service_broker_registration.rb:73:in `catalog'", "/home/stackato/stackato/code/cloud_controller_ng/lib/services/service_brokers/service_broker_registration.rb:61:in `validate_catalog!'", "/home/stackato/stackato/code/cloud_controller_ng/lib/services/service_brokers/service_broker_registration.rb:12:in `create'", "/home/stackato/stackato/code/cloud_controller_ng/app/controllers/services/service_brokers_controller.rb:38:in `create'", "/home/stackato/stackato/code/cloud_controller_ng/lib/cloud_controller/rest_controller/base.rb:105:in `dispatch'", "/home/stackato/stackato/code/cloud_controller_ng/lib/cloud_controller/rest_controller/routes.rb:16:in `block in define_route'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1592:in `call'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1592:in `block in compile!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `[]'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (3 levels) in route!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:976:in `route_eval'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:133:in `route_eval_with_newrelic'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:957:in `block (2 levels) in route!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:997:in `block in process_route'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `catch'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:995:in `process_route'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/newrelic_rpm-3.7.3.204/lib/new_relic/agent/instrumentation/sinatra.rb:116:in `process_route_with_newrelic'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:955:in `block in route!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `each'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:954:in `route!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1067:in `block in dispatch!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `block in invoke'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `catch'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in `invoke'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/sinatra-1.4.4/lib/sinatra/base.rb:1064:in `dispatch!'", "/home/stackato/stackato/code/cloud_controller_ng/vendor/bundle/ruby/1.9.1/gems/ne
Currently this repository has an example echo-service
located in the examples
folder. There is no information on what to do with and how to use the echo-service
.
It would be great if you could:
When I perform a bind request, the framework fails to respond with the following error:
ReferenceError: Enryptor is not defined
./node_modules/aws-sdk/lib/request.js:32
Hello,
I have quite some interest in this project as I am trying to develop something similar.
So I was wondering if this project was abandoned. If it is, what are the reasons for that?
Also, can I contribute to this project? Do you accept pull requests, since CloudFoundry has evolved now and some things are different.
Best regards,
Stefan
There are a number of interface issues on the provision method.
I suggest that the provision method can return a reply which contains 'code' and 'description' to be interpreted by the framework as the desired response.
Error stack while npm install cf-services-connector --save
bash-3.2$ npm install cf-services-connector --save >> /tmp/cfsc-install.log
npm WARN package.json [email protected] No README data
In file included from ../src/batch.cc:5:
../node_modules/nan/nan.h:261:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../node_modules/nan/nan.h:265:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:257:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../node_modules/nan/nan.h:265:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:257:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../node_modules/nan/nan.h:270:9: error: no type named 'ThrowException' in namespace 'v8'
v8::ThrowException(error);
~~~~^
../node_modules/nan/nan.h:276:65: error: no member named 'New' in 'v8::String'
v8::Local<v8::Value> err = v8::Exception::Error(v8::String::New(msg));
~~~~~~~~~~~~^
../node_modules/nan/nan.h:278:26: error: no member named 'New' in 'v8::String'
obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber));
~~~~~~~~~~~~^
../node_modules/nan/nan.h:289:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../node_modules/nan/nan.h:293:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:257:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../node_modules/nan/nan.h:293:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::TypeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:257:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../node_modules/nan/nan.h:297:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../node_modules/nan/nan.h:301:5: error: no member named 'ThrowException' in namespace 'v8'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:257:11: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
~~~~^
../node_modules/nan/nan.h:301:5: error: no member named 'New' in 'v8::String'
_NAN_THROW_ERROR(v8::Exception::RangeError, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:257:26: note: expanded from macro '_NAN_THROW_ERROR'
v8::ThrowException(_NAN_ERROR(fun, errmsg)); \
^~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
../node_modules/nan/nan.h:544:49: error: too few arguments to function call, single argument 'isolate' was not specified
v8::Local<v8::Object> obj = v8::Object::New();
~~~~~~~~~~~~~~~ ^
/Users/charyorde/.node-gyp/0.12.5/deps/v8/include/v8.h:2388:3: note: 'New' declared here
static Local<Object> New(Isolate* isolate);
^
In file included from ../src/batch.cc:5:
../node_modules/nan/nan.h:545:14: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
obj->Set(NanSymbol("callback"), fn);
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:141:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^
/Users/charyorde/.node-gyp/0.12.5/deps/v8/include/v8.h:1379:8: note: 'IsSymbol' declared here
bool IsSymbol() const;
^
In file included from ../src/batch.cc:5:
../node_modules/nan/nan.h:545:14: error: call to non-static member function without an object argument
obj->Set(NanSymbol("callback"), fn);
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:141:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^~~~~~~~~
../node_modules/nan/nan.h:551:12: error: no member named 'Dispose' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
handle.Dispose();
~~~~~~ ^
../node_modules/nan/nan.h:552:12: error: no member named 'Clear' in 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >'
handle.Clear();
~~~~~~ ^
../node_modules/nan/nan.h:556:46: error: no member named 'NewSymbol' in 'v8::String'; did you mean 'IsSymbol'?
return NanPersistentToLocal(handle)->Get(NanSymbol("callback"))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:141:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^
/Users/charyorde/.node-gyp/0.12.5/deps/v8/include/v8.h:1379:8: note: 'IsSymbol' declared here
bool IsSymbol() const;
^
In file included from ../src/batch.cc:5:
../node_modules/nan/nan.h:556:46: error: call to non-static member function without an object argument
return NanPersistentToLocal(handle)->Get(NanSymbol("callback"))
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:141:38: note: expanded from macro 'NanSymbol'
#define NanSymbol(value) v8::String::NewSymbol(value)
~~~~~~~~~~~~^~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/leveldown/src/batch.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 12.5.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/charyorde/projects/nodescripts/yookore-proxy/node_modules/cf-services-connector/node_modules/level/node_modules/leveldown
gyp ERR! node -v v0.12.5
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm ERR! Darwin 12.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "cf-services-connector" "--save"
npm ERR! node v0.12.5
npm ERR! npm v2.11.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/charyorde/projects/nodescripts/yookore-proxy/npm-debug.log
npm install cf-services-connector fails.
npm WARN package.json [email protected] No description
npm WARN package.json [email protected] No repository field.
npm WARN package.json [email protected] No README data
> [email protected] install /Users/rvennam/sandbox/brokertest/node_modules/cf-services-connector/node_modules/restify/node_modules/dtrace-provider
> node scripts/install.js
---------------
Building dtrace-provider failed with exit code 1 and signal 0
re-run install with environment variable V set to see the build output
---------------
> [email protected] install /Users/rvennam/sandbox/brokertest/node_modules/cf-services-connector/node_modules/restify/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
> [email protected] install /Users/rvennam/sandbox/brokertest/node_modules/cf-services-connector/node_modules/level/node_modules/leveldown
> node-gyp rebuild
...
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.0/snappy-stubs-internal.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.0/snappy.o
LIBTOOL-STATIC Release/snappy.a
CXX(target) Release/obj.target/leveldown/src/batch.o
In file included from ../src/batch.cc:5:
../node_modules/nan/nan.h:261:12: error: no member named 'New' in 'v8::String'
return _NAN_ERROR(v8::Exception::Error, errmsg);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:252:21: note: expanded from macro '_NAN_ERROR'
fun(v8::String::New(errmsg))
~~~~~~~~~~~~^
...
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/rvennam/sandbox/brokertest/node_modules/cf-services-connector/node_modules/level/node_modules/leveldown
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "cf-services-connector" "--save"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the leveldown package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls leveldown
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/rvennam/sandbox/brokertest/npm-debug.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.