3

I have the following lines in my config file

commands:
  install_packages:
    command: sudo yum -y install libxml2-devel libxslt-devel

I have also tried it the way of

packages:
  yum:
    libxml2-devel: []
    other package

Both of which seem to fail to install the packages.

I am trying to install the pyusps python module and the installation will fail without those packages. I can SSH in and install them manually and than pyusps will install

I am not sure where I am going wrong here.

Thanks

John Hamlett IV
  • 495
  • 11
  • 23
  • sudo is not required inc commands as it is executed by root. Be sure cwd and PATH are correctly specified too. – Sébastien Stormacq Apr 11 '16 at 21:14
  • packages would be the logical way to go. Stupid question : are you sure libxml2-devel is available in your repo ? Are you sure YUM is the package manager for your linux distro (are you using Amazon Linux?) – Sébastien Stormacq Apr 11 '16 at 21:15
  • I am sure libxml2-devel is available I can ssh into it and install it, also yes I am using the Amazon linux – John Hamlett IV Apr 11 '16 at 21:16
  • Also, YAML is very sensitive to TABs vs SPACES (only spaces are valid). Do you have the correct number of spaces for indentation ? – Sébastien Stormacq Apr 11 '16 at 21:16
  • I believe I have the correct number of spaces, I modeled it after the generated file, I used the space key not tab – John Hamlett IV Apr 11 '16 at 21:19
  • sorry for all my stupid questions, but I want to eliminate all classical mistakes : what is your directory layout ? Config files must be in .ebextensions and have a .config extension. That directory must be part of your ZIP file (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html) – Sébastien Stormacq Apr 11 '16 at 21:21
  • Not a problem, I appreciate the help. the config file exists in the .ebextensions folder and i am using the command "eb create --single -t worker -k OIT-cleanAddressKey -i t2.medium" to create the eb – John Hamlett IV Apr 11 '16 at 21:22
  • ok, so you're not packaging in ZIP. is your .ebextensions under GIT control ? (git add / git commit). What is the output of git status ? – Sébastien Stormacq Apr 11 '16 at 21:24
  • No they are in my gitignore file as they are added to it by default – John Hamlett IV Apr 11 '16 at 21:27

1 Answers1

6

The config files must be part of an .ebextensions directory added to your project sources.

When deploying your code using the eb create / eb deploy command line, these commands are using the git archive command to package your code and upload it to Elastic Beanstalk for deployment (http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-deploy.html)

When your .ebextensions is not under git control (e.g. if it's included in your .gitignore), the directory and its config files are not packaged and sent to Elastic Beanstalk.

Be sure that you add and commit the .ebextensions directory before you deploy to Elastic Beanstalk.

git add .ebextensions/*
git commit -m "add eb config files"
CDspace
  • 2,639
  • 18
  • 30
  • 36
Sébastien Stormacq
  • 14,301
  • 5
  • 41
  • 64
  • I don't know what is an ebignore file. Just add your .ebextensions directory to git and redeploy, it will solve your problem – Sébastien Stormacq Apr 12 '16 at 03:57
  • Thank you so much! – John Hamlett IV Apr 12 '16 at 16:03
  • 1
    .ebignore is the elasticbeanstalk equivalent of a .gitignore and replaces a .gitignore on deployment, so it's important. See this SO answer: http://stackoverflow.com/questions/28763205/exclude-directories-from-elastic-beanstalk-deploy – hephalump Apr 13 '16 at 18:33