2017-06-15 99 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
相關問題