{"id":8323,"date":"2015-04-10T16:00:50","date_gmt":"2015-04-10T07:00:50","guid":{"rendered":"http:\/\/www.creationline.com\/?p=8323"},"modified":"2023-08-29T14:01:29","modified_gmt":"2023-08-29T05:01:29","slug":"english-translation-migrating-from-knife-solo-to-knife-zero-getchef","status":"publish","type":"post","link":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323","title":{"rendered":"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef"},"content":{"rendered":"<p>This is the English translation of <a href=\"\/lab\/6401\">Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c<\/a> (2014\/11\/14).<\/p>\n<h2>Introduction<\/h2>\n<p>Last time, we compared Chef-Solo and Chef-Client Local Mode and converged the localhost. This time, we will compare <a href=\"http:\/\/matschaffer.github.io\/knife-solo\/\">Knife-Solo<\/a> and <a href=\"https:\/\/github.com\/higanworks\/knife-zero\">Knife-Zero<\/a> that are used for managing a remote host.<\/p>\n<p>As shown in the illustration below, Knife-Solo transfers policies such as Cookbooks and Attributes that are on the local file system to a remote host using ssh+rsync. Then, it logs into the remote host via ssh, executes \u201cChef-Solo\u201d, refers to the policies and converges.<\/p>\n<p><!-- knife-solo.png \/\/--><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6402\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png\" alt=\"knife-solo\" width=\"403\" height=\"303\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png 403w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo-360x271.png 360w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo-126x95.png 126w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/a><\/p>\n<p>On the other hand, Knife-Zero starts up Chef-Zero to refer to policies on the localhost or Node Object. Then, logs into a remote host via ssh while setting up the TCP port forwarding, refers to the policies in Chef-Zero and converges.<\/p>\n<p><!-- knife-zero.png \/\/--><a href=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-zero.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6403\" src=\"\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-zero.png\" alt=\"knife-zero\" width=\"403\" height=\"303\" srcset=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-zero.png 403w, https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-zero-126x95.png 126w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/a><\/p>\n<p>Put very simply, Knife-Zero could act like a client-server as if there is a Chef-Server (even when there isn\u2019t one), and converges a remote host by using Chef-Client Local Mode.<br \/>\nNow, let\u2019s look at some examples of Knife-Zero.<\/p>\n<h2>Preparations<\/h2>\n<p>Prepare two Ubuntu 12.04 LTS: One Ubuntu 12.04 LTS with Chef DK 0.3.2 installed \u2013 this will be used as a workstation (<strong>ws.example.jp<\/strong>).<br \/>\nThe other Ubuntu 12.04 LTS will be used as a remote host (<strong>node.example.jp<\/strong>) for converging.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~$ sudo dpkg -i chefdk_0.3.2-1_amd64.deb<br \/>\n\u4ee5\u524d\u306b\u672a\u9078\u629e\u306e\u30d1\u30c3\u30b1\u30fc\u30b8 chefdk \u3092\u9078\u629e\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059 ... \u73fe\u5728 49086 \u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002)<br \/>\n(chefdk_0.3.2-1_amd64.deb \u304b\u3089) chefdk \u3092\u5c55\u958b\u3057\u3066\u3044\u307e\u3059...<br \/>\nchefdk (0.3.2-1) \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nThank you for installing Chef Development Kit!<br \/>\nubuntu@ws:~$<br \/>\n<\/code><\/p>\n<p>On the workstation, generate an SSH key pair without a passphrase and transfer the public key to the remote host in advance.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~$ ssh-keygen -N ''<br \/>\nGenerating public\/private rsa key pair.<br \/>\nEnter file in which to save the key (\/home\/ubuntu\/.ssh\/id_rsa):<br \/>\nCreated directory '\/home\/ubuntu\/.ssh'.<br \/>\nYour identification has been saved in \/home\/ubuntu\/.ssh\/id_rsa.<br \/>\nYour public key has been saved in \/home\/ubuntu\/.ssh\/id_rsa.pub.<br \/>\nThe key fingerprint is:<br \/>\n2e:51:77:b0:2e:6b:bd:14:a9:a6:cc:ef:65:27:82:53 ubuntu@ws.example.jp<br \/>\nThe key's randomart image is:<br \/>\n+--[ RSA 2048]----+<br \/>\n|          .      |<br \/>\n|           o     |<br \/>\n|        . o .    |<br \/>\n|       . o o     |<br \/>\n|      . E +      |<br \/>\n|       = = .     |<br \/>\n|      + B * .    |<br \/>\n|     o * = +     |<br \/>\n|      +oo .      |<br \/>\n+-----------------+<br \/>\nubuntu@ws:~$<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@node:~$ mkdir .ssh<br \/>\nubuntu@node:~$ cat &gt; .ssh\/authorized_keys<br \/>\nssh-rsa (snip) ubuntu@ws.example.jp<br \/>\nubuntu@node:~$<br \/>\n<\/code><\/p>\n<p>The login user \u201c<strong>ubuntu<\/strong>\u201d of the remote host must be set in such a way that \u201c<strong>sudo<\/strong>\u201d command can be executed without entering a password.<\/p>\n<p>On the workstation, create a chef-repo directory using \u201c<strong>chef generate repo<\/strong>\u201d command. We will use this working directory from now on.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~$ chef generate repo chef-repo<br \/>\nCompiling Cookbooks...<br \/>\nRecipe: code_generator::repo<br \/>\n* directory[\/home\/ubuntu\/chef-repo] action create<br \/>\n- create new directory \/home\/ubuntu\/chef-repo<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\n(diff output suppressed by config)<br \/>\nubuntu@ws:~$ <\/code><\/p>\n<p><code lang=\"bash\"><code lang=\"bash\"><\/code><\/code><\/p>\n<p>ubuntu@ws:~$ tree -a chef-repo<br \/>\nchef-repo<br \/>\n\u251c\u2500\u2500 .gitignore<br \/>\n\u251c\u2500\u2500 LICENSE<br \/>\n\u251c\u2500\u2500 README.md<br \/>\n\u251c\u2500\u2500 Rakefile<br \/>\n\u251c\u2500\u2500 certificates<br \/>\n\u2502 \u2514\u2500\u2500 README.md<br \/>\n\u251c\u2500\u2500 chefignore<br \/>\n\u251c\u2500\u2500 config<br \/>\n\u2502 \u2514\u2500\u2500 rake.rb<br \/>\n\u251c\u2500\u2500 cookbooks<br \/>\n\u2502 \u2514\u2500\u2500 README.md<br \/>\n\u251c\u2500\u2500 data_bags<br \/>\n\u2502 \u2514\u2500\u2500 README.md<br \/>\n\u251c\u2500\u2500 environments<br \/>\n\u2502 \u2514\u2500\u2500 README.md<br \/>\n\u2514\u2500\u2500 roles<br \/>\n\u2514\u2500\u2500 README.md<\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">6 directories, 11 files<br \/>\nubuntu@ws:~$<br \/>\n<\/code><\/p>\n<p>Let\u2019s place the chef-repo under the git management. We will not go into the detailed procedures here. Please refer to our previous post about <a href=\"\/lab\/6265\">Chef Starter Kit<\/a> (Japanese article) for more information.<\/p>\n<p>We will use an ntp Cookbook as an example. The message \u201cWARNING: No knife configuration file found\u201d will appear frequently from now on because \u201c.chef\/knife.rb\u201d does not exist. You can ignore the message for now.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife cookbook site install ntp -o cookbooks<br \/>\nWARNING: No knife configuration file found<br \/>\nInstalling ntp to \/home\/ubuntu\/chef-repo\/cookbooks<br \/>\nChecking out the master branch.<br \/>\nCreating pristine copy branch chef-vendor-ntp<br \/>\nDownloading ntp from the cookbooks site at version 1.6.5 to \/home\/ubuntu\/chef-repo\/cookbooks\/ntp.tar.gz<br \/>\nCookbook saved: \/home\/ubuntu\/chef-repo\/cookbooks\/ntp.tar.gz<br \/>\nRemoving pre-existing version.<br \/>\nUncompressing ntp version 1.6.5.<br \/>\nremoving downloaded tarball<br \/>\n1 files updated, committing changes<br \/>\nCreating tag cookbook-site-imported-ntp-1.6.5<br \/>\nChecking out the master branch.<br \/>\nUpdating 4878097..b23a1b8<br \/>\nFast-forward<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nCookbook ntp version 1.6.5 successfully installed<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Create a Role to be used for setting.<\/p>\n<p><code lang=\"javascript\"><br \/>\nubuntu@ws:~\/chef-repo$ vi roles\/ntp.json<br \/>\n{<br \/>\n\"json_class\": \"Chef::Role\",<br \/>\n\"name\": \"ntp\",<br \/>\n\"description\": \"ntp basic\",<br \/>\n\"default_attributes\": {<br \/>\n\"ntp\": {<br \/>\n\"servers\": [<br \/>\n\"0.ubuntu.pool.ntp.org\",<br \/>\n\"1.ubuntu.pool.ntp.org\",<br \/>\n\"2.ubuntu.pool.ntp.org\",<br \/>\n\"3.ubuntu.pool.ntp.org\"<br \/>\n]<br \/>\n}<br \/>\n},<br \/>\n\"run_list\": [<br \/>\n\"recipe[ntp]\"<br \/>\n]<br \/>\n}<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<h2>Knife-Solo<\/h2>\n<h3>Installing Knife-Solo<\/h3>\n<p>Install Knife-Solo using \u201c<strong>chef gem install<\/strong>\u201d command.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ chef gem install knife-solo<br \/>\nFetching: knife-solo-0.4.2.gem (100%)<br \/>\nWARNING:  You don't have \/home\/ubuntu\/.chefdk\/gem\/ruby\/2.1.0\/bin in your PATH,<br \/>\ngem executables will not run.<br \/>\nThanks for installing knife-solo!<\/code><\/p>\n<p><code lang=\"bash\"><code lang=\"bash\"><\/code><\/code><\/p>\n<p>If you run into any issues please let us know at:<br \/>\nhttps:\/\/github.com\/matschaffer\/knife-solo\/issues<\/p>\n<p><code lang=\"bash\"><code lang=\"bash\"><\/code><\/code><\/p>\n<p>If you are upgrading knife-solo please uninstall any old versions by<br \/>\nrunning `gem clean knife-solo` to avoid any errors.<\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">See http:\/\/bit.ly\/CHEF-3255 for more information on the knife bug<br \/>\nthat causes this.<br \/>\nSuccessfully installed knife-solo-0.4.2<br \/>\nParsing documentation for knife-solo-0.4.2<br \/>\nInstalling ri documentation for knife-solo-0.4.2<br \/>\nDone installing documentation for knife-solo after 1 seconds<br \/>\n1 gem installed<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<h3>Installing Chef-Solo to the remote host<\/h3>\n<p>Use \u201c<strong>knife solo prepare<\/strong>\u201d command to install a Chef-Client Omnibus package on the specified host.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife solo prepare node.example.jp<br \/>\nWARNING: No knife configuration file found<br \/>\nBootstrapping Chef...<br \/>\n% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br \/>\nDload  Upload   Total   Spent    Left  Speed<br \/>\n100 16472  100 16472    0     0  14504      0  0:00:01  0:00:01 --:--:-- 18570<br \/>\nDownloading Chef 11.16.0 for ubuntu...<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nchef (11.16.0-1) \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nThank you for installing Chef!<br \/>\nGenerating node config '.\/nodes\/node.example.jp.json'...<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>The Chef-Client Omnibus package is installed on the remote host now. At the same time, a JSON file for node setting is generated in the workstation\u2019s <strong>nodes\/<\/strong> directory.<\/p>\n<p><code lang=\"javascript\"><br \/>\nubuntu@ws:~\/chef-repo$ cat .\/nodes\/node.example.jp.json<br \/>\n{<br \/>\n\"run_list\": [<\/code><\/p>\n<p><code lang=\"javascript\"><br \/>\n<\/code><\/p>\n<p><code lang=\"javascript\">  ],<br \/>\n\"automatic\": {<br \/>\n\"ipaddress\": \"node.example.jp\"<br \/>\n}<br \/>\n}<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<h3>Executing Chef-Solo on the remote host to converge<\/h3>\n<p>Edit the JSON file for node setting, and add the previously created Role to the run_list.<\/p>\n<p><code lang=\"diff\"><br \/>\nubuntu@ws:~\/chef-repo$ vi nodes\/node.example.jp.json<br \/>\nubuntu@ws:~\/chef-repo$ git diff<br \/>\ndiff --git a\/nodes\/node.example.jp.json b\/nodes\/node.example.jp.json<br \/>\nindex cf38459..575ca94 100644<br \/>\n--- a\/nodes\/node.example.jp.json<br \/>\n+++ b\/nodes\/node.example.jp.json<br \/>\n@@ -1,6 +1,6 @@<br \/>\n{<br \/>\n\"run_list\": [<br \/>\n-<br \/>\n+    \"role[ntp]\"<br \/>\n],<br \/>\n\"automatic\": {<br \/>\n\"ipaddress\": \"node.example.jp\"<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Use \u201c<strong>knife solo cook<\/strong>\u201c command to transfer the chef-repo to the specified host, and then execute chef-solo on the specified host.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife solo cook node.example.jp<br \/>\nWARNING: No knife configuration file found<br \/>\nRunning Chef on node.example.jp...<br \/>\nChecking Chef version...<br \/>\nUploading the kitchen...<br \/>\nGenerating solo config...<br \/>\nRunning Chef...<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nStarting Chef Client, version 11.16.0<br \/>\nCompiling Cookbooks...<br \/>\nConverging 9 resources<br \/>\nRecipe: ntp::default<br \/>\n* package[ntp] action install<br \/>\n- install version 1:4.2.6.p3+dfsg-1ubuntu3.1 of package ntp<br \/>\n* package[ntpdate] action install (up to date)<br \/>\n* directory[\/var\/lib\/ntp] action create (up to date)<br \/>\n* directory[\/var\/log\/ntpstats\/] action create (up to date)<br \/>\n* cookbook_file[\/etc\/ntp.leapseconds] action create<br \/>\n- create new file \/etc\/ntp.leapseconds<br \/>\n- update content in file \/etc\/ntp.leapseconds from none to 274665<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\n- change mode from '' to '0644'<br \/>\n- change owner from '' to 'root'<br \/>\n- change group from '' to 'root'<br \/>\nRecipe: ntp::apparmor<br \/>\n* service[apparmor] action nothing (skipped due to action :nothing)<br \/>\n* cookbook_file[\/etc\/apparmor.d\/usr.sbin.ntpd] action create<br \/>\n- update content in file \/etc\/apparmor.d\/usr.sbin.ntpd from a88a6b to fdf13c<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nRecipe: ntp::default<br \/>\n* template[\/etc\/ntp.conf] action create<br \/>\n- update content in file \/etc\/ntp.conf from 4eb9a0 to 64d24c<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\n* service[ntp] action enable (up to date)<br \/>\n* service[ntp] action start (up to date)<br \/>\nRecipe: ntp::apparmor<br \/>\n* service[apparmor] action restart<br \/>\n- restart service service[apparmor]<br \/>\nRecipe: ntp::default<br \/>\n* service[ntp] action restart<br \/>\n- restart service service[ntp]<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">Running handlers:<br \/>\nRunning handlers complete<br \/>\nChef Client finished, 6\/11 resources updated in 14.870581634 seconds<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Make sure that the specified policy has been applied.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ ssh node.example.jp ps auxwwwf | grep '[ n]tp'<br \/>\nntp       9914  0.0  0.0  37780  2192 ?        Ss   16:52   0:00 \/usr\/sbin\/ntpd -p \/var\/run\/ntpd.pid -g -u 106:113<br \/>\nubuntu@ws:~\/chef-repo$ <\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">ubuntu@ws:~\/chef-repo$ ssh node.example.jp grep pool.ntp.org \/etc\/ntp.conf<br \/>\nserver 0.ubuntu.pool.ntp.org iburst<br \/>\nrestrict 0.ubuntu.pool.ntp.org nomodify notrap noquery<br \/>\nserver 1.ubuntu.pool.ntp.org iburst<br \/>\nrestrict 1.ubuntu.pool.ntp.org nomodify notrap noquery<br \/>\nserver 2.ubuntu.pool.ntp.org iburst<br \/>\nrestrict 2.ubuntu.pool.ntp.org nomodify notrap noquery<br \/>\nserver 3.ubuntu.pool.ntp.org iburst<br \/>\nrestrict 3.ubuntu.pool.ntp.org nomodify notrap noquery<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Converging is completed successfully.<\/p>\n<p>Now, let\u2019s look at the files transferred to the remote host.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ ssh node.example.jp tree -aF -L 2 chef-solo<br \/>\nchef-solo<br \/>\n\u251c\u2500\u2500 cookbooks-1\/<br \/>\n\u2502   \u2514\u2500\u2500 chef-solo-search\/<br \/>\n\u251c\u2500\u2500 cookbooks-2\/<br \/>\n\u2502   \u251c\u2500\u2500 README.md<br \/>\n\u2502   \u2514\u2500\u2500 ntp\/<br \/>\n\u251c\u2500\u2500 data_bags\/<br \/>\n\u2502   \u2514\u2500\u2500 README.md<br \/>\n\u251c\u2500\u2500 dna.json<br \/>\n\u251c\u2500\u2500 environments\/<br \/>\n\u2502   \u2514\u2500\u2500 README.md<br \/>\n\u251c\u2500\u2500 nodes\/<br \/>\n\u2502   \u2514\u2500\u2500 node.example.jp.json<br \/>\n\u251c\u2500\u2500 roles\/<br \/>\n\u2502   \u251c\u2500\u2500 README.md<br \/>\n\u2502   \u2514\u2500\u2500 ntp.json<br \/>\n\u2514\u2500\u2500 solo.rb<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">8 directories, 8 files<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>As you can see, Knife-Solo transfers chef-repo to the remote host with rsync, and executes Chef-Solo on the remote host.<br \/>\nIf rsync is not installed on the remote host, transferring of the chef-repo fails.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife solo cook node.example.jp<br \/>\nWARNING: No knife configuration file found<br \/>\nRunning Chef on node.example.jp...<br \/>\nChecking Chef version...<br \/>\nUploading the kitchen...<br \/>\nbash: rsync: command not found<br \/>\nrsync: connection unexpectedly closed (0 bytes received so far) [sender]<br \/>\nrsync error: error in rsync protocol data stream (code 12) at io.c(605) [sender=3.0.9]<br \/>\nERROR: RuntimeError: Failed to launch command [\"rsync\", (snip)<br \/>\n<\/code><\/p>\n<h2>Knife-Zero<\/h2>\n<h3>Preparations<\/h3>\n<p>Before applying policy with Knife-Zero, uninstall the ntp package and chef package that have been installed on the remote host. Even if they are remained on the host, they do not have any impact on the operations. However, it is better to uninstall them in advance to check the operations of Knife-Zero clearly.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ ssh node.example.jp sudo apt-get purge ntp chef -y<br \/>\n\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...<br \/>\n\u4f9d\u5b58\u95a2\u4fc2\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059...<br \/>\n\u72b6\u614b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u3063\u3066\u3044\u307e\u3059...<br \/>\n\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u81ea\u52d5\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f\u304c\u3001\u3082\u3046\u5fc5\u8981\u3068\u3055\u308c\u3066\u3044\u307e\u305b\u3093:<br \/>\nlibopts25 libcap2<br \/>\n\u3053\u308c\u3089\u3092\u524a\u9664\u3059\u308b\u306b\u306f 'apt-get autoremove' \u3092\u5229\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u300c\u524a\u9664\u300d\u3055\u308c\u307e\u3059:<br \/>\nchef* ntp*<br \/>\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9: 0 \u500b\u3001\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 0 \u500b\u3001\u524a\u9664: 2 \u500b\u3001\u4fdd\u7559: 6 \u500b\u3002<br \/>\n\u3053\u306e\u64cd\u4f5c\u5f8c\u306b 111MB \u306e\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u89e3\u653e\u3055\u308c\u307e\u3059\u3002<br \/>\n(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059 ... \u73fe\u5728 61148 \u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002)<br \/>\nchef \u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nchef \u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nntp \u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 ...<br \/>\n* Stopping NTP server ntpd<br \/>\n...done.<br \/>\nntp \u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nman-db \u306e\u30c8\u30ea\u30ac\u3092\u51e6\u7406\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nureadahead \u306e\u30c8\u30ea\u30ac\u3092\u51e6\u7406\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Delete the JSON file for node setting, which was generated after executing Knife-Solo.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ rm nodes\/node.example.jp.json<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<h3>Installing Knife-Zero<\/h3>\n<p>Install Knife-Zero using \u201c<strong>chef gem install<\/strong>\u201d command.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ chef gem install knife-zero<br \/>\nFetching: knife-zero-1.0.0.gem (100%)<br \/>\nWARNING:  You don't have \/home\/ubuntu\/.chefdk\/gem\/ruby\/2.1.0\/bin in your PATH,<br \/>\ngem executables will not run.<br \/>\nSuccessfully installed knife-zero-1.0.0<br \/>\nParsing documentation for knife-zero-1.0.0<br \/>\nInstalling ri documentation for knife-zero-1.0.0<br \/>\nDone installing documentation for knife-zero after 0 seconds<br \/>\n1 gem installed<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<h3>Installing Chef-Client to the remote host<\/h3>\n<p>Use \u201c<strong>knife zero bootstrap<\/strong>\u201d command to install a Chef-Client Omnibus package to the specified host. Use \u201c<strong>-x<\/strong>\u201c option to specify a login user, and \u201c<strong>--sudo<\/strong>\u201d option enables to get a root privilege.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife zero bootstrap node.example.jp -x ubuntu --sudo<br \/>\nWARNING: No knife configuration file found<br \/>\nConnecting to node.example.jp<br \/>\nnode.example.jp Installing Chef Client...<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode.example.jp chef (11.16.4-1) \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 ...<br \/>\nnode.example.jp Thank you for installing Chef!<br \/>\nnode.example.jp Starting first Chef Client run...<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode.example.jp Starting Chef Client, version 11.16.4<br \/>\nnode.example.jp Creating a new client identity for node.example.jp using the validator key.<br \/>\nnode.example.jp resolving cookbooks for run list: []<br \/>\nnode.example.jp Synchronizing Cookbooks:<br \/>\nnode.example.jp Compiling Cookbooks...<br \/>\nnode.example.jp [2014-11-11T17:43:21+09:00] WARN: Node node.example.jp has an empty run list.<br \/>\nnode.example.jp Converging 0 resources<br \/>\nnode.example.jp<br \/>\nnode.example.jp Running handlers:<br \/>\nnode.example.jp Running handlers complete<br \/>\nnode.example.jp Chef Client finished, 0\/0 resources updated in 1.116895026 seconds<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>The Chef-Client Omnibus package is now installed to the remote host. At the same time, \u201cNode Object\u201d is generated in the workstation <strong>nodes\/<\/strong> directory.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ ls -lF nodes\/<br \/>\n\u5408\u8a08 32<br \/>\n-rw-rw-r-- 1 ubuntu ubuntu 31250 11\u6708 11 17:43 node.example.jp.json<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p><code lang=\"javascript\"><br \/>\nubuntu@ws:~\/chef-repo$ view nodes\/node.example.jp.json<br \/>\n{<br \/>\n\"name\": \"node.example.jp\",<br \/>\n\"normal\": {<br \/>\n\"tags\": [<\/code><\/p>\n<p><code lang=\"javascript\"><code lang=\"javascript\"><\/code><\/code><\/p>\n<p>]<br \/>\n},<br \/>\n\"automatic\": {<br \/>\n\"network\": {<br \/>\n\"interfaces\": {<br \/>\n\"lo\": {<br \/>\n\"mtu\": \"16436\",<br \/>\n\"flags\": [<br \/>\n\"LOOPBACK\",<br \/>\n\"UP\",<br \/>\n\"LOWER_UP\"<br \/>\n],<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\n\"recipes\": [<\/p>\n<p><code lang=\"javascript\"><code lang=\"javascript\"><\/code><\/code><\/p>\n<p>],<br \/>\n\"roles\": [<\/p>\n<p><code lang=\"javascript\"><br \/>\n<\/code><\/p>\n<p><code lang=\"javascript\">    ]<br \/>\n}<br \/>\n}<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>These objects were generated by the Chef-Zero server, which had been executed on the localhost. Knife-Zero achieves this functionality by linking between the Chef-Zero server executed on the localhost and the Chef-Client executed on the remote host with SSH port forwarding. Unlike Knife-Solo, rsync is not necessary.<\/p>\n<p>As described in the previous post \u201c<a href=\"\/lab\/6380\">Migrating from Chef-Solo to Chef Client Local Mode<\/a>\u201d (Japanese article), these objects can be viewed and operated by executing a knife subcommand with \u201c<strong>-z<\/strong> (<strong>--local-mode<\/strong>)\u201d option.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife client list -z<br \/>\nWARNING: No knife configuration file found<br \/>\nnode.example.jp<br \/>\nubuntu@ws:~\/chef-repo$ <\/code><\/p>\n<p><code lang=\"bash\"><br \/>\n<\/code><\/p>\n<p><code lang=\"bash\">ubuntu@ws:~\/chef-repo$ knife node list -z<br \/>\nWARNING: No knife configuration file found<br \/>\nnode.example.jp<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<h3>Executing Chef-Client on the remote host to converge<\/h3>\n<p>Edit a Role in advance to see the changes in the file set by Knife-Solo.<\/p>\n<p><code lang=\"diff\"><br \/>\nubuntu@ws:~\/chef-repo$ vi roles\/ntp.json<br \/>\nubuntu@ws:~\/chef-repo$ git diff<br \/>\ndiff --git a\/roles\/ntp.json b\/roles\/ntp.json<br \/>\nindex 045d224..adbc3bc 100644<br \/>\n--- a\/roles\/ntp.json<br \/>\n+++ b\/roles\/ntp.json<br \/>\n@@ -5,10 +5,10 @@<br \/>\n\"default_attributes\": {<br \/>\n\"ntp\": {<br \/>\n\"servers\": [<br \/>\n-        \"0.ubuntu.pool.ntp.org\",<br \/>\n-        \"1.ubuntu.pool.ntp.org\",<br \/>\n-        \"2.ubuntu.pool.ntp.org\",<br \/>\n-        \"3.ubuntu.pool.ntp.org\"<br \/>\n+        \"0.asia.pool.ntp.org\",<br \/>\n+        \"1.asia.pool.ntp.org\",<br \/>\n+        \"2.asia.pool.ntp.org\",<br \/>\n+        \"3.asia.pool.ntp.org\"<br \/>\n]<br \/>\n}<br \/>\n},<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Add a Role to run_list using a knife command (local mode).<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife node run_list add node.example.jp 'role[ntp]' -z<br \/>\nWARNING: No knife configuration file found<br \/>\nnode.example.jp:<br \/>\nrun_list: role[ntp]<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p><code lang=\"diff\"><br \/>\nubuntu@ws:~\/chef-repo$ git diff nodes\/node.exmple.jp.json<br \/>\ndiff --git a\/nodes\/node.example.jp.json b\/nodes\/node.example.jp.json<br \/>\nindex eb7f9b5..c3f0e8a 100644<br \/>\n--- a\/nodes\/node.example.jp.json<br \/>\n+++ b\/nodes\/node.example.jp.json<br \/>\n@@ -1321,5 +1321,8 @@<br \/>\n\"roles\": [<\/code><\/p>\n<p><code lang=\"diff\"><br \/>\n<\/code><\/p>\n<p><code lang=\"diff\">     ]<br \/>\n-  }<br \/>\n+  },<br \/>\n+  \"run_list\": [<br \/>\n+    \"role[ntp]\"<br \/>\n+  ]<br \/>\n}<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>You can also directly edit the JSON file, which is equivalent to Node Object.<\/p>\n<p>Use \u201c<strong>knife zero converge<\/strong>\u201d command to execute Chef-Client on the specified host and converge.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife zero converge 'name:node.example.jp' -x ubuntu --sudo<br \/>\nWARNING: No knife configuration file found<br \/>\nnode.example.jp [2014-11-11T18:23:06+09:00] WARN:<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode.example.jp Starting Chef Client, version 11.16.4<br \/>\nnode.example.jp resolving cookbooks for run list: [\"ntp\"]<br \/>\nnode.example.jp Synchronizing Cookbooks:<br \/>\nnode.example.jp   - ntp<br \/>\nnode.example.jp Compiling Cookbooks...<br \/>\nnode.example.jp Converging 9 resources<br \/>\nnode.example.jp Recipe: ntp::default<br \/>\nnode.example.jp   * package[ntp] action install<br \/>\nnode.example.jp     - install version 1:4.2.6.p3+dfsg-1ubuntu3.1 of package ntp<br \/>\nnode.example.jp   * package[ntpdate] action install (up to date)<br \/>\nnode.example.jp   * directory[\/var\/lib\/ntp] action create (up to date)<br \/>\nnode.example.jp   * directory[\/var\/log\/ntpstats\/] action create (up to date)<br \/>\nnode.example.jp   * cookbook_file[\/etc\/ntp.leapseconds] action create (up to date)<br \/>\nnode.example.jp Recipe: ntp::apparmor<br \/>\nnode.example.jp   * service[apparmor] action nothing (skipped due to action :nothing)<br \/>\nnode.example.jp   * cookbook_file[\/etc\/apparmor.d\/usr.sbin.ntpd] action create<br \/>\nnode.example.jp     - update content in file \/etc\/apparmor.d\/usr.sbin.ntpd from a88a6b to fdf13c<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode.example.jp Recipe: ntp::default<br \/>\nnode.example.jp   * template[\/etc\/ntp.conf] action create<br \/>\nnode.example.jp     - update content in file \/etc\/ntp.conf from 4eb9a0 to 565516<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\nnode.example.jp   * service[ntp] action enable (up to date)<br \/>\nnode.example.jp   * service[ntp] action start (up to date)<br \/>\nnode.example.jp Recipe: ntp::apparmor<br \/>\nnode.example.jp   * service[apparmor] action restart<br \/>\nnode.example.jp     - restart service service[apparmor]<br \/>\nnode.example.jp Recipe: ntp::default<br \/>\nnode.example.jp   * service[ntp] action restart<br \/>\nnode.example.jp     - restart service service[ntp]<br \/>\nnode.example.jp<br \/>\nnode.example.jp Running handlers:<br \/>\nnode.example.jp Running handlers complete<br \/>\nnode.example.jp Chef Client finished, 5\/11 resources updated in 10.573336982 seconds<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Make sure that the specified policy has been applied.<\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife ssh 'name:node.example.jp' -z ps auxwwwf | grep '[ n]tp'<br \/>\nWARNING: No knife configuration file found<br \/>\nnode.example.jp ntp      24654  0.0  0.0  37780  2180 ?        Ss   18:23   0:00 \/usr\/sbin\/ntpd -p \/var\/run\/ntpd.pid -g -u 106:113<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p><code lang=\"bash\"><br \/>\nubuntu@ws:~\/chef-repo$ knife ssh 'name:node.example.jp' -z grep pool.ntp.org \/etc\/ntp.conf<br \/>\nWARNING: No knife configuration file found<br \/>\nnode.example.jp server 0.asia.pool.ntp.org iburst<br \/>\nnode.example.jp restrict 0.asia.pool.ntp.org nomodify notrap noquery<br \/>\nnode.example.jp server 1.asia.pool.ntp.org iburst<br \/>\nnode.example.jp restrict 1.asia.pool.ntp.org nomodify notrap noquery<br \/>\nnode.example.jp server 2.asia.pool.ntp.org iburst<br \/>\nnode.example.jp restrict 2.asia.pool.ntp.org nomodify notrap noquery<br \/>\nnode.example.jp server 3.asia.pool.ntp.org iburst<br \/>\nnode.example.jp restrict 3.asia.pool.ntp.org nomodify notrap noquery<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Converging is completed successfully.<\/p>\n<p>Node Object in chef-repo is also updated.<\/p>\n<p><code lang=\"diff\"><br \/>\nubuntu@ws:~\/chef-repo$ git diff<br \/>\ndiff --git a\/nodes\/node.example.jp.json b\/nodes\/node.example.jp.json<br \/>\nindex eb7f9b5..2cdb327 100644<br \/>\n--- a\/nodes\/node.example.jp.json<br \/>\n+++ b\/nodes\/node.example.jp.json<br \/>\n@@ -5,6 +5,42 @@<\/code><\/p>\n<p><code lang=\"diff\"><br \/>\n<\/code><\/p>\n<p><code lang=\"diff\">     ]<br \/>\n},<br \/>\n+  \"default\": {<br \/>\n+    \"ntp\": {<br \/>\n+      \"servers\": [<br \/>\n+        \"0.asia.pool.ntp.org\",<br \/>\n+        \"1.asia.pool.ntp.org\",<br \/>\n+        \"2.asia.pool.ntp.org\",<br \/>\n+        \"3.asia.pool.ntp.org\"<br \/>\n+      ],<br \/>\n:<br \/>\n:<br \/>\n:<br \/>\n@@ -1316,10 +1365,15 @@<br \/>\n}<br \/>\n},<br \/>\n\"recipes\": [<br \/>\n-<br \/>\n+      \"ntp\",<br \/>\n+      \"ntp::default\",<br \/>\n+      \"ntp::apparmor\"<br \/>\n],<br \/>\n\"roles\": [<br \/>\n-<br \/>\n+      \"ntp\"<br \/>\n]<br \/>\n-  }<br \/>\n+  },<br \/>\n+  \"run_list\": [<br \/>\n+    \"role[ntp]\"<br \/>\n+  ]<br \/>\n}<br \/>\nubuntu@ws:~\/chef-repo$<br \/>\n<\/code><\/p>\n<p>Converging has been completed now on the remote host as if Chef-Server exists. knife zero converge uses <a href=\"http:\/\/docs.chef.io\/chef_search.html\">Search<\/a> functionality, and it is possible to converge either in serial or parallel for multiple hosts.<\/p>\n<h2>Summary<\/h2>\n<p>We have briefly introduced the difference between Knife-Solo and Knife-Zero, and how to migrate and use them. Knife-Zero allows us to use Chef ecosystem without Chef-Server, but through the use of the client-server model recommended by Chef. The migration work to Chef-Server is relatively easy. One of the scenarios you can consider is to start small with Knife-Zero or Hosted Enterprise Chef, and then migrating to Hosted\/On-premises Enterprise Chef as the business grows. We hope that this information would help you utilize Knife-Zero.<\/p>\n<hr \/>\n<ul>\n<li><a href=\"\/lab\/6380\">Migrating from Chef-Solo to Chef Client Local Mode<\/a> (Japanese article)<\/li>\n<li><a href=\"https:\/\/www.chef.io\/blog\/2014\/06\/24\/from-solo-to-zero-migrating-to-chef-client-local-mode\/\">From Solo to Zero: Migrating to Chef Client Local Mode<\/a><\/li>\n<li><a href=\"\/lab\/2749\">Using Lightweight Chef-Server \"chef-zero\"<\/a> (Japanese article)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\/11\/14). Introduction Last time, we compare [&#8230;]<\/p>\n","protected":false},"author":2,"featured_media":6402,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[36,31],"tags":[],"class_list":["post-8323","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chef","category-higuchi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3<\/title>\n<meta name=\"description\" content=\"Chef, d-higuchi |This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\/11\/14).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"og:description\" content=\"Chef, d-higuchi |This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\/11\/14).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323\" \/>\n<meta property=\"og:site_name\" content=\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/creationline\" \/>\n<meta property=\"article:published_time\" content=\"2015-04-10T07:00:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-29T05:01:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"403\" \/>\n\t<meta property=\"og:image:height\" content=\"303\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Daisuke Higuchi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@creationline\" \/>\n<meta name=\"twitter:site\" content=\"@creationline\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daisuke Higuchi\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"15\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323\"},\"author\":{\"name\":\"Daisuke Higuchi\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"headline\":\"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef\",\"datePublished\":\"2015-04-10T07:00:50+00:00\",\"dateModified\":\"2023-08-29T05:01:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323\"},\"wordCount\":1045,\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/knife-solo.png\",\"articleSection\":[\"Chef\",\"d-higuchi\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323\",\"name\":\"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/knife-solo.png\",\"datePublished\":\"2015-04-10T07:00:50+00:00\",\"dateModified\":\"2023-08-29T05:01:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\"},\"description\":\"Chef, d-higuchi |This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\\\/11\\\/14).\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#primaryimage\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/knife-solo.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2014\\\/11\\\/knife-solo.png\",\"width\":403,\"height\":303},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\\\/8323#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HOME\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Chef\",\"item\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cloudnative\\\/chef\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/\",\"name\":\"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3\",\"description\":\"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/#\\\/schema\\\/person\\\/16f1373831fb6fd17387f16ae1195206\",\"name\":\"Daisuke Higuchi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"contentUrl\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/cms_x3GWkuX\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/d-higuchi-wp-icon-230x230.png\",\"caption\":\"Daisuke Higuchi\"},\"description\":\"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.creationline.com\\\/tech-blog\\\/author\\\/higuchi\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"Chef, d-higuchi |This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\/11\/14).","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323","og_locale":"ja_JP","og_type":"article","og_title":"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","og_description":"Chef, d-higuchi |This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\/11\/14).","og_url":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323","og_site_name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","article_publisher":"https:\/\/www.facebook.com\/creationline","article_published_time":"2015-04-10T07:00:50+00:00","article_modified_time":"2023-08-29T05:01:29+00:00","og_image":[{"width":403,"height":303,"url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png","type":"image\/png"}],"author":"Daisuke Higuchi","twitter_card":"summary_large_image","twitter_creator":"@creationline","twitter_site":"@creationline","twitter_misc":{"\u57f7\u7b46\u8005":"Daisuke Higuchi","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"15\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#article","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323"},"author":{"name":"Daisuke Higuchi","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"headline":"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef","datePublished":"2015-04-10T07:00:50+00:00","dateModified":"2023-08-29T05:01:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323"},"wordCount":1045,"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png","articleSection":["Chef","d-higuchi"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323","url":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323","name":"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef - Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","isPartOf":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#primaryimage"},"image":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#primaryimage"},"thumbnailUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png","datePublished":"2015-04-10T07:00:50+00:00","dateModified":"2023-08-29T05:01:29+00:00","author":{"@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206"},"description":"Chef, d-higuchi |This is the English translation of Knife-Solo\u304b\u3089Knife-Zero\u3078\u306e\u79fb\u884c (2014\/11\/14).","breadcrumb":{"@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#primaryimage","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2014\/11\/knife-solo.png","width":403,"height":303},{"@type":"BreadcrumbList","@id":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef\/8323#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"HOME","item":"https:\/\/www.creationline.com\/tech-blog"},{"@type":"ListItem","position":2,"name":"\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6","item":"https:\/\/www.creationline.com\/tech-blog\/cloudnative"},{"@type":"ListItem","position":3,"name":"Chef","item":"https:\/\/www.creationline.com\/tech-blog\/cloudnative\/chef"},{"@type":"ListItem","position":4,"name":"[English Translation] Migrating from Knife-Solo to Knife-Zero #getchef"}]},{"@type":"WebSite","@id":"https:\/\/www.creationline.com\/tech-blog\/#website","url":"https:\/\/www.creationline.com\/tech-blog\/","name":"Tech Blog\uff5c\u30af\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u30e9\u30a4\u30f3","description":"\u30a2\u30b8\u30e3\u30a4\u30eb\uff06DevOps\u3001\u30af\u30e9\u30a6\u30c9\u30cd\u30a4\u30c6\u30a3\u30d6\u3001AI\uff06LLM\u306e\u5148\u7aef\u6280\u8853","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.creationline.com\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.creationline.com\/tech-blog\/#\/schema\/person\/16f1373831fb6fd17387f16ae1195206","name":"Daisuke Higuchi","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","url":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","contentUrl":"https:\/\/www.creationline.com\/tech-blog\/cms_x3GWkuX\/wp-content\/uploads\/2023\/08\/d-higuchi-wp-icon-230x230.png","caption":"Daisuke Higuchi"},"description":"Chef\u30fbDocker\u30fbMirantis\u88fd\u54c1\u306a\u3069\u306e\u6280\u8853\u8981\u7d20\u306b\u52a0\u3048\u3066\u3001\u4f1a\u8b70\u306e\u9032\u3081\u65b9\u30fb\u6587\u7ae0\u306e\u66f8\u304d\u65b9\u306a\u3069\u306e\u696d\u52d9\u6539\u5584\u306b\u3082\u53d6\u308a\u7d44\u3093\u3067\u3044\u307e\u3059\u3002\u300cChef\u6d3b\u7528\u30ac\u30a4\u30c9\u300d\u5171\u8457\u306e\u307b\u304b\u3001Debian Official Developer\u3082\u3084\u3063\u3066\u3044\u307e\u3059\u3002","url":"https:\/\/www.creationline.com\/tech-blog\/author\/higuchi"}]}},"_links":{"self":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/8323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=8323"}],"version-history":[{"count":1,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/8323\/revisions"}],"predecessor-version":[{"id":65776,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/posts\/8323\/revisions\/65776"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media\/6402"}],"wp:attachment":[{"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=8323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=8323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.creationline.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=8323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}