I am trying to deploy my application on AWS Elastic Beanstalk. I get this error and cannot fully understand where the problem is.
Below is the code present in .ebextensions/mysite-env.config
packages: yum: python-devel: [] postgresql-devel: [] container_commands: 01_syncdb: command: "django-admin.py syncdb --noinput" leader_only: true 02_createadmin: command: "scripts/createadmin.py" leader_only: true option_settings: - option_name: WSGIPath namespace: "aws:elasticbeanstalk:container:python" value: "mysite/wsgi.py" - option_name: DJANGO_SETTINGS_MODULE value: "mysite.settings"
After a few tricks, I figured out a few things
- The above configuration file works after
requirements.txt present in the root directory - It is not possible to install these packages (mentioned above), but I could install it by going into
ssh EC2 instance (weird)
The problem with [1] is that I need the above packages to install psycopg2 . So how do I install them first?
When I run these settings, I get the following error:
[2014-11-19T09:45:19.819Z] INFO [6703] - [CMD-AppDeploy/AppDeployStage0/EbExtensionPreBuild] : Activity execution failed, because: command failed with error code 1: Error occurred during build: Yum does not have postgresql-devel available for installation (Executor::NonZeroExitStatus)
Then I used the settings below
packages: none: python-devel: [] inclined: postgresql-devel: []
Then I get the following error:
[2014-11-19T09:47:54.271Z] ERROR [6789] : Command execution failed: [CMD-AppDeploy/AppDeployStage0/EbExtensionPreBuild] command failed with error code 1: Error occurred during build: [Errno 2] No such file or directory (ElasticBeanstalk::ActivityFatalError) at /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.0/lib/elasticbeanstalk/activity.rb:189:in `rescue in exec' ... caused by: command failed with error code 1: Error occurred during build: [Errno 2] No such file or directory (Executor::NonZeroExitStatus)
When can I install these packages directly from ssh , what is the problem with automation? What happened to my settings?
python django amazon-web-services amazon-ec2 amazon-elastic-beanstalk
Surya
source share