1

Hi I want to use goofys on AWS ElasticBeanstalk php 7.0 environment.
I create .ebextentions/00_install_goofy.config.

(install golang from binary because golang version by yum is old.

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 

But 100_install_golang_03 not work well...

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)

I cant export env and path. Can I set PATH on .ebextensions?

Or is there better way to install goofys on ElasticBeanstalk automatically.

khc
  • 344
  • 2
  • 8
hani
  • 43
  • 4
  • Why don't you define the env variables by the EB config file, instead of launching commands on each instance? – Jundiaius Sep 15 '17 at 13:24
  • Thank you for comment. I want to install and mount S3 bucket before application. – hani Sep 17 '17 at 01:06

1 Answers1

1

finally I find commands defined by .ebextensions run NO EVIRONMET VALUE. It work on an environment like sandbox.

So scope of "export" commands is only "command" section.

if you want to use PATH in commands, you have to add export command to every commands.

Additionally if you want use PATH after eb deployed, see following link.

How can I add PATH on Elastic Beanstalk

hani
  • 43
  • 4