[7]DevOps 自动化运维工具Chef---如何安装Chef的Report?
2016-09-22 17:06
1146 查看
Chef Report是一个非常有用的功能,它能检测所有的chef节点的任务执行情况: 成功,失败,终止。 而且能记录客户端节点的执行情况。Chef report的最低执行版本如下:
Chef server 12
chef-client version 11.6.0 (or later)
具体的执行运行效果如下,
1.历史执行的任务已经明细
2.执行的趋势图
废话少说,直接分享安装的步骤:
1. 在Chef Master服务上安装report
或者直接把opscode-reporting_1.6.4-1_amd64.deb安装包从chef.io网站下载下来,并通过下面的命令安装
2.在Chef服务上配置Chef 服务器
3.在chef 服务器上配置 Report的service
sudo opscode-reporting-ctl reconfigure --accept-license
4. 验证安装
出现类似下面的界面
恭喜你,安装成功了!!!!
安装成功后,可以在客户机器上执行下面的命令,
这个时候,其执行命令的结果将会显示在report的历史(history)中。
如果执行其他的任务,其也会显示出来。
此外,在workstation或者client的机器上执行下面的命令:
也会看到一些任务执行的情况,比如运行,knife runs list
运行,
参考文章:
1.https://docs.chef.io/install_reporting.html
2.https://docs.chef.io/reporting.html
Chef server 12
chef-client version 11.6.0 (or later)
具体的执行运行效果如下,
1.历史执行的任务已经明细
2.执行的趋势图
废话少说,直接分享安装的步骤:
1. 在Chef Master服务上安装report
sudo chef-server-ctl install opscode-reporting
或者直接把opscode-reporting_1.6.4-1_amd64.deb安装包从chef.io网站下载下来,并通过下面的命令安装
sudo dpkg -i opscode-reporting_1.6.4-1_amd64.deb
2.在Chef服务上配置Chef 服务器
sudo chef-server-ctl reconfigure
3.在chef 服务器上配置 Report的service
sudo opscode-reporting-ctl reconfigure --accept-license
4. 验证安装
$ sudo opscode-reporting-ctl test
出现类似下面的界面
恭喜你,安装成功了!!!!
安装成功后,可以在客户机器上执行下面的命令,
chef-client -l info
这个时候,其执行命令的结果将会显示在report的历史(history)中。
如果执行其他的任务,其也会显示出来。
此外,在workstation或者client的机器上执行下面的命令:
knife runs list, knife runs show
也会看到一些任务执行的情况,比如运行,knife runs list
运行,
knife runs show 31caaf4f-3dd6-4dc3-8df8-da08a15ba008
ubuntu@chef-client-01-rodney:~$ knife runs show 31caaf4f-3dd6-4dc3-8df8-da08a15ba008 run_detail: data: end_time: 2016-09-22T08:39:15Z node_name: chef-client-02-rodney run_id: 31caaf4f-3dd6-4dc3-8df8-da08a15ba008 run_list: ["recipe[starter]","recipe[rodneytest]"] start_time: 2016-09-22T08:39:15Z status: success total_res_count: 2 updated_res_count: 2 run_resources: cookbook_name: starter cookbook_version: 1.0.0 duration: 1 final_state: message: Welcome to Chef, Sam Doe! id: Welcome to Chef, Sam Doe! initial_state: name: Welcome to Chef, Sam Doe! result: write type: log uri: https://chef-master-rodney.example.com/organizations/example/reports/org/runs/31caaf4f-3dd6-4dc3-8df8-da08a15ba008/0 cookbook_name: rodneytest cookbook_version: 0.1.0 duration: 14 final_state: checksum: 0d45ed7c5225e25ae1846bb57535c8ea8a19a143ef987e7839a9e7c5b88e97cf group: ubuntu mode: 0664 owner: ubuntu path: /home/ubuntu/motdgggg2.txt verifications: id: /home/ubuntu/motdgggg2.txt initial_state: group: mode: owner: path: /home/ubuntu/motdgggg2.txt name: /home/ubuntu/motdgggg2.txt result: create type: file uri: https://chef-master-rodney.example.com/organizations/example/reports/org/runs/31caaf4f-3dd6-4dc3-8df8-da08a15ba008/1 ubuntu@chef-client-01-rodney:~$
参考文章:
1.https://docs.chef.io/install_reporting.html
2.https://docs.chef.io/reporting.html
相关文章推荐
- [6]DevOps 自动化运维工具Chef---如何通过Chef WorkStation在Window 7客户机节点上远程自动安装最新的Chef Client?
- [11] DevOps 自动化运维工具Chef----如何获得Chef数据用户的用户名和密码?
- [4] DevOps 自动化运维工具Chef----在Ubuntu上安装最新的Chef Client 12.13.37 并和Chef server关联起来
- [3] DevOps 自动化运维工具Chef----在Ubuntu上安装最新的Chef WorkStation 12.13.37
- [8]DevOps 自动化运维工具Chef---如何查看Chef 自身的开发的API的文档?
- [14] DevOps 自动化运维工具Chef----如何用Chef调用PowerShell DSC的Resource
- [5]DevOps 自动化运维工具Chef---Unbuntu系统下,Chef Client 安装位置介绍
- [12] DevOps 自动化运维工具Chef----如何在Window机器上用pgadmin打开数据库?
- [16] DevOps 自动化运维工具Chef----如何在本地运行cookbooks里面的配方?
- [9]DevOps 自动化运维工具Chef---如何解决在Window平台上执行一些knife子命令时所报的错误, knife search, knife status?
- [2] DevOps 自动化运维工具Chef----在Ubuntu上安装最新的Chef server core 12.1
- [13] DevOps 自动化运维工具Chef----用chef-apply命令单机运行Chef配方(Receipt)
- [10]DevOps 自动化运维工具Chef----- Chef 12 服务器端数据库解密
- 自动化运维工具安装部署 chef (九)- 重温安装
- [1] DevOps 自动化运维工具Chef----入门
- [15] DevOps 自动化运维工具Chef----chef-apply, chef-client,chef-zero,chef-solo区别
- Ansible安装与配置(自动化运维管理工具)
- ansible自动化运维工具的安装与使用
- ansible自动化运维工具的安装与使用