我如何才能快速有效地调试CloudFormation模板? [英] How can I quickly and effectively debug CloudFormation templates?

查看:112
本文介绍了我如何才能快速有效地调试CloudFormation模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CloudFormation是一个功能强大的AWS产品,它允许AWS资源堆栈的编程方式创建,如的应用程序的Web层,一个高性能计算集群,整个应用程序堆栈,,提供一个单一的API呼叫。这是非常强大的。使用它是肯定认为是一个很好的AWS的做法,特别是当它结合厨师,木偶,云初始化的调试它驱使我副

CloudFormation is a powerful AWS offering that allows the programmatic creation of AWS resource stacks, such as the web tier of an application, a high performance computing cluster, or an entire application stack, with a single API call. It is immensely powerful. Using it is surely considered a good AWS practice, especially when it's combined with Chef, Puppet, or cloud-init. Debugging it drives me to vice.

取制造例:的MongoDB集群模板将不能用于股票我。我并不特别知道为什么。我敢肯定,这是简单的东西,因为它几乎总是。我的问题不是我能不能找出什么是错的。这是,它需要20至30分钟之间的堆叠失败,然后再过三,四分钟来删除,假设它删除资源正确的。

Take a production example: The stock mongodb cluster templates won't work for me. I don't particularly know why. I'm sure it's something simple as it almost always is. My problem isn't that I can't figure out what's wrong. It's that it takes the stack between 20 and 30 minutes to fail, and then another three or four minutes to delete, assuming it deletes the resources properly at all.

我在想什么?我知道关于 - 禁用回滚标记和使用它像氧气。很早以前我就懂得包装退出消息与 CFN信号,并把他们像镇流器掀起了下沉的船。如何使模板调试过程快,还是我坚持永远注意到我的错误半个小时我让他们以后?

What am I missing? I know about the --disable-rollback flag and use it like oxygen. I learned long ago to wrap exit messages with cfn-signal and to throw them like ballast off a sinking ship. How can I make the template debugging process faster, or am I stuck forever noticing my mistakes half an hour after I make them?

推荐答案

尝试AWS cloudformation CLI工具<一href="http://aws.amazon.com/developertools/2555753788650372">http://aws.amazon.com/developertools/2555753788650372

Try AWS cloudformation CLI tool http://aws.amazon.com/developertools/2555753788650372 .

我用CFN-验证模板,它为我节省了很多时间。

I use cfn-validate-template and it saves me a lot of time.

这篇关于我如何才能快速有效地调试CloudFormation模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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