SAP / node-rfc

Asynchronous, non-blocking SAP NW RFC SDK bindings for Node.js
Apache License 2.0
249 stars 73 forks source link

Cloud Foundry support #79

Open rahul4sap opened 5 years ago

rahul4sap commented 5 years ago

Hello,

Is there any way (simpler) by which we can deploy the Node-RFC application on Cloud Foundry? I mean download the SDK in the project folder and refer the node_modules to this custom path and then deploy whole folder as a package to Cloud Foundry?

Thanks, Rahul

bsrdjan commented 5 years ago

Related #24

bsrdjan commented 5 years ago

The RFC connectivity on SAP Cloud Foundry works with Java buildpacks only. It s not supported for nodejs buildpacks, referring to SAP Cloud Foundry Connectivity -> Restrictions -> Protocols:

You can communicate with SAP systems down to SAP R/3 release 4.6C. Supported runtime environment is SAP Java Buildpack with a minimal version of 1.8.0.

I would suggest discussing this as a feature request for SAP Cloud Connector, rather than here.

mtolksdorf commented 5 years ago

Hello Rahul, actually, this would not be a feature request to Cloud Connector, which is already supporting RFC, but more or less to NW RFC SDK to be supported within SAP Cloud Platform Connectivity context and to be able to use the Cloud Connector channel.

Best regards, Markus

ramachandrareddy1 commented 4 years ago

Hi Mtolsdorf,

Can u share the docs regarding how to use the cloud Connector channel?

Thanks && Regards,

R.Ram

mtolksdorf commented 4 years ago

Hi ramachandrareddy1,

as already written, this would be a feature request. There is no SAP CP variant of NW RFC SDK that would support this channel. In SAP CP, only Java runtimes in Neo and the SAP Java Buildpack in Cloud Foundry support the communication with RFC over SCC using JCo APIs.

Best regards, Markus

manishvyas1911 commented 4 years ago

I finally figured out a way to get this done. First of all let me get you through issues.

Issue : Error: /var/task/node_modules/node-rfc/lib/binding/sapnwrfc.node: invalid ELF header

Solved: Created Node modules.

Issue: Error: libsapnwrfc.so: cannot open shared object file: No such file or directory

Solved: Copy nwrfcsdk libraries in lib folder and zip with code.

Issue: Not able to load libraries from lib folder.

Solved: Lambda has LD_LIBRARY_PATH set to /var/task/lib where I was putting the libraries in /var/task/libs

Issue: Error: libuuid.so.1: cannot open shared object file: No such file or directory

Solved:

AWS Lambda uses the amzn2-ami-hvm-2.0.20190313-x86_64-gp2 Linux study gives: lib, lib64 folder may contain system libraries. get all the files required from amazon linux docker. paste it inside lib folder. Steps to get it done.

Create a layer in aws lambda with node-rfc modules.

manishvyas1911 commented 4 years ago

Created a demo video on how to? It may help https://www.youtube.com/watch?v=rhY4jVtl0k8&t=39s

bsrdjan commented 4 years ago

Thanks @manishvyas1911, it can help people interested in deploying packages with binary dependencies to AWS Lambda.

In node-rfc / NWRFC SDK context, the usage is rather theoretical because the ABAP backend connectivity is not possible, without the above mentioned feature request implemented by SAP.

bsrdjan commented 3 years ago

The feature request to enable the usage of SAP NWRFC SDK within the Connectivity context of SAP Cloud Platform can be created for Security Services category of the SAP Cloud Platform – Platform Foundation campaign.

bsrdjan commented 3 years ago

You may vote for the new request, linked here: https://github.com/SAP/node-rfc/issues/145#issuecomment-781209573

bsrdjan commented 9 months ago

Here the current status: ABAP RFC connectivity from Kyma and BTP Node.JS buildpack