Is Changing Node-RED starter app name not allowed on IBM Cloud?

#1

I created Node-RED starter app and created the flow by flow editor.
I could access the flow editor and URL defined in the app correctly.

But after I changed Node-RED starter app name on IBM Cloud and restarted, the app clashed and never launched.
So I changed Cloudant's name too, the app was correctly launched but Node-RED flow editor seemed to be initialized.

And I got the following message by "cf logs appname --recent" command.
"[couchstorage] No default flow found"
"[couchstorage] No default credentials found"

I confirmed there are still flow and credenctial json content in Cloudant.
I read the content of bluemix-settings.js and couchstorage.js of Node-RED.
Node-RED expects Node-RED app name and Cludant app name are matched, and also Node-RED app name and kes of json data in Cloudant are matched.

So I think we should not change Node-RED starter app name on IBM Cloud.
Is is correct?

And is this a bug?
If this is a bug, who should be responsible?
Is that IBM Cloud or Node-RED?
Please tell me.

Sincierly,
Kenta Okumura

0 Likes

#2

Hi - I maintain the Node-RED boilerplate application that is hosted in IBM Cloud.

What you describe is the expected behaviour; as you've seen in the code, the app expects the cloudant instance name to match, so that it can reliably find the right cloudant instance with your flow data in.

The boilerplate is going to be replaced later in the year with the newer Starter Kit approach in the catalog - so there's little benefit to making any changes to the boilerplate now. It has been like this for 2-3 years.

Regards,
Nick

0 Likes

#3

Thanks for quick reply.

Really? So you mean we should not change Node-RED app name?
Or if we would like to change the app name, we have to change Cloudant instance name and keys in Cloudant too?
How is the other people doing?

we' re really in trouble about this matter, because we announced to our customer that they can change Node-RED app name easily.

I think it's kind of bugs, because there is no announce like what you told me.
And it's very easy to change Node-RED app name.
I think users will confuse and be in trouble like us.
What do you think?

Sincierly,
Kenta Okumura

0 Likes

#4

Hi - correct, if you want to use the Node-RED boilerplate, you shouldn't modify the application name. I can only assume most users don't rename their app given how rarely anyone asks about it.

The Node-RED boilerplate is a free-to-use example of how to run Node-RED in IBM Cloud. It isn't a fully supported offering from IBM. And, as I mentioned, it will be replaced later in the year with a Starter Kit entry in the catalog - I don't have any more details on that because I haven't had the time to work on it yet.

The boilerplate code is open-source and free for you to clone and modify how you want: https://github.com/ibmets/node-red-bluemix-starter

If you rename the app, you can set the NODE_RED_STORAGE_NAME environment variable to tell Node-RED which cloudant instance to use - https://github.com/ibmets/node-red-bluemix-starter/blob/master/bluemix-settings.js#L85

But you are right that it will still use the appname as the database name in cloudant. That is something that cannot be overridden by an environment variable - but it would not be much effort to add that in. I may have time to do that later this week, but you're free to raise a pull-request if you'd like - it still requires me to find the time to test and deploy the change.

Nick

0 Likes

#5

Thanks for your quick reply.

Hi - correct, if you want to use the Node-RED boilerplate, you shouldn't modify the application name. I can only assume most users don't rename their app given how rarely anyone asks about it.

I didn't know such a thing...
If so, it's very very strange that we can modify app names easily by GUI on IBM Cloud.
I think IBM Cloud must ban modifying app names when users use Node-RED boilerplate.
Don't you think so?

Sincierly,
Kenta Okumura

0 Likes

#6

No. IBM Cloud does not know anything about Node-RED. As far as it is concerned, you have deployed an application and it allows you to manage it just as you can any application you deploy. It does not make a special case of any application.

The Node-RED boilerplate is just a convenient way to get an instance of Node-RED deployed with a cloudant instance attached. Beyond that, it is up to you to manage and maintain your own application.

0 Likes

#7

Thanks for your quick reply.

No. IBM Cloud does not know anything about Node-RED.

Oh, really... That's a pity...

The Node-RED boilerplate is just a convenient way to get an instance of Node-RED deployed with a cloudant instance attached. Beyond that, it is up to you to manage and maintain your own application.

I understand your opinion.
In the future, we never modify app names of Node-RED boilerplate.

But in my opinion, the current specification is not user-freindly.
I hope the confirmation dialog should appear about the relation between Node-RED app name and Cloudant when I modify app names.
If I request you or someone who related with IBM Cloud development, would it be possible to show some cautions when I rename Node-RED app?
There should be some users like me who don't know the importance of Node-RED app name.

Sinciely,
Kenta Okumura

0 Likes

#8

I appreciate your feedback.

As I've said, the IBM Cloud has absolutely no awareness of the details of a user's app. It doesn't know it is Node-RED, just as it doesn't know if its a Wordpress instance or anything else.

There is no way for it to provide any application-specific warning. Sorry.

Nick

0 Likes

#9

Thanks for your answer.

I understood your opinion.
I will be thinking whether I submit pull-request about NODE_RED_STORAGE_NAME.
If I submit, I would appreciate your cooperation at that time.

Sincierly,
Kenta Okumura

0 Likes