如何配置弹性魔豆的RDS [英] How to configure Elastic Beanstalk for RDS

查看:151
本文介绍了如何配置弹性魔豆的RDS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,同时部署一个使用生产和分期申请AWS弹性魔豆。

I have a requirement to deploy both a production and staging application using AWS Elastic Beanstalk.

我想生产环境中使用独立创建的RDS数据库,这样我就可以重建我的环境,而无需拆我的RDS数据库。

I would like the production environment to use an independently created RDS database so I can rebuild my environment without tearing down my RDS database.

我想暂存环境部署它每次都创建一个全新的RDS数据库。

I would like the staging environment to create a brand new RDS database each time it is deployed.

初​​始化我的环境之后

After initialising my environment with

eb init

的一个问题请教

one of the questions ask

创建RDS数据库实例? [Y / N]:

Create an RDS DB Instance? [y/n]:

该结构的结果出现要被存储在所述.elasticbeanstalk目录内的文件配置。此目录被添加到的.gitignore

The result of this configuration appears to be stored in a file "config" within the .elasticbeanstalk directory. This directory is added to .gitignore.

我怎么能有两个混帐分支,生产和升级,配置,使得一个创建RDS数据库启动时,和其他不?

How then can I have two git branches, production and staging, configured so that one creates an RDS database when started, and the other does not?

推荐答案

我建议从的.gitignore去除这个配置文件,并存储该文件中的两个分支两个不同的版本 - 一份具有RDS和一个没有

I suggest removing the config file from .gitignore and storing two different versions of this file in the two branches - one with RDS and one without.

更新

您的用例可以得到满意'EB分支。然后,您可以有多种环境使用不同的配置。只要选择N的询问,如果你想从环境设置复制到另一个问题。然后,您应该能够创造一个环境,而一个RDS和带RDS的环境。您可以使用Git结帐,然后不同的环境之间进行切换。这样,你就不必从的.gitignore删除该文件。

Your usecase can be satisfied with 'eb branch'. You can then have multiple environments with different configurations. Just select 'n' for the question that asks if you want to copy settings from environment to another. You should then be able to create an environment without an RDS and an environment with an RDS. You can switch between different environments using git checkout then. That way you don't have to remove the file from .gitignore.

在EB分支<一个更多的文档href="http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-reference-branch-environment.html"相对=nofollow>这里。

这篇关于如何配置弹性魔豆的RDS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