Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Foundry support #79

Open
rahul4sap opened this issue Mar 18, 2019 · 11 comments
Open

Cloud Foundry support #79

rahul4sap opened this issue Mar 18, 2019 · 11 comments

Comments

@rahul4sap
Copy link

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 bsrdjan changed the title How to build NodeJS app (including SDK)? How to build NodeJS app (including SAP NW RFC SDK)? Mar 18, 2019
@bsrdjan
Copy link
Member

bsrdjan commented Mar 18, 2019

Related #24

@bsrdjan
Copy link
Member

bsrdjan commented Mar 18, 2019

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
Copy link

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

@bsrdjan bsrdjan closed this as completed Jun 18, 2019
@ramachandrareddy1
Copy link

Hi Mtolsdorf,

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

Thanks && Regards,

R.Ram

@mtolksdorf
Copy link

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
Copy link

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.

  • ref link: https://epsagon.com/blog/aws-lambda-layers-getting-started-guide/
    Create a folder named "lib" and add all nwrfcsdk lib files inside it.
    Pull Amazon Linux docker and go to Lib64 folder . basically you need to copy three files in your
    "lib" folder i.e. libuuid.so.1, libmount.so.1, libblkid.so.1
    image
    Create a lambda function with lambda credentials i.e index.js and zip it together with "lib" folder.
    Upload lambda with aws as
    aws lambda update-function-code --function-name my-function --zip-file fileb://function.zip
    directly through console.
    In aws lambda set environment variable as LD_LIBRARY_PATH : /var/task/lib
    Thats all. All above issues will be resolved and SDK problem is also solved.

@manishvyas1911
Copy link

manishvyas1911 commented Jun 9, 2020

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

@bsrdjan
Copy link
Member

bsrdjan commented Jun 9, 2020

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 bsrdjan changed the title How to build NodeJS app (including SAP NW RFC SDK)? How to build Cloud Foundry NodeJS app (including SAP NW RFC SDK)? Oct 22, 2020
@bsrdjan
Copy link
Member

bsrdjan commented Oct 26, 2020

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 bsrdjan added the cloud label Nov 3, 2020
@bsrdjan bsrdjan reopened this Nov 3, 2020
@bsrdjan bsrdjan changed the title How to build Cloud Foundry NodeJS app (including SAP NW RFC SDK)? Cloud Foundry support Nov 3, 2020
@bsrdjan
Copy link
Member

bsrdjan commented Feb 18, 2021

You may vote for the new request, linked here: #145 (comment)

@bsrdjan
Copy link
Member

bsrdjan commented Oct 29, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants