码迷,mamicode.com
首页 > 其他好文 > 详细

自动化运维工具安装部署 chef (六)命令行总结

时间:2018-03-21 11:33:34      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:系统/运维   Linux   

抽空继续chef的实验,理解了它的架构,测试环境重新推到重来

server

yum install vsftpd -y

vi /etc/vsftp/ftp_user

vi /etc/vsftp/user_list

systemctl stop firewalld

systemctl disable firewalld

setenforce 0

vi /etc/selinux/config

systemctl restart vsftpd

systemctl enable vsftpd

vi /etc/hosts

scp /etc/hosts root@192.168.209.137:/etc/

scp /etc/hosts root@192.168.209.138:/etc/

rpm -ivh chef-server-core-12.17.33-1.el7.x86_64.rpm

rpm -ivh chef-manage-2.5.4-1.el7.x86_64.rpm

chef-server-ctl reconfigure

chef-manage-ctl reconfigure

chef-server-ctl user-create admin admin admin pcdogyu@hotmail.com password -f /etc/chef/admin.pem

chef-server-ctl org-create pactera "Pactera Inc" --association_user admin -f /etc/chef/validator.pem

chef-server-ctl status


workstation

rpm -ivh chef-13.8.5-1.el7.x86_64.rpm

chef-client -v

rpm -ivh chefdk-2.4.17-1.el7.x86_64.rpm

chef verify

echo ‘eval "$(chef shell-init bash)"‘ >> ~/.bash_profile

source ~/.bash_profile

which ruby

cd /usr/chef

chef generate repo chef-repo

yum install -y git

git config --global user.name "admin"

git config --global user.email "pcdogyu@hotmail.com"

cd chef-repo

git init

git add . git commit -m "initial commit"

scp -pr root@chefserver:/etc/chef/admin.pem /usr/chef/chef-repo/.chef/

scp -pr root@chefserver:/etc/chef/validator.pem /usr/chef/chef-repo/.chef/

cd ~/chef-repo

knife client list

knife bootstrap 192.168.209.137 -x root -P password -N workstation

knife ssl fetch

knife ssl check

knife client list

knife user list

scp knife.rb root@192.168.209.138:/usr/chef/chef-repo/.chef

scp validator.pem root@192.168.209.138:/usr/chef/chef-repo/.chef

scp admin.pem root@192.168.209.138:/usr/chef/chef-repo/.chef


node

systemctl enable vsftpd

systemctl start vsftpd

systemctl disable firewalld

systemctl stop firewalld

rpm -ivh chef-13.8.5-1.el7.x86_64.rpm

chef-client -v

echo ‘eval "$(chef shell-init bash)"‘ >> ~/.bash_profile

source ~/.bash_profile

which ruby

cd /usr/chef/chef-repo

#chef generate repo chef-repo

knife ssl fetch

knife ssl check

knife client list

knife user list

knife bootstrap 192.168.209.138 -x root -P password -N Node

knife node list

自动化运维工具安装部署 chef (六)命令行总结

标签:系统/运维   Linux   

原文地址:http://blog.51cto.com/433266/2089281

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!