我应该在 CodeDeploy 中的什么地方添加 AppSpec.yml 文件
Where should I add AppSpec.yml file in CodeDeploy
我正在使用 codeDeploy.I 将代码从 Amazon S3 部署到 EC2 实例,已经配置了配置组和应用程序,但我收到此错误
The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.
当我查看日志时,我看到了
"The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path \"appspec.yml\\"
appspec.yml 文件到底是什么,我应该把它放在哪里?我是 AWS 的新手,所以我们将不胜感激。
您需要的所有信息都应该存在:Amazon documentation Appspec File.
File location
To verify that you have placed your AppSpec file in the root directory
of the application's source content's directory structure
Add an Application Specification File to a Revision for CodeDeploy
Add an AppSpec File for an AWS Lambda Deployment For a deployment to
an AWS Lambda compute platform:
The AppSpec file contains instructions about the Lambda functions to
be deployed and used for deployment validation.
A revision is the same as an AppSpec file.
An AppSpec file can be written using JSON or YAML.
An AppSpec file can be saved as a text file or entered directly into a
console AppSpec editor when creating a deployment. For more
information, see Create an AWS Lambda Compute Platform Deployment
(Console).
To create an AppSpec file:
Copy the JSON or YAML template into a text editor or into the AppSpec
editor in the console.
Modify the template as needed.
Use a JSON or YAML validator to validate your AppSpec file. If you use
the AppSpec editor, the file is validated when you choose Create
deployment.
If you use a text editor, save the file. If you use the AWS CLI to
create your deployment, reference the AppSpec file if it's on your
hard drive or in an Amazon S3 bucket. If you use the console, you must
push your AppSpec file to Amazon S3.
为 EC2/On-Premises 部署添加 AppSpec 文件
To add an AppSpec file to a revision:
Copy the template into a text editor.
Modify the template as needed.
Use a YAML validator to check the validity of your AppSpec file.
Save the file as appspec.yml in the root directory of the revision.
Run one of the following commands to verify that you have placed your
AppSpec file in the root directory:
For Linux, macOS, or Unix:
find /path/to/root/directory -name appspec.yml
There will be no output
if the AppSpec file is not found there.
For Windows:
dir path\to\root\directory\appspec.yml
A File Not Found error will be
displayed if the AppSpec file is not stored there.
Push the revision to Amazon S3 or GitHub.
我正在使用 codeDeploy.I 将代码从 Amazon S3 部署到 EC2 实例,已经配置了配置组和应用程序,但我收到此错误
The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.
当我查看日志时,我看到了
"The CodeDeploy agent did not find an AppSpec file within the unpacked revision directory at revision-relative path \"appspec.yml\\"
appspec.yml 文件到底是什么,我应该把它放在哪里?我是 AWS 的新手,所以我们将不胜感激。
您需要的所有信息都应该存在:Amazon documentation Appspec File.
File location
To verify that you have placed your AppSpec file in the root directory of the application's source content's directory structure
Add an Application Specification File to a Revision for CodeDeploy
Add an AppSpec File for an AWS Lambda Deployment For a deployment to an AWS Lambda compute platform:
The AppSpec file contains instructions about the Lambda functions to be deployed and used for deployment validation.
A revision is the same as an AppSpec file.
An AppSpec file can be written using JSON or YAML.
An AppSpec file can be saved as a text file or entered directly into a console AppSpec editor when creating a deployment. For more information, see Create an AWS Lambda Compute Platform Deployment (Console).
To create an AppSpec file:
Copy the JSON or YAML template into a text editor or into the AppSpec editor in the console.
Modify the template as needed.
Use a JSON or YAML validator to validate your AppSpec file. If you use the AppSpec editor, the file is validated when you choose Create deployment.
If you use a text editor, save the file. If you use the AWS CLI to create your deployment, reference the AppSpec file if it's on your hard drive or in an Amazon S3 bucket. If you use the console, you must push your AppSpec file to Amazon S3.
为 EC2/On-Premises 部署添加 AppSpec 文件
To add an AppSpec file to a revision:
Copy the template into a text editor.
Modify the template as needed.
Use a YAML validator to check the validity of your AppSpec file.
Save the file as appspec.yml in the root directory of the revision.
Run one of the following commands to verify that you have placed your AppSpec file in the root directory:
For Linux, macOS, or Unix:
find /path/to/root/directory -name appspec.yml
There will be no output if the AppSpec file is not found there.For Windows:
dir path\to\root\directory\appspec.yml
A File Not Found error will be displayed if the AppSpec file is not stored there.Push the revision to Amazon S3 or GitHub.