您的位置:首页 > 其它

install chef replication

2015-09-09 17:45 363 查看
service iptables stop

#configure ip mapping of master and replication

vi /etc/hosts

146.89.179.218  deehops014ccpra.ssm.sdc.gts.ibm.com deehops014ccpra

146.89.136.162  deehchf014ccpra.ssm.sdc.gts.ibm.com deehchf014ccpra

#install chef server

rpm -Uvh chef-server-core-12.0.5-1.el6.x86_64.rpm

chef-server-ctl reconfigure

# install chef manage,used to support webui

rpm -Uvh opscode-manage-1.18.0-1.el6.x86_64.rpm

opscode-manage-ctl reconfigure

chef-server-ctl reconfigure

#validate chef server install

chef-server-ctl test 

#create directory to store pem of user and organization

cd /

mkdir pem

#create user

chef-server-ctl user-create devopssite site devops devopssite@cn.ibm.com devopssite --filename /pem/devopssite.pem

#cerate organization,and associate user with organization

chef-server-ctl org-create siteng SITENG --association_user devopssite --filename /pem/siteng-validator.pem

#install chef client as chef workstation

rpm -Uvh chef-12.1.2-1.el6.x86_64.rpm

#validate chef client install

chef-client -v

#create directory structure like this

# /home/chef/chef-repo/.chef

cd /home

mkdir chef

cd chef

cp ~/chef/chef-chef-repo-605eeda.tar.gz .

tar -zxf chef-chef-repo-605eeda.tar.gz

mv chef-chef-repo-605eeda chef-repo

cd chef-repo

mkdir .chef

cd /pem

cp devopssite.pem /home/chef/chef-repo/.chef/

cp siteng-validator.pem /home/chef/chef-repo/.chef/

#configure chef workstation

knife configure --initial

Where should I put the config file?

/home/chef/chef-repo/.chef/knife.rb

Please enter the chef server URL:
https://deehchf014ccpra.ssm.sdc.gts.ibm.com:443/organizations/siteng
Please enter a name for the new user:

devopssite

Please enter the existing admin name:

devopssite

Please enter the location of the existing admin's private key:

/home/chef/chef-repo/.chef/devopssite.pem

Please enter the validation clientname:

siteng-validator

Please enter the location of the validation key:

/home/chef/chef-repo/.chef/siteng-validator.pem

Please enter the path to a chef repository 

/home/chef/chef-repo

Please enter a password for the new user:

devopssite

#ignore warning and continue

#validate configure chef workstation

cd /home/chef/chef-repo/.chef

knife client list

knife user list

#use to solve authentication problem above

knife ssl fetch
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: