4

Is it possible to deploy multiple platforms to AWS?

I have a PHP application that I would also like to run a small python script.

I see the PHP platform installs Python by default, but using eb deploy AWS does not pick up requirements.txt and install the dependencies.

I have tried installing requirements.txt manually which hangs when trying to install lxml. I also tried adding a config file:

option_settings:
  aws:elasticbeanstalk:container:python:
    WSGIPath: application.py
    NumProcesses: 3
    NumThreads: 20

But now eb deploy complains about:

ERROR: "option_settings" in one of the configuration files failed validation. More details to follow.
ERROR: Unknown or duplicate parameter: WSGIPath                     
ERROR: Unknown or duplicate parameter: NumThreads                   
ERROR: Unknown or duplicate parameter: NumProcesses  

Which I believe is because eb thinks this is only a PHP app.

What is the proper way to run multiple platforms side-by-side?

Mark B
  • 183,023
  • 24
  • 297
  • 295
Vinnie James
  • 5,763
  • 6
  • 43
  • 52
  • 1
    I'd perhaps recommend doing this through docker containers, and linking them, and using EB docker platform. You can build an image locally, and then give that docker file to EB to build the image. Maybe this can help get you started; https://rominirani.com/docker-tutorial-series-part-8-linking-containers-69a4e5bf50fb#.l476ahig4 – Perspective Aug 31 '16 at 00:37
  • I would like to keep it simple since the python is very small and doesnt justify its own server. Is there a better way to run a setup script on deploy that will install the python dependencies on each server in the cluster? Im familiar with adding config files via .ebextensions, can these be used to create and run a shell script? – Vinnie James Sep 01 '16 at 00:53
  • Going to try converting the `requirements.txt` to `.ebextentions` format, eg `packages: python: python-beautifulsoup3: []` http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-packages – Vinnie James Sep 07 '16 at 16:18

1 Answers1

3

Solved by using .ebextentions to run pre-install commands in the container during deployment, which required setting the system path during eb deploy

Community
  • 1
  • 1
Vinnie James
  • 5,763
  • 6
  • 43
  • 52