在 EC2 上部署 Django
我有一个 django 项目,应该部署在 Amazon 的 EC2 上。有各种关于在 EC2 上安装 django 的教程,但我认为用整个应用程序生成新的 AMI 映像始终是一个耗时的步骤......所以我认为也应该可以将其部署在持久存储,EBS? 但我想知道这是否会有任何缺点,因为没有任何教程描述这一点...因此,如果有人对此有一些想法或有任何其他关于如何以简单快速的方式将新版本部署到 EC2 的教程请告诉我!
I'm having a django project that should be deployed on Amazon's EC2. There are various tutorials on installing django on EC2, but I think it'll always be a time consuming step to generate a new AMI image with your whole application... So I was thinking that it should also be possible to deploy it on the persistent storage, EBS?
But I'm wondering if that would have any disadvantages because there are no tutorials describing that out there... So if anybody is having some ideas on that or having any other tutorials on how to deploy new versions in an easy fast way to EC2 please let me know!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 Bitnami Djangostack 1.2.3(我与 bitnami 没有任何关联)。
http://bitnami.org/stack/djangostack
EC2 镜像为“ami-18fb0f71”,描述为“bitnami-djangostack-1.2.3-0-linux-ubuntu-10.04-ebs”。
这是一个 EBS 支持的实例,但我无法评论它的优点/缺点。
我在这些位置找到了一些相关的配置文件:
/opt/bitnami/apache2/conf/httpd.conf
/opt/bitnami/apps/django/conf/django.conf
默认提供的文件(如 httpd.conf 中配置)是“/opt/bitnami/apache2/htdocs/index.html”。
您可以在这里获得一些支持:
http://bitnami.org/forums/forums/djangostack
I used Bitnami Djangostack 1.2.3 (I'm not associated with bitnami in any way).
http://bitnami.org/stack/djangostack
The EC2 image is "ami-18fb0f71", described as "bitnami-djangostack-1.2.3-0-linux-ubuntu-10.04-ebs".
This is an EBS backed instance, but I can't comment on advantages/disadvantages of this.
I found some of the pertinent configuration files in these locations:
/opt/bitnami/apache2/conf/httpd.conf
/opt/bitnami/apps/django/conf/django.conf
The file served by default (as configured in httpd.conf) is '/opt/bitnami/apache2/htdocs/index.html'.
You can get a bit of support here:
http://bitnami.org/forums/forums/djangostack
我想应该没问题。至少,您可以尝试:获取 EBS 支持的实例、安装 django、停止实例(而不是终止!)并对卷进行快照(用于备份)。
重新启动实例,然后查看。
I think it should be fine. At the least, you can experiment: get an EBS-backed instance, install django, stop the instance (not terminate!) and snapshot the volume (for backup).
Restart the instance, and see.