2020年5月20日水曜日

Beanstalk for S3のマウント方法について(by Docker)

Beanstalkにて、コンテナ作成時にS3のマウント方法について
以下、記載します。
1)goopysのインストールを行うと、以下のエラーが表示されてマウントできない。

yum install golang fuse git -y
---------------------------------------------------
export GOPATH=$HOME/go
go get github.com/kahing/goofys
go install github.com/kahing/goofys
mkdir /mnt/mnt-goofys
/root/go/bin/goofys test23 /mnt/mnt-goofys
-----------------------------------------------------

エラー内容:
Feb 16 02:14:32 4d35e2afd964 /root/go/bin/goofys12390: s3.INFO Switching from region 'us-east-1' to 'ap-northeast-1'
Feb 16 02:14:32 4d35e2afd964 /root/go/bin/goofys12390: main.FATAL Mounting file system: Mount: mount: running fusermount: exit status 1#012#012stderr:#012fusermount: fuse device not found, try 'modprobe fuse' first#012
原因:docker特有の権限の問題でマウントが出来ないので、docker実行時のオプションで --privilegedを加えてあげる必要がある。


2)ebextensions内に追加する。

vi .ebextensions/00.docker.config
------------------------------------------------------
commands:
  01_privileged:
    command: 'sed -i "s/docker run -d/docker run --privileged -d/" /opt/elasticbeanstalk/hooks/appdeploy/enact/00run.sh'
------------------------------------------------------

0 件のコメント:

コメントを投稿

AIツール断捨離の果てに

  導入 ハード環境 : Mac Studio M4 Maxの導入。 背景 : 以前から使い倒してきたITエンジニアとして、話題のAIツール(Cursor, Zed, Void, Continue, Roo Codeなど)を片っ端から実戦投入してみたこと。 目的 : ツールをいじ...