2017-06-15 129 views
1

所以我一直在尝试为我的应用程序设置代码部署,但它一直失败。最初,我在存储库中没有appspec.yml文件,所以我收到了错误消息,说明appspec.yml文件不存在。代码部署失败,没有任何错误消息

我现在已经包含一个appspec.yml文件,但它仍然不起作用,它不会提供任何错误消息。没有提到的事件,就像在添加appspec文件之前所用的那样。

在创建appspec.yml文件时,我的初学者知识还不到,但我从YouTube教程中获得了一些提示,并且这里是该文件。

version: 0.0 
os: linux 
files: 
- source:/
    destination: /var/www/cms 

如果有帮助,EC2实例运行的是Ubuntu的服务器,在/ var/WWW/CMS是目录外面nginx的是应该提供文件。

+1

校验码部署代理的实例上运行。此外,您可以检查Ubuntu ec2实例上的代码部署代理日志以获取更多信息,也许错误在那里:'''/ var/log/aws/codedeploy-agent'''最后,您还可以检查特定的部署步骤如下:'''+ F/opt/codedeploy-agent/deployment-root/{deployment-group-ID}/{deployment-ID}/logs/scripts.log''' –

回答

1

您面临的最可能的问题是代理程序未安装,或者实例没有足够的权限。当部署实例上没有启动事件时,这意味着由于某些原因CodeDeploy无法与主机通信。

这是我会采取的步骤:

  1. Confirm that you installed the CodeDeploy agent
  2. Confirm that you've created the IAM service role
  3. Confirm that you have the IAM Instance Profile and that it's associated with the instance
  4. Look at the logs on the host to see what's going on
相关问题