阅读背景:

Django在AWS Elastic Beanstalk上的python 2.7下运行

来源:互联网 

According to the docs, AWS Elastic Beanstalk supports Python 2.6. I wonder if anyone has set up a custom AMI using the EBS backed 64 bit Linux AMI to run django under Python 2.7 on the beanstalk? While most aspects of a set up under 2.7 will probably be straightforward using virtualenv or changing the symlinks, I'm worried about the amazon build of mod_wsgi. I understand that depending on how mod_wsgi has been compiled there may be issues with running it in combination with Python 2.7. I also wonder if there will be any postgreSQL issues...

根据文档,AWS Elastic Beanstalk支持Python 2.6。我想知道是否有人使用EBS支持的64位Linux AMI设置自定义AMI在beanstalk上运行Python 2.7下的django?虽然使用virtualenv或更改符号链接,2.7的设置的大部分方面都可能是直截了当的,但我担心mod_wsgi的亚马逊版本。据我所知,根据mod_wsgi的编译方式,与Python 2.7结合运行可能存在问题。我也想知道是否会有任何postgreSQL问题......

4 个解决方案

#1


1  

Today (Nov 8, 2013), as I checked AWS support Python 2.7 AMI. Even though, documentation is still not updated properly. Please try to use eb CLI tool and then you can find the below AMI options.

今天(2013年11月8日),我检查了AWS支持Python 2.7 AMI。尽管如此,文档仍未正确更新。请尝试使用eb CLI工具,然后您可以找到以下AMI选项。

17) 32bit Amazon Linux 2013.09 running Python 2.7
18) 64bit Amazon Linux 2013.09 running Python 2.7

No more hassle to use Python 2.7! :)

使用Python 2.7不再麻烦! :)

#2


3  

This blog post seems interesting:

这篇博文似乎很有趣:

Getting a Python 2.7 project running on Elastic Beanstalk

获取在Elastic Beanstalk上运行的Python 2.7项目

The author also provided a sample project for testing:

作者还提供了一个测试示例项目:

https://github.com/leetreveil/elasticbeanstalk-python27

#3


1  

To get around mod_wsgi limitation, you can deploy your application under your own wsgi container like uWSGI and add configuration to apache to serve as a reverse proxy for your WSGI container.

为了解决mod_wsgi限制,您可以在自己的wsgi容器(如uWSGI)下部署应用程序,并将配置添加到apache以充当WSGI容器的反向代理。

You can use container_commands to place your apache configuration files under /etc/httpd/...

您可以使用container_commands将您的apache配置文件放在/ etc / httpd / ...下

#4


-1  

In the end I built mod_wsgi using Python 2.7. The documentation was easy to follow: https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

最后我使用Python 2.7构建了mod_wsgi。该文档很容易理解:https://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

Recently, however, I switched from the Amazon Linux AMI to an official ubuntu AMI: https://help.ubuntu.com/community/EC2StartersGuide

然而,最近,我从Amazon Linux AMI切换到官方的ubuntu AMI:https://help.ubuntu.com/community/EC2StartersGuide

It is so easy to add instances to a load balancer and connect to an RDS using an ubuntu ami I didn't see the need to persist with the Amazon Linux AMI and the beanstalk, which I found rather restrictive.

将实例添加到负载均衡器并使用ubuntu ami连接到RDS是如此容易,我没有看到需要继续使用Amazon Linux AMI和beanstalk,我发现它相当严格。


分享到: