Code Monkey home page Code Monkey logo

node-red-bluemix's Introduction

node-red-bluemix

A wrapper for deploying Node-RED into the IBM Cloud platform.

What is IBM Cloud?

IBM Cloud is an implementation of IBM's Open Cloud Architecture, built on Cloud Foundry.

To sign-up for a free trial, head on over here.

Node-RED on IBM Cloud

This repository provides two things.

  1. a wrapper to Node-RED that is suitable for deploying your own instance into IBM Cloud - under the public/app directory

  2. a node.js application that serves this up as a quick-start boilerplate into the IBM Cloud dashboard.

Deploying Node-RED into IBM Cloud

The quick way to do this is to log into the IBM Cloud dashboard and select Node-RED Starter from the list of Boilerplates.

To manually deploy an instance, the steps can be taken.

This assumes you already have the cf tool installed and logged into IBM Cloud.

  1. Decide what you want to call your application. For this example, let's go with nr-fred.

  2. Via the IBM Cloud dashboard, create an instance of Cloudant NoSQL DB called: nr-fred:cloudantNoSQLDB

  3. Create the file public/app/manifest.yml, with the following contents, updated to reflect your chosen name:

     ---
     applications:
     - name: nr-fred
       memory: 256M
       command: node node_modules/node-red/red.js --settings ./bluemix-settings.js
       services:
       - nr-fred:cloudantNoSQLDB
    
  4. From within the public/app directory, run:

     $ cf push
    
  5. Once deployed, you can access your instance of Node-RED at https://nr-fred.ng.bluemix.net.

node-red-bluemix's People

Contributors

annaet avatar dceejay avatar knolleary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-bluemix's Issues

Manual Bluemix deployment error

Hi,

I've been experiencing problems in creating Node-Red boiler plate on Bluemix (have raised a ticket for it) - so I'm trying to do a manual deployment with this in the mean time instead.

It's failing with error of 'Can not find Node-red module', logs:

2016-03-15T17:19:40.726-0000[DEA/103]OUTStarting app instance (index 0) with guid f2eeaa9c-c331-4e18-8dd3-129af0418a47
2016-03-15T17:19:51.215-0000[App/0]ERRmodule.js:328
2016-03-15T17:19:51.215-0000[App/0]ERR throw err;
2016-03-15T17:19:51.215-0000[App/0]ERR ^
2016-03-15T17:19:51.216-0000[App/0]ERRError: Cannot find module '/home/vcap/app/node_modules/node-red/red.js'
2016-03-15T17:19:51.221-0000[App/0]ERR at Function.Module._resolveFilename (module.js:326:15)
2016-03-15T17:19:51.222-0000[App/0]ERR at Function.Module.runMain (module.js:442:10)
2016-03-15T17:19:51.222-0000[App/0]ERR at Function.Module._load (module.js:277:25)
2016-03-15T17:19:51.222-0000[App/0]ERR at startup (node.js:136:18)
2016-03-15T17:19:51.223-0000[App/0]OUT
2016-03-15T17:19:51.223-0000[App/0]ERR at node.js:966:3
2016-03-15T17:19:51.396-0000[DEA/103]ERRInstance (index 0) failed to start accepting connections
2016-03-15T17:19:51.423-0000[API/1]OUTApp instance exited with guid f2eeaa9c-c331-4e18-8dd3-129af0418a47 payload: {"cc_partition"=>"default", "droplet"=>"f2eeaa9c-c331-4e18-8dd3-129af0418a47", "version"=>"cb3061b2-27ad-4719-aab6-d4783709d6ca", "instance"=>"de4fdb8b28514b8d88d68f542de09bda", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1458062391}

Storage API for mongoDB

I saw that you have modules to storage the Workflows inside mongoDB with mongostorage.js but how can I configure node-red to use this module and save my workflows in my mongodb instance???

Regards

Node-red on IBM failed

Node-red on IBM suddenly failed within days and does not work.

Error: Cannot find module '/home/vcap/app/node_modules/node-red/red/red' (line:17)

efected nodes;

Flows stopped due to missing node types.
postgresdb
postgres

Enforce SSL

I would like to enforce SSL connections to my Node-Red instance running in Bluemix.

There are lots of examples on best practices for this if you wrap Node-Red in an express app.

https://developer.ibm.com/answers/answers/18076/view.html

http://stackoverflow.com/questions/25734691/how-do-i-enforce-ssl-for-my-bluemix-application

https://developer.ibm.com/answers/questions/8617/how-to-tell-if-my-application-was-requested-using-ssl/?smartspace=bluemix

However, I would like to use the existing structure as it is quite simple and elegant... Any thoughts on the best way to do this?

(One option might be to allow middlewares to be passed into Node-Red's settings.js?)

Renaming the app causes the app to crash at startup

If you rename the app, you get a "No cloudant service found" error at app startup.
This is due to the nodeRed application code making an assumption that the Cloudant servicename will always contain the name of the original application name. So, if the app name changes, it means that the nodeRED application fails as it attempts to find Cloudant service.
The problem seems to be in the following lines of the bluemix-settings.js file:
settings.couchAppname = VCAP_APPLICATION['application_name'];
var storageServiceName = process.env.NODE_RED_STORAGE_NAME || new RegExp("^"+settings.couchAppname+".cloudantNoSQLDB");
var couchService = appEnv.getService(storageServiceName);

How can I upgrade the node-RED version in Bluemix ?

I add the node-red-node-msgpack into node_module by means of chaning package.json and deploy.
now I can see the module were installed from the dashboard of Bluemix.
but, msgpack dosen't work. this happend before when I using the old version of the node-RED.
so, I'm douting the latest version is not deploied by Bluemix.
How can I upgrade the node-RED version in Bluemix ?

and, How can I change the setting.js in Bluemix ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.