【发布时间】:2016-12-10 06:30:03
【问题描述】:
我已经根据这篇文章设置了一切
https://aws.amazon.com/tw/blogs/apn/announcing-atlassian-bitbucket-support-for-aws-codedeploy/
这是我的环境:
实例(亚马逊 linux 的免费套餐)
- 已安装 apache 2.4
安全组
- 只有 22(只有我的 ip 可以访问)和 80 端口被打开
Iptables 停止
2 个角色已设置
- 一个用于链接 S3 bitbucket
(附加自定义政策)
- 一个角色是部署组
(附加 AWSCodeDeployRole 策略)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "codedeploy.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
尝试部署的脚本是
https://s3.amazonaws.com/aws-codedeploy-us-east-1/samples/latest/SampleApp_Linux.zip
权限 /var/www/* 由具有 755 权限的 ec2-user 拥有
代理 服务编码部署代理状态 = AWS CodeDeploy 代理作为 PID 7200 运行
线索: 每次部署都会上传我的 s3 存储桶中的一些 zip 文件。
错误代码:HEALTH_CONSTRAINTS
有人知道部署失败的原因是什么吗?
update1 使用 iam 配置文件重新启动实例后,可以部署应用程序。但它仍然失败,当我点击查看事件时,有如下日志:
Error CodeScriptFailed
Script Namescripts/install_dependencies
MessageScript at specified location: scripts/install_dependencies run as user root failed with exit code 1
Log TailLifecycleEvent - BeforeInstall
Script - scripts/install_dependencies
[stdout]Loaded plugins: priorities, update-motd, upgrade-helper
[stdout]Resolving Dependencies
[stdout]--> Running transaction check
[stdout]---> Package httpd.x86_64 0:2.2.31-1.8.amzn1 will be installed
[stdout]--> Processing Dependency: httpd-tools = 2.2.31-1.8.amzn1 for package: httpd-2.2.31-1.8.amzn1.x86_64
[stdout]--> Processing Dependency: apr-util-ldap for package: httpd-2.2.31-1.8.amzn1.x86_64
[stdout]--> Running transaction check
[stdout]---> Package apr-util-ldap.x86_64 0:1.4.1-4.17.amzn1 will be installed
[stdout]---> Package httpd-tools.x86_64 0:2.2.31-1.8.amzn1 will be installed
[stdout]--> Processing Conflict: httpd24-2.4.23-1.66.amzn1.x86_64 conflicts httpd < 2.4.23
[stdout]--> Processing Conflict: httpd24-tools-2.4.23-1.66.amzn1.x86_64 conflicts httpd-tools < 2.4.23
[stdout]--> Finished Dependency Resolution
[stderr]Error: httpd24-tools conflicts with httpd-tools-2.2.31-1.8.amzn1.x86_64
[stderr]Error: httpd24 conflicts with httpd-2.2.31-1.8.amzn1.x86_64
[stdout] You could try using --skip-broken to work around the problem
[stdout] You could try running: rpm -Va --nofiles --nodigest
大家有什么问题吗?
【问题讨论】:
标签: amazon-web-services aws-code-deploy