【发布时间】:2020-05-06 06:31:08
【问题描述】:
您好,我想在 AWS ElasticBeanstalk php 7.0 环境中使用 goofys。
我创建 .ebextentions/00_install_goofy.config。
(从二进制安装 golang,因为 yum 的 golang 版本太旧了。
packages:
yum:
fuse: []
commands:
100_install_golang_01:
command: wget https\://storage.googleapis.com/golang/go1.9.linux-amd64.tar.gz
100_install_golang_02:
command: tar -C /usr/local -xzf go1.9.linux-amd64.tar.gz
100_install_golang_03:
command: export GOROOT=/usr/local/go
test: [ -z "$GOROOT" ]
100_install_golang_04:
command: export GOPATH=/home/ec2-user/go
test: [ -z "$GOPATH" ]
100_install_golang_05:
command: export PATH=$PATH\:$GOROOT/bin\:$GOPATH/bin
100_install_golang_06:
command: echo $GOPATH > gopath
但是 100_install_golang_03 不能正常工作...
Test for Command 100_install_golang_03
[2017-09-09T14:39:52.422Z] INFO [3034] - [Application deployment app-f68c-170909_143641@1/StartupStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/prebuild_1_yubion_website] : Completed activity.
[2017-09-09T14:39:52.422Z] INFO [3034] - [Application deployment app-f68c-170909_143641@1/StartupStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: [Errno 2] No such file or directory (ElasticBeanstalk::ExternalInvocationError)
我无法导出环境和路径。我可以在 .ebextensions 上设置 PATH 吗?
或者有没有更好的方法在 ElasticBeanstalk 上自动安装 goofys。
【问题讨论】:
-
为什么不通过 EB 配置文件定义环境变量,而不是在每个实例上启动命令?
-
感谢您的评论。我想在申请之前安装和挂载 S3 存储桶。
标签: amazon-web-services amazon-elastic-beanstalk aws-cli goofys