일요일, 5월 26, 2024
HomeLinuxubuntu chef client install

ubuntu chef client install

ubuntu chef client install

1.client 에 직접 설치

admin@ip-10-2-2-20:~$ wget --no-check-certificate https://www.opscode.com/chef/install.sh
admin@ip-10-2-2-20:~$ sudo chmod 755 install.sh
admin@ip-10-2-2-20:~$ sudo ./install.sh 
admin@ip-10-2-2-20:~$ 
admin@ip-10-2-2-20:~$ sudo echo "10.2.2.200      ip-10-2-2-200.computer-1.com chef-server" >> /etc/hosts
admin@ip-10-2-2-20:~$ sudo echo "10.2.2.20       ip-10-2-2-20.computer-1.com  chef-node1" >> /etc/hosts

root@ip-10-2-2-20:/etc/chef# chef-client -c ./client.rb 

noode 등록중 인증서관련 에러방생시 아래와 같이 설정후 chef-client -c ./client.rb 실행

admin@ip-10-2-2-20:~$ knife ssl fetch https://ip-10-2-2-200.computer-1.com
WARNING: No knife configuration file found
WARNING: Certificates from ip-10-2-2-200.computer-1.com will be fetched and placed in your trusted_cert
directory (/home/admin/.chef/trusted_certs).

Knife has no means to verify these are the correct certificates. You should
verify the authenticity of these certificates after downloading.

Adding certificate for ip-10-2-2-200.computer-1.com in /home/admin/.chef/trusted_certs/ip-10-2-2-200_computer-1_com.crt

root@ip-10-2-2-20:/etc/chef# echo 'trusted_certs_dir "/home/admin/.chef/trusted_certs"' >> client.rb

1-1 ~ 1-3 은 1번에서 정상적으로 등록이 안될때
1-1.client node 등록전 SSL 인증서 관련작업

admin@ip-10-2-2-20:~$ knife ssl fetch https://ip-10-2-2-200.computer-1.com
WARNING: No knife configuration file found
WARNING: Certificates from ip-10-2-2-200.computer-1.com will be fetched and placed in your trusted_cert
directory (/home/admin/.chef/trusted_certs).

Knife has no means to verify these are the correct certificates. You should
verify the authenticity of these certificates after downloading.

Adding certificate for ip-10-2-2-200.computer-1.com in /home/admin/.chef/trusted_certs/ip-10-2-2-200_computer-1_com.crt

1-2.client node 등록

admin@ip-10-2-2-20:~$ export EDITOR=vi
admin@ip-10-2-2-20:~$ knife node create ip-10-2-2-20.computer-1.com -u admin -k /home/admin/.chef/admin.pem -s https://ip-10-2-2-200.computer-1.com
WARNING: No knife configuration file found
Created node[ip-10-2-2-20.computer-1.com]

1-3.workstation 서버에서 node 목록조회

admin@ip-10-2-2-200:~$ sudo knife node list
[sudo] password for admin: 
ip-10-2-2-20.computer-1.com
ip-10-2-2-200.computer-1.com
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular