Giter Site home page Giter Site logo

node-red-app's Introduction

WARNING: This repository is no longer maintained ⚠️

This repository will not be updated. The repository will be kept available in read-only mode.

IBM Cloud

IBM Cloud platform Apache 2

Node-RED IBM Cloud Starter Application

Customising Node-RED

This repository is here to be cloned, modified and re-used to allow anyone create their own Node-RED based application that can be quickly deployed to IBM Cloud.

The default flows are stored in the defaults directory in the file called flow.json. When the application is first started, this flow is copied to the attached Cloudant instance. When a change is deployed from the editor, the version in cloudant will be updated - not this file.

The web content you get when you go to the application's URL is stored under the public directory.

Additional nodes can be added to the package.json file and all other Node-RED configuration settings can be set in bluemix-settings.js.

If you do clone this repository, make sure you update this README.md file to point the Deploy to IBM Cloud button at your repository.

If you want to change the name of the Cloudant instance that gets created, the memory allocated to the application or other deploy-time options, have a look in manifest.yml.

Environment Variables

The following environment variables can be used to configure the application:

  • NODE_RED_STORAGE_NAME - the Cloudant service name as exposed in VCAP_SERVICES
  • NODE_RED_STORAGE_DB_NAME - the name of the database to use on Cloudant
  • NODE_RED_STORAGE_APP_NAME - the prefix used in document names, allowing multiple instances to share the same database.
  • NODE_RED_USERNAME, NODE_RED_PASSWORD - if set, used to secure the editor
  • NODE_RED_GUEST_ACCESS - if the editor is secured, this will allow anonymous, read-only access
  • NODE_RED_USE_APPMETRICS - enables the appmetrics dashboard

node-red-app's People

Contributors

bjulbricht avatar chuckcox avatar dependabot[bot] avatar gee4vee avatar imgbotapp avatar jmeis avatar johnwalicki avatar knolleary avatar mgrattray avatar nfstein avatar youming-lin avatar

Stargazers

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

Watchers

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

node-red-app's Issues

WebApp Starter Fails to deploy in pipeline

When deploying using the WebApp starter the deploy pipeline stage fails as it is trying to bind the Cloudant service, but the service name is incorrect in the script configured into the pipeline - do services need to be bound here, as the CF App already has the services bound?

deploy.log.txt

Deploy to IBM Cloud Foundry not working - no cloudant !

fails to provision CloudantDB
fails to include manifest.yml - deployment fails due to exceeded memory - 1.25GB instead of 256MB, no dependency on cloudantNoSQLDB service

fixing memory in Cloud Foundry app view results in deployment, but fails to use Cloudant

APP/PROC/WEB | 0 | 13 Apr 14:46:14 - Failed to find the Cloudant URL | Apr 13, 2021, 3:46:14 PM
-- | -- | -- | --
APP/PROC/WEB | 0 | 13 Apr 14:46:14 - Loading application settings | Apr 13, 2021, 3:46:14 PM
APP/PROC/WEB | 0 | 13 Apr 14:46:14 - Starting first-use setup | Apr 13, 2021, 3:46:14 PM
APP/PROC/WEB | 0 | 13 Apr 14:46:14 - Waiting for first-use setup to complete

followed by


APP/PROC/WEB | 0 | 13 Apr 14:47:31 - [info] Flows file     : /home/vcap/app/.node-red/flows.json | Apr 13, 2021, 3:47:31 PM
-- | -- | -- | --
APP/PROC/WEB | 0 | 13 Apr 14:47:31 - [info] Creating new flow file

OPTIMIZE_MEMORY & --max-old-space-size=160 by default

After creating new project OPTIMIZE_MEMORY is set to true and also in the same time replaced by default --max-old-space-size=160 inside package.json script command.

I thinks the the only one of these should be default (OPTIMIZE_MEMORY)

Can we set the default memory usage to 256Mb?

