-
-
Save eyelove/420f38e593f1a42fca8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages: | |
yum: | |
gcc: [] | |
libstdc++-devel: [] | |
gcc-c++: [] | |
fuse: [] | |
fuse-devel: [] | |
libcurl-devel: [] | |
libxml2-devel: [] | |
openssl-devel: [] | |
mailcap: [] | |
automake: [] | |
sources: | |
/tmp: https://github.com/s3fs-fuse/s3fs-fuse/archive/v1.78.zip | |
files: | |
"/etc/fuse.conf" : | |
mode: "000644" | |
owner: root | |
group: root | |
content: | | |
# mount_max = 1000 | |
user_allow_other | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/11_unmount_s3fs.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
if mountpoint -q [/path/on/filesystem]; then | |
fusermount -u [/path/on/filesystem] | |
fi | |
"/opt/elasticbeanstalk/hooks/appdeploy/enact/02_mount_s3fs.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
. /opt/elasticbeanstalk/support/envvars | |
# Make sure it's mounted as the webapp user | |
id=`id -u webapp` | |
s3fs [your-bucket]:[/optional/path/in/bucket] [/path/on/filesystem] -o nonempty -o uid=$id -o gid=$id -o use_cache=/tmp -o allow_other | |
commands: | |
01_patch_s3fs: | |
cwd: /tmp/s3fs-fuse-1.78/src | |
command: "sed -i 's/AWSACCESSKEYID/AWS_ACCESS_KEY_ID/g;s/AWSSECRETACCESSKEY/AWS_SECRET_KEY/g' s3fs.cpp" | |
02_install_s3fs: | |
cwd: /tmp/s3fs-fuse-1.78 | |
test: "[ ! -x /usr/bin/s3fs ]" | |
command: "autoreconf --install && export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig && ./configure --prefix=/usr && make && make install" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment