L0 – Install chef server
CHEF SERVER
uninstall
chef-server-ctl uninstall
opcode-analytics-ctl uninstall
Install
As root
Download the package from https://downloads.chef.io/chef-server/.
rpm -Uvh chef-server-core-12.11.1-1.el7.x86_64.rpm
chef-server-ctl reconfigure
chef-server-ctl user-create username christian surname email.com ‘passwd‘ –filename /home/username/name.pem
chef-server-ctl org-create orgname ‘description‘ –association_user username –filename /home/dirname/org_validator.pem
Â
Use Chef management console to manage data bags, attributes, run-lists, roles, environments, and cookbooks from a web user interface.
chef-server-ctl install chef-manage
chef-server-ctl reconfigure
chef-manage-ctl reconfigure
Use Chef push jobs to run jobs, an action or a command to be executed, against nodes independantly of a chef-client run.
chef-server-ctl install opscode-push-jobs-server
chef-server-ctl reconfigure
opscode-push-jobs-server-ctl reconfigure
Use Reporting to keep track of what happens during every chef-client runs across all of the infrastructure being managed by Chef. Run Reporting with Chef management console to view reports from a web user interface.
chef-server-ctl install opscode-reporting
chef-server-ctl reconfigure
opscode-reporting-ctl reconfigure
chef-server-ctl user-list
If you reset the chef server address etc then remember you need to run chef-server-ctl reconfigure
chef-server-ctl reconfigure
Some useful diagnostic commands
1 Â yum update
2 Â wget http://public-yum.oracle.com/
3 Â cd /etc/yum.repos.d
5 Â wget http://public-yum.oracle.com/public-yum-ol7.repo
10 Â yum update
11 Â shutdown -r now
21 Â vi /etc/sudo.conf
22 Â vi sudoers
30 Â hostname
32 Â vi /etc/hostname
37 Â ifconfig
59 Â netstat -tulpn | grep 443
60 Â curl localhost:443
61 Â curl https://localhost:443
62 Â curl https://localhost:443 –insecure
63 Â ps faux | grep nginx
64 Â cd /var/log/opscode/nginx/
69 Â less access.log
70 Â less config
72 Â ps faux | grep nginx
79 Â grep 443 *
80 Â iptables -L
81 Â service iptables stop
82 Â iptables -L
83 Â service iptables status
84 Â service firewalld status
85 Â service firewalld stop
86 Â chkconfig –list iptables
91 Â systemctl disable firewalld
Discussion ¬