|
elastic beanstalk and shared storage
Posted on:
Sep 7, 2011 4:18 PM
|
|
|
|
 |
This question is not answered. Answer it to earn points.
|
I have a web application on elastic beanstalk that allows users to upload files. These files will then get processed by other background applications running on various ec2 instances. This requires some kind of shared storage since EBS volumes can only be mounted to a single instance. My initial thought was to expose the EBS volume through NFS, however I am having a lot of problems mounting NFS share on the beanstalk instance.
Can anyone point me in the right direction on how to make a beanstalk instance a NFS client? (NFS4) If this is totally on the wrong path to accomplish what I want, any other tips are appreciated as well.
Thanks
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 7, 2011 4:46 PM
|
|
|
|
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 8, 2011 11:01 AM
|
|
|
|
We have considered s3, but it requires use of either the s3 api or third party such as s3fs. EBS and NFS seemed to be simpler at the time.
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 8, 2011 11:22 AM
|
|
|
|
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 8, 2011 12:08 PM
|
|
|
|
Here is the command I use to test:
sudo mount -t nfs4 xxx.compute-1.amazonaws.com:/ebs_volume /storage
Here is the result:
mount: wrong fs type, bad option, bad superblock on xxx.compute-1.amazonaws.com:/ebs_volume,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
The same nfs share is mounted successfully on a different ec2 instance.
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 8, 2011 12:30 PM
|
|
|
|
Thank you for the details!
Can your Elastic Beanstalk instance ping the EC2 instance running the NFS share? If not, I suspect that the NFS share is running under a different security group, hence the 2 instances cannot talk to each other.
To fix that, you can follow the steps highlighted here: https://forums.aws.amazon.com/thread.jspa?messageID=233304𸽘.
Saad
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 8, 2011 1:03 PM
|
|
|
|
It is running under a different security group. After I opened up ICMP, i was able to ping the instance with the NFS share.
I have inbound rules on tcp port 111,2049 and udp 111 for both the elasticbeanstalk-default group and its ip. However, mounting still results in the same error message.
Is there anything I have to do to enable nfs4 on the elastic beanstalk ami?
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 8, 2011 1:50 PM
|
|
|
|
By default, Elastic Beanstalk doesn't install anything specific to run a NFS client on the EC2 instance. Elastic Beanstalk uses EC2 instances running the Amazon Linux AMI. I suspect there are some packages/libraries/services missing that you might need installed, in order to successfully mount the share.
What is the operating system and what's installed on the other EC2 instance (that succesfully mounted the share)?
You can use the yum repo on the Elastic Beanstalk instance to install missing dependencies (try running "yum list | grep nfs" for a list of nfs utils).
Thanks,
Saad
|
|
|
|
Re: elastic beanstalk and shared storage
Posted on:
Sep 9, 2011 10:06 AM
|
|
|
|
Thanks for you help, originally I thought nfs-utils is only needed by servers. I was able to get it to work after installing it.
|
|
|
|
|