[英]How to explain to AWS CodeDeploy how to deploy my NodeJS application?
I'm sorry in advance for asking this question, AWS has countless tutorials (and much blogs tackle AWS in general), but I can't put my hand on a simple tutorial on how to explain to CodeDeploy how to deploy my code.我很抱歉提前问了这个问题,AWS 有无数的教程(而且很多博客通常都在讨论 AWS),但是我不能把我的手放在一个简单的教程上,告诉我如何向 CodeDeploy 解释如何部署我的代码。
I'm fairly confident that I understand the basics of EC2, Auto-scaling groups & CodeDeploy, but what I can't find is how to explain to CodeDeploy how to deploy my app.我相当有信心了解 EC2、Auto-scaling 组和 CodeDeploy 的基础知识,但我找不到如何向 CodeDeploy 解释如何部署我的应用程序。 When I use CodeDeploy, I click on a button 'Deploy', but how come CodeDeploy knows what to do?
当我使用 CodeDeploy 时,我单击了“部署”按钮,但 CodeDeploy 怎么知道该怎么做?
In order to deploy effectively, CodeDeploy would need to:为了有效部署,CodeDeploy 需要:
Nothing fancy, but still, I don't know where to explain that.没什么特别的,但我仍然不知道在哪里解释。 My guess is that there's some configuration file somewhere in the project (most likely in yaml format) to specify those intructions but I find no tutorial clearly explaining such thing.
我的猜测是项目中某处有一些配置文件(很可能是 yaml 格式)来指定这些指令,但我发现没有教程清楚地解释这种事情。
Just to be clear, I don't want to:为了清楚起见,我不想:
Any help would be welcome, and if I'm completely mistaken on how to do such things, please do not hesitate to point me to the right direction!欢迎任何帮助,如果我在如何做这些事情上完全弄错了,请不要犹豫,指出我正确的方向!
My guess is that there's some configuration file
我的猜测是有一些配置文件
Yes, that's correct.对,那是正确的。 When you deploy your app, CD will look for appspec.yml which contains all the build and setup instructions for your app on the instances.
当您部署您的应用程序时,CD 将查找appspec.yml ,其中包含您的应用程序在实例上的所有构建和设置说明。
So you have to create such a file tailored to your use-case.因此,您必须创建一个适合您的用例的文件。 AWS docs have example for that.
AWS 文档有这方面的例子。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.