A Lite account on IBM Cloud is allowed up to 256Mb memory allocated to CF apps. By default, this starter kit assigns 128Mb which is barely enough for a user to do much. The old boilerplate would assign 256Mb so our users didn't need to be aware of this.

Can we have some FAQs

Hi team,

Number of new users start off IBM Cloud experience with Node-RED starter app which is great but some users are not too familiar to the platform, so it would be great to have the topology explained and some troubleshooting / FAQ in this page or in the blog (https://developer.ibm.com/components/node-red/tutorials/how-to-create-a-node-red-starter-application/)

I am not too sure if this is a correct place to raise this, but if you can consider adding some explanation on the underlying technologies or minimum requirements, that would help new users to jump start.

  • Cloud Foundry space (This is where Node-RED JS app will be deployed)
  • Cloudant (Where all Node-RED flow data will go. Will be deployed when you deploy the starter)
  • Continuous Delivery service / Toolchain. This is to pull Node-RED code and deploy onto Cloud Foundry

Also, some users reported an issue when setting up the toolchain. I reproduced the issue when selecting CF org / space which I do not have access to. However the error is generic and users will not know where to fix. Also it is coming from the platform (I assume this behavor is hard to change) so can we have troubleshooting section that addresses this issue and guide users to check their CF access?
image

Node Red Starter Kit to use ubi8/nodejs-16:1 container:

Hi team,

Would it be possible for newly created Node Red Starter Kit to use ubi8/nodejs-16:1 container ?

It's because db2 nodes in a freshly created Node-RED instance deployed under Code-Engine. The “Db2 in” node from node-red-contrib-ibm-db2 (v0.3.3) throws the following error:
Error: libpam.so.0: cannot open shared object file: No such file or directory .
The image in the Dockerfile “FROM registry.access.redhat.com/ubi8/nodejs-16-minimal:1” are missing those libraries.

It can be manually changed but it would be better if it is by default.
Thank you.

Node RED dashboard: Stage Failed when Deploying

I edited the package.json file and included the following line: "node-red-dashboard": "2.x", as shown in Step 6 of the Create a Node-RED starter application tutorial.

{
    "name": "node-red-app",
    "version": "1.1.1",
    "dependencies": {
        "node-red-dashboard": "2.x",
        "@cloudant/cloudant": "^4.2.2",
        "bcrypt": "^3.0.7",
        "body-parser": "1.x",
        "cfenv": "^1.2.2",
        "express": "4.x",
        "http-shutdown": "1.2.2",
        "node-red": "1.x",
        "node-red-node-cf-cloudant": "0.x",
        "node-red-node-openwhisk": "0.x",
        "node-red-node-watson": "0.x",
        "node-red-nodes-cf-sqldb-dashdb": "0.x"
    },
    "scripts": {
        "start": "node --max-old-space-size=160 index.js --settings ./bluemix-settings.js -v"
    },
    "engines": {
        "node": "12.x"
    }
}

image

The error looks something like this:

image

Is this caused due to inadequate memory allocation during the Continuous Delivery configuration?
If so, How do I go back to the Continous Delivery Configuration and change the Memory Allocation per Instance?

NodeRed does not start

Either running locally or deploying to IBM Cloud the application fails to start without any errors. It just ends after displaying
"9 Nov 13:20:38 - Loading application settings"

sjm@Stuart ai-services % npm run start

[email protected] start
node --max-old-space-size=160 index.js --settings ./bluemix-settings.js -v

9 Nov 13:20:38 - Starting Node-RED on IBM Cloud bootstrap
9 Nov 13:20:38 - Loading bluemix-settings.js
[2022-11-09T13:20:38.098] [INFO] ibm-cloud-env - Initializing with /Users/sjm/Demos/ai-services/server/config/mappings.json
Using Cloudant service: cloudant db:nodered prefix:nodered
9 Nov 13:20:38 - Loading application settings
sjm@Stuart ai-services %

Node-RED App fails on Cloudant IAM only credentials

The latest commit to bluemix-settings.js has unfortunate implications. It switches from cfenv to ibm-cloud-env. It sources /server/config/mappings.json file which wants to load credentials from /server/localdev-config.json

With credentials in a file, we can no longer manage an instance of node-red-app on a public github repo. The credentials would be exposed.

I wanted to build a delivery pipeline that points to a public github repo. Prior versions of node-red-app let me do this.

shared cloudant broken - dbname now defaults to "nodered", not sanitized appname

Unwelcome change of behaviour !

when creating a new app instance, but sharing existing Cloudant instance, expected behaviour is an app-specific db will be created to hold app flows.
recent update (Sept 2020) defaults this to NodeRED if using the Starter Kit dialog in IBM Cloud -- app deploys OK, but will point to a previous nodered db instead of creating a new one.

No mention of option to override with NODE_RED_STORAGE_DB_NAME and nowhere to set that in the Starter kit dialog.

Now effective failure to benefit from sharing cloudant instance

Could not successfully deploy

We followed the same steps as described in Github Readme file.

We successfully deploy the github code to IBM cloud but the node-red app is stopped. I tried to run but it process the first stage and when it came to the second stage it failed again and again.

An error message is pop on my screen:

"Error : An error occurred performing the operation. Try again later.
Description:
You have exceeded your organization's memory limit: app requested more memory than available (CF-AppMemoryQuotaExceeded - 100005)"

Please guide or help me out from this problem.

Thanks & Regards
Pankaj Jaswal

Deletion of Node-Red Toolchain retains cf route

After manually deleting the tools and services included in the node-red tool chain,
cloud foundry route were retained.

This was discovered through the recreation of the account with the same hostname.
The error encountered was the host name is already used. Upon trying to delete the space,
the error "CF-AssociationNotEmpty','code':10006" was encountered.

Manual clean up involves the command ibmcloud cf delete-route $domain --hostname $hostname.

is there a way to upgrade to nodered 1.2.x?

I tried several ways, and I am unable to upgrade my node-red instance on ibmcloud cf. I am stuck on 1.1.3.

It looks like the version is hardcoded to:

    "name": "node-red-app",
    "version": "1.1.3",

on the package.json file.

I tried to follow the "Upgrading the version of Node-RED" on this url: https://nodered.org/docs/getting-started/ibmcloud but it doesn't work.

All I could do was to use a k8 instance instead of a cf app. Too bad is the k8 cluster on a Lite account just works for 30 days. Any help would be appreciated. Open to help as tester and/or contribute if needed.
BR

Cloud Foundry Deployment doesn't work

Problem: Cloud Foundry Deployment doesn't work

Objective:
Using IBM Cloud Node-RED Starter-Kit to deploy a Node -RED instance to IBM Cloud for a hackathon with an IBM Cloud Lite Account.

What I did:
I used an empty lite account "no single service was instantiated" on IBM Cloud and followed the steps defined in the Starter-Kit for the App. IBM Cloud region: eu-germany

Result:

  • The single source repository for the deployment ended in cloning three different repositories into the IBM Cloud GitHub. For example one is called "tekton catalog"
  • The tekton pipeline never finished any task or step
  • The Node-RED cloud foundry application were never deployed

Error /opt/app-root/src/.node-red/package.json not found

When installing additional packages from the Node-RED Manage Palette into a Node-RED Starter container running on IBM Cloud Code Engine, there is an error message:

msg : error
"Error: ENOENT: no such file or directory, open '/opt/app-root/src/.node-red/package.json'"

The packages get installed successfully, but the error message confuses users.

@hammoaj suggests a tweak to avoid this errors when installing new nodes from the Manage Palette. It looks as if later versions of Node-RED expect a package.json file to be present in the data directory to update when you install a new node, and it errors if it isn’t there.

A minimal package.json file is needed as it will lose the content between redeploys (unless the data directory is mapped to a persistent volume which it typically won’t be on Code Engine).

The build pipeline should copy in a simple package.json to /opt/app-root/src/.node-red/package.json

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.