我有一個現有的廚師節點:如何複製一個節點在一個特定的chef_environment
Node Name: app1
Environment: DEMO
FQDN: el-demo-app1
IP: xx.xxx.xxx.xxx
Run List: recipe[yum_el2], role[Dep], recipe[crypto], role[mule-server], role[activemq], recipe[tomcat-conf], role[tomcat]
Roles: activemq, tomcat
Recipes: yum_el, crypto, yum, java, activemq, tomcat-conf, el_conf::commonservices, java::oracle,iptables::default
Platform: redhat 6.6
Tags:
如何使相同的這一個在另一個環境命名的本地
我下載了遊程的另一個節點從節點app1到本地json文件的列表直到食譜和角色,它們似乎已經在git repo中,那麼,我是否會將它們上傳到廚師服務器?然後將它們應用到節點?我該做同樣的用於數據包(來自環境= DEMO),其具有鍵
What i WAS able to do is to:
1. download a recipe from supermarket
- knife cookbook site search ack
- knife cookbook site download ack
2. add it to git in my branch
git add ack , in the cookbooks folder
3. upload that to the chef server
- knife cookbook upload ack
4. apply that as a run-list
- sudo chef-client --runlist "ack"
and it worked
5. test it
$ack --help
一個需要是相同的節點APP1看起來當前節點等:
$ knife search node chef_environment:LOCAL
1 items found
Node Name: dt-linux-dev111
Environment: LOCAL
FQDN: dt-linux-dev111
IP: yy.yyy.yyy.yyy
Run List: recipe[nodejs]
Roles:
Recipes: nodejs, nodejs::default, environment_elis2::default, nodejs::packages
Platform: redhat 6.7
Tags:
問題:
我可以像「Run-list」一樣對「角色」,「食譜」和「數據包」應用相同的步驟嗎?它正在查看角色的陣列結構並添加它,做一把「刀子節點編輯dt-linux-dev111「,附加所需的角色和食譜以及數據包,然後運行sudo chef-cli耳鼻喉科
How do i add multiple roles to a node?
How do i add multiple Recipes to a node ?
How do i add multiple data-bags to a node ?