简体   繁体   English

关于Elastic Beanstalk的Django的PostgreSQL

[英]PostgreSQL for Django on Elastic Beanstalk

I'm reading conflicting reports about using PostgreSQL on Amazon's Elastic Beanstalk for python (Django). 我正在阅读有关在Amazon的Elastic Beanstalk上使用PostgreSQL for python(Django)的相互矛盾的报道。

Some sources say it isn't possible: (http://www.forbes.com/sites/netapp/2012/08/20/amazon-cloud-elastic-beanstalk-paas-python/). 一些消息来源称这是不可能的:(http://www.forbes.com/sites/netapp/2012/08/20/amazon-cloud-elastic-beanstalk-paas-python/)。 I've been through a dummy app setup, and it does seem that MySQL is the only option (amongst other ones that aren't Postgres). 我经历过一个虚拟应用程序设置,似乎MySQL是唯一的选择(其他不是Postgres)。

However, I've found fragments around the place mentioning that it is possible - even if they're very light on detail. 然而,我发现这个地方的片段提到它是可能的 - 即使它们在细节上非常清晰。

I need to know the following: 我需要知道以下内容:

  1. Is it possible to run a PostgreSQL database with a Django app on Elastic Beanstalk? 是否可以在Elastic Beanstalk上运行带有Django应用程序的PostgreSQL数据库?
  2. If it's possible, is it worth the trouble? 如果有可能,那值得吗?
  3. If it's possible, how would you set it up? 如果有可能,你会如何设置它?

Postgre is now selectable from the AWS RDS configurations. Postgre现在可以从AWS RDS配置中选择。 Validated through Elastic Beanstalk application setup 2014-01-27. 通过Elastic Beanstalk应用程序设置验证2014-01-27。

Is it possible to run a PostgreSQL database with a Django app on Elastic Beanstalk? 是否可以在Elastic Beanstalk上运行带有Django应用程序的PostgreSQL数据库?

Yes. 是。 The dummy app setup you mention refers to the use of an Amazon Relational Database Service. 您提到的虚拟应用程序设置是指使用Amazon Relational Database Service。 At the moment PostgreSQL is not available as an Amazon RDS, but you can configure your beanstalk AMI to act as a local PostgreSQL server or set up your own PostgreSQL RDS. 目前PostgreSQL不能作为Amazon RDS使用,但您可以将beanstalk AMI配置为本地PostgreSQL服务器或设置您自己的PostgreSQL RDS。

If it's possible, is it worth the trouble? 如果有可能,那值得吗?

This is really a question about whether it is worth using an RDS or going it alone, which boils down to questions of cost, effort, usage, required efficiency etc. It is very simple to switch database engines serving django so if you change your mind it is easy to switch set up. 这真的是一个关于是否值得使用RDS或单独使用它的问题,这可以归结为成本,工作量,使用率,所需效率等问题。切换服务django的数据库引擎非常简单,所以如果你改变主意切换设置很容易。

If it's possible, how would you set it up? 如果有可能,你会如何设置它?

Essentially you need to customise your beanstalk AMI by installing a PostgreSQL database server on an Amazon linux EB backed AMI instance. 基本上,您需要通过在Amazon Linux EB支持的AMI实例上安装PostgreSQL数据库服务器来自定义beanstalk AMI。

Advice / instructions regarding customising beanstalk AMIs are here: 有关自定义beanstalk AMI的建议/说明如下:

http://blog.jetztgrad.net/2011/02/how-to-customize-an-amazon-elastic-beanstalk-instance/ http://blog.jetztgrad.net/2011/02/how-to-customize-an-amazon-elastic-beanstalk-instance/

https://forums.aws.amazon.com/thread.jspa?messageID=219630&#219630 https://forums.aws.amazon.com/thread.jspa?messageID=219630&#219630

Customizing an Elastic Beanstalk AMI 自定义Elastic Beanstalk AMI

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM