VMware Tanzu Kubernetes Grid Integrated Edition

 I have created a Dotnet Core application to run as windows service. It runs fine. Now I want to set it's user so it can access file share server. I have created User provided service passed credentials and binded it my application.

Gaurav Thakur's profile image
Gaurav Thakur posted Jul 19, 2018 11:47 AM

 

Daniel Mikusa's profile image
Daniel Mikusa

I don't know exactly what you're passing in through the user provided service, but this doc might be helpful.

 

https://dotnet-cookbook.cfapps.io/3rdparty/smb_file_shares/

Gaurav Thakur's profile image
Gaurav Thakur

Thanks @Daniel Mikusa - Tanzu Support​ for your answer. I tried to use "WindowsNetworkFileShare" from shared doc. It works fine from windows machine. But when I push the application to PCF linux container I am getting following error: Unable to load DLL 'mpr.dll': The specified module or one of its dependencies could not be found."

Any workaround?

Daniel Mikusa's profile image
Daniel Mikusa

The solution listed at that link is specific to Windows 2012r2. It won't work with PASW (i.e. Windows 2016) or on Linux. The Linux Solution is SMB Volume Services. That is something which needs to be deployed by your platform Operator, so you may need to reach out to your operator and request it to be installed. When it's installed, you should see it in the marketplace (ie. `cf m`).

 

https://docs.pivotal.io/partners/smb-volume-service/index.html

 

Daniel Mikusa's profile image
Daniel Mikusa

Not via SMB. However, you could share files with your Linux apps via NFS. PCF deploys volume services for NFS out-of-the-box for Linux containers (it may already be in the marketplace or your operator can grant you access). At the same time, NFS doesn't work on your Windows servers so it's not a solution for all of your apps.

 

The other option would be to not use a shared file system. Shared file systems should generally be avoided as they don't tend to scale well, can have sub-optimal performance and can exhibit weird/unexpected behaviors. Instead trying using a HTTP based file storage like S3 or Minio. They're not perfect for all workloads, but are generally a superior solution if they fit your workload.

 

Hope that helps!

Gaurav Thakur's profile image
Gaurav Thakur

Thanks Daniel, I will ask our Cloud team if that can be made available. Is there any other way to do so?