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

Add mount nfs server support to function container #1232

Closed
feiniao0308 opened this issue Jun 23, 2019 · 15 comments
Closed

Add mount nfs server support to function container #1232

feiniao0308 opened this issue Jun 23, 2019 · 15 comments
Labels

Comments

@feiniao0308
Copy link

We have a lot of utilities and libraries stored in an internal NFS server which is maintained by other teams. To write a function, we need to call some libraries from the NFS server. But looks like current function container does not support to mount external NFS server to the container.

I'd like to request this feature support since I'm only blocked by this feature to use OpenFaaS in my project. Thanks a lot.

@feiniao0308
Copy link
Author

@alexellis could you please help it? Any way i can workaround it?

@alexellis
Copy link
Member

Please can you fill out the whole issue template? We'll need all the information to make a decision.

@alexellis
Copy link
Member

<!-- Due dilligence -->

## My actions before raising this issue
- [ ] Followed the [troubleshooting guide](https://docs.openfaas.com/deployment/troubleshooting/)
- [ ] Read/searched [the docs](https://docs.openfaas.com/)
- [ ] Searched [past issues](/issues)

<!--- Provide a general summary of the issue in the Title above -->


## Expected Behaviour
<!--- If you're describing a bug, tell us what should happen -->
<!--- If you're suggesting a change/improvement, tell us how it should work -->


## Current Behaviour
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from current behavior -->


## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas how to implement the addition or change -->


## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->


## Your Environment
<!--- Include as many relevant details about the environment you experienced the bug in -->
* FaaS-CLI version ( Full output from: `faas-cli version` ):

* Docker version `docker version` (e.g. Docker 17.0.05 ):

* Are you using Docker Swarm or Kubernetes (FaaS-netes)?

* Operating System and version (e.g. Linux, Windows, MacOS):

* Code example or link to GitHub repo or gist to reproduce problem:

* Other diagnostic information / logs from [troubleshooting guide](https://docs.openfaas.com/deployment/troubleshooting)

## Next steps

You may [join Slack](https://docs.openfaas.com/community) for community support.

@feiniao0308
Copy link
Author

feiniao0308 commented Jun 23, 2019

My actions before raising this issue

We have a lot of utilities and libraries stored in an internal NFS server which is maintained by other teams. To write a function, we need to call some libraries from the NFS server. But looks like current function container does not support to mount external NFS server to the container.

Expected Behaviour

Able to mount external NFS server to function container. The function can call some libraries/binaries from the NFS server since the function relies on the libraries/binaries.

Current Behaviour

Unable to mount external NFS server. The libraries in the NFS server is maintained by different team which does not use OpenFaaS framework, so the function cannot call it directly unless mounting the NFS server to the container

Possible Solution

No workaround solution. I'm fully blocked by it to use OpenFaaS in my project.

Context

Without the feature, I'm unable to write some functions which depends on other libraries which are stored in NFS server and maintained by other teams.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
    commit: 25cada08609e00bed526790a6bdd19e49ca9aa63
    version: 0.8.14

  • Docker version docker version (e.g. Docker 17.0.05 ):
    Client: Docker Engine - Community
    Version: 18.09.0
    API version: 1.39
    Go version: go1.10.4
    Git commit: 4d60db4
    Built: Wed Nov 7 00:47:43 2018
    OS/Arch: darwin/amd64
    Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:55:00 2018
OS/Arch: linux/amd64
Experimental: false

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Kubernetes (FaaS-netes)

  • Operating System and version (e.g. Linux, Windows, MacOS):
    MacOS

  • Code example or link to GitHub repo or gist to reproduce problem:
    N/A

  • Other diagnostic information / logs from troubleshooting guide

@feiniao0308
Copy link
Author

Thanks @alexellis for the quick response. Just update the issue template. Thanks a lot.

@alexellis
Copy link
Member

You must fill in everything. Looks like you missed the last section.

@feiniao0308
Copy link
Author

Updated @alexellis :-)

@alexellis
Copy link
Member

Code example or link to GitHub repo or gist to reproduce problem:

Can you give a sample and the error you received?

@stefanprodan
Copy link
Contributor

stefanprodan commented Jun 23, 2019

You could put those libraries in a container image and use that as the base image for your functions. This approach would allow you to version the libraries and migrate your functions independently between versions. Another advantage would be that the docker engine caches the image layers on each node. Even if the base image is larger it will be downloaded once per node.

@alexellis
Copy link
Member

I'd like to see the error. Does this involve mounting a filesystem for instance?

@feiniao0308
Copy link
Author

@stefanprodan Since the libraries are stored in external NFS server, and they linked to different libraries in the same NFS server. I cannot just extract part of libraries from the NFS server and move them into base image. Also the utitlie libraries are maintained by other teams, the libraries are updated frequently. To keep to use the latest stable libraries, we need to mount the NFS server as a volume in the container. Then access the libraries in the function.

@feiniao0308
Copy link
Author

@alexellis there's no way to mount external NFS server as a volume to function container, so no any error. I'm blocked by how I can access the libraries stored in the NFS server. To implement the function, I need call the libraries to access internal resources.

@alexellis
Copy link
Member

At this time we have no plans to add volume mounts for function containers.

Please see the following related issue: #320

That said, I think we could still help you.

The storage story for functions is normally to utilise SQL, no-sql or s3 (for instance AWS, Ceph, or Minio). I would suggest that you set up a Minio server and have it mirror the NFS server.

This way your function can pull in whatever it requires from S3 using the API when it starts up or on demand.

Here's an example blog post and tutorial for you: https://blog.alexellis.io/openfaas-storage-for-your-functions/

You may also find that functions are not appropriate for your use-case, in which case you may want to look into:

I'll close the issue now, but feel free to comment.

Alex

@alexellis
Copy link
Member

/add label: wontfix

@derek derek bot added the wontfix label Jun 23, 2019
@feiniao0308
Copy link
Author

Thanks @alexellis . Does jaas suppor to run against kubernetes?

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

No branches or pull requests

3 participants