我正在尝试通过AWS opsworks cli执行配方,它正在运行,没有任何问题。问题是它正在返回" DeploymentId"作为输出。我正在执行以下命令 -
aws opsworks create-deployment --stack-id c7cxxxxx-efxx-xxxx-xxxx-1dexxxxxxc78 --command {"Name":"execute_recipes", "Args":{"recipes":["cookbook::recipes"]}}
输出 -
{ " DeploymentId":" 824749ec-7e20-42ca-89c5-6646cf0c863c" }
我想获得opsworks实例主厨部署输出 - 比如 -
[2017-03-14T00:06:50-04:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/aws/opsworks/current
One version per cookbook
data_bags at /var/lib/aws/opsworks/data/data_bags
nodes at /var/lib/aws/opsworks/data/nodes
[2017-03-14T00:06:50-04:00] INFO: Forking chef instance to converge... [2017-03-14T00:06:50-04:00] INFO: *** Chef 11.10.4 *** [2017-03-14T00:06:50-04:00] INFO: Chef-client pid: 28634 [2017-03-14T00:06:50-04:00] INFO: Setting the run_list to ["opsworks_custom_cookbooks::load", "opsworks_custom_cookbooks::execute"] from JSON [2017-03-14T00:06:50-04:00] WARN: Run List override has been provided. [2017-03-14T00:06:50-04:00] WARN: Original Run List: [recipe[opsworks_custom_cookbooks::load], recipe[opsworks_custom_cookbooks::execute]]
有可能吗?我正在从Jenkins进行测试,并希望捕获厨师日志。
答案 0 :(得分:0)
感谢@Tensibai。 aws opswork describe-deployment
Link将为您提供所需的帮助。例如 -
aws opsworks describe-commands --deployment-id axxxxxxxxx-3xxxxxxx -4xxx-8xxxxx-9xxxxxxx
这会给你结果。您可以从链接的s3位置获得结果。