简体   繁体   English

如何防止OpsWorks部署默认为部署到我的自定义层?

[英]How can I prevent OpsWorks Deployment from defaulting to deploying to my Custom Layer?

I currently have a relatively simple OpsWorks MEAN stack configuration, consisting of two layers. 我目前有一个相对简单的OpsWorks MEAN堆栈配置,由两层组成。

One layer is the Node.js App Server layer, and the other layer is a Custom MongoDB layer. 一层是Node.js App Server层,另一层是Custom MongoDB层。 (As a side note, I hope one day Amazon will provide a Mongo store for OpsWorks, but until then, I had to create my own custom layer.) (作为一个旁注,我希望有一天亚马逊将为OpsWorks提供一个Mongo商店,但是在那之前,我必须创建自己的自定义层。)

I really like the way everything works, with the exception that when I deploy my Applications as shown above, the Deployment defaults to deploying to my Custom MongoDB layer as well: 我真的很喜欢一切工作的方式,除了在如上所述部署我的应用程序时,部署默认情况下也要部署到我的Custom MongoDB层:

使用自定义MongoDB层将应用程序部署到OpsWorks实例

Other than remembering to uncheck the boxes just before I click 'Deploy', I can't seem to find any way to specify, in the Deployment, Application, Layer, or Stack configuration, that I don't ever want my Application deployed to my Custom layer. 除了记得在单击“部署”之前取消选中复选框外,我似乎找不到任何方法在“部署”,“应用程序”,“层”或“堆栈”配置中指定我不想将我的应用程序部署到我的自定义层。

That's possibly not a huge deal for my MongoDB layer specifically, but it doesn't seem to make sense to have the application code over there in general, and I can most certainly envision application-specific custom chef configuration that I definitely don't want applied to my DB layer. 对于我的MongoDB层来说,这可能并不是什么大问题,但是一般在那儿放置应用程序代码似乎没有任何意义,而且我可以肯定可以设想到我绝对不希望的特定于应用程序的自定义厨师配置应用于我的数据库层。

Can anyone point me at a configuration option or other mechanism for excluding deployment to a custom OpsWorks layer? 谁能指出我的配置选项或其他排除部署到自定义OpsWorks层的机制?

Thanks! 谢谢!

-- Tim -蒂姆

Deploying your application to all instances in your Stack is safe, OpsWorks won't install your Node application on your MongoDB. 将您的应用程序部署到Stack中的所有实例是安全的,OpsWorks不会在您的MongoDB上安装Node应用程序。

When you do a deployment in OpsWorks, a deployment event get's triggered on the selected instances. 在OpsWorks中进行部署时,将在所选实例上触发部署事件。 Your MongoDB layer for example will most probably just discard the deployment for your application unless you write explicitly a recipe. 例如,除非您明确编写配方,否则您的MongoDB层很可能只会放弃应用程序的部署。

If you still want to save a selection of instances you want to deploy to you just create your deployment once and later you repeat that deployment. 如果仍要保存要部署到的实例的选择,只需创建一次部署,然后再重复该部署即可。 OpsWorks will persist the selected instances in there. OpsWorks将在其中保留所选实例。

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

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