{"id":166,"date":"2017-05-19T23:15:11","date_gmt":"2017-05-19T23:15:11","guid":{"rendered":"http:\/\/cephswift.com\/?page_id=166"},"modified":"2017-05-19T23:15:11","modified_gmt":"2017-05-19T23:15:11","slug":"chef-compliance-working-notes","status":"publish","type":"page","link":"https:\/\/cephswift.com\/index.php\/chef-compliance-working-notes\/","title":{"rendered":"Chef Compliance working notes"},"content":{"rendered":"<p>Example to add \/ register host to chef server and install &#8220;chef-client&#8221;:<\/p>\n<p>#  knife bootstrap -N <HOST> <FQDN of HOST><\/p>\n<p>Working on Workstation host ( WS):<\/p>\n<p>local host ubuntu1404, chefdk dir<br \/>\n\/opt\/chefdk\/bin<\/p>\n<p>root@WS:\/opt\/chefdk\/bin# pwd<br \/>\n\/opt\/chefdk\/bin<br \/>\nroot@WS:\/opt\/chefdk\/bin# ls -ltr<br \/>\ntotal 4605<br \/>\n-rwxr-xr-x 1 root root     532 Feb  2 11:22 rubocop<br \/>\n-rwxr-xr-x 1 root root    1725 Feb  2 11:22 pushy-service-manager<br \/>\n-rwxr-xr-x 1 root root    1716 Feb  2 11:22 pushy-client<br \/>\n-rwxr-xr-x 1 root root    1714 Feb  2 11:22 push-apply<br \/>\n-rwxr-xr-x 1 root root    1731 Feb  2 11:22 print_execution_environment<br \/>\n-rwxr-xr-x 1 root root     733 Feb  2 11:22 ohai<br \/>\n-rwxr-xr-x 1 root root    1601 Feb  2 11:22 knife<br \/>\n-rwxr-xr-x 1 root root     633 Feb  2 11:22 kitchen<br \/>\n-rwxr-xr-x 1 root root    1612 Feb  2 11:22 inspec<br \/>\n-rwxr-xr-x 1 root root     634 Feb  2 11:22 foodcritic<br \/>\n-rwxrwxr-x 1 root root 4651450 Feb  2 11:22 delivery<br \/>\n-rwxr-xr-x 1 root root     390 Feb  2 11:22 dco<br \/>\n-rwxr-xr-x 1 root root     562 Feb  2 11:22 cookstyle<br \/>\n-rwxr-xr-x 1 root root     368 Feb  2 11:22 chef-vault<br \/>\n-rwxr-xr-x 1 root root    1605 Feb  2 11:22 chef-solo<br \/>\n-rwxr-xr-x 1 root root    1606 Feb  2 11:22 chef-shell<br \/>\n-rwxr-xr-x 1 root root    1607 Feb  2 11:22 chef-client<br \/>\n-rwxr-xr-x 1 root root    1606 Feb  2 11:22 chef-apply<br \/>\n-rwxr-xr-x 1 root root    2247 Feb  2 11:22 chef<br \/>\n-rwxr-xr-x 1 root root    1371 Feb  2 11:22 berks<br \/>\nroot@WS:\/opt\/chefdk\/bin#<\/p>\n<p>1.  I created new org as &#8220;inforSec_compliance&#8221; on chef_server<br \/>\n2.  Created new project as &#8220;inforSec_test&#8221; under org &#8220;infoSec_compliance&#8221;, then system tell me to run &#8220;Pipeline create &#038; test&#8221;, <\/p>\n<p>Create a Pipeline<\/p>\n<p>This project needs a pipeline! Here&#8217;s how to create one.<\/p>\n<p>If you haven&#8217;t already, install the delivery command-line tool. See the Chef Docs for details on how to do that.<br \/>\nWith the command-line tool installed, clone this project:<br \/>\ndelivery clone infosec_test &#8211;ent=Informatica &#8211;org=infoSec_compliance &#8211;user=jilu &#8211;server=$(chef_server_name)<\/p>\n<p>worked on my local host to setup talk with Chef automate server:<\/p>\n<p>cd infosec_test<br \/>\nCreate a project configuration file:<br \/>\ndelivery setup &#8211;ent=cephswift &#8211;org=infoSec_compliance &#8211;user=jilu &#8211;server=$(chef_server_name)<br \/>\nMake an initial commit. Note we&#8217;re excluding the project configuration file:<br \/>\necho &#8220;# infosec_test&#8221; >> README.md<br \/>\necho &#8220;.delivery\/cli.toml&#8221; >> .gitignore<br \/>\ngit add README.md .gitignore<br \/>\ngit commit -m &#8220;Initial commit&#8221;<br \/>\nRun delivery init, which will create an empty build cookbook for you (with an empty set of phase recipes), add the cookbook to your project, create the new pipeline and submit the project to Delivery for review:<br \/>\ndelivery init<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nI got screen output as below:<\/p>\n<p>root@ws:\/opt\/chefdk# delivery clone infosec_test &#8211;ent=cephswift &#8211;org=infoSec_compliance &#8211;user=jilu &#8211;server=$(chef_server_name)<br \/>\ncd infosec_testChef Delivery<br \/>\nCloning ssh:\/\/jilu@$(chef_server_name):8989\/cephswift\/infoSec_compliance\/infosec_test to infosec_test<br \/>\n\\The authenticity of host &#8216;[$(chef_server_name)]:8989 ([10.1.33.10]:8989)&#8217; can&#8217;t be established.<br \/>\nRSA key fingerprint is 7f:ee:9a:f1:ff:48:99:2d:c8:9e:13:d3:f7:9e:61:ff.<br \/>\nAre you sure you want to continue connecting (yes\/no)?&#8211;|\/                                                               Git command failed!<br \/>\nSTDOUT:<br \/>\nSTDERR: Cloning into &#8216;infosec_test&#8217;&#8230;<br \/>\nWarning: Permanently added &#8216;[psvilxautop1.informatica.com]:8989,[10.1.33.10]:8989&#8217; (RSA) to the list of known hosts.<br \/>\nConnection closed by 10.1.33.10<br \/>\nfatal: Could not read from remote repository.<\/p>\n<p>Please make sure you have the correct access rights<br \/>\nand the repository exists.<\/p>\n<p>root@ws:\/opt\/chefdk#<br \/>\n========================================================<\/p>\n<p>Delete unused cookbooks:<\/p>\n<p>root@ws:~\/chef-repo# knife cookbook bulk delete chef-cookbooks<br \/>\nAll versions of the following cookbooks will be deleted:<\/p>\n<p>chef-cookbooks<\/p>\n<p>Do you really want to delete these cookbooks? (Y\/N) y<\/p>\n<p>Deleted cookbook  chef-cookbooks            [0.1.0]<br \/>\nroot@ws:~\/chef-repo# knife cookbook bulk delete starter<br \/>\nAll versions of the following cookbooks will be deleted:<\/p>\n<p>starter<\/p>\n<p>Do you really want to delete these cookbooks? (Y\/N) y<\/p>\n<p>Deleted cookbook  starter                   [1.0.0]<br \/>\nroot@ws:~\/chef-repo#<\/p>\n<p>=======================================================<br \/>\nhttps:\/\/github.com\/chef-cookbooks\/audit\/issues\/204   #### issue fix from worked with chef.io developer, did this fix on QA workstation<\/p>\n<p>[root@test_03 audit]# berks install<br \/>\nResolving cookbook dependencies&#8230;<br \/>\nFetching &#8216;audit&#8217; from source at .<br \/>\nFetching &#8216;test_helper&#8217; from source at test\/cookbooks\/test_helper<br \/>\nFetching cookbook index from https:\/\/supermarket.chef.io&#8230;<br \/>\n&#8230;..<br \/>\nUsing audit (2.4.0) from source at .<br \/>\nInstalling compat_resource (12.16.3)<br \/>\nInstalling mingw (2.0.0)<br \/>\nInstalling build-essential (8.0.0)<br \/>\nInstalling ohai (5.0.2)<br \/>\nInstalling git (6.0.0)<br \/>\nInstalling dmg (3.1.0)<br \/>\nInstalling seven_zip (2.0.2)<br \/>\nUsing test_helper (0.1.0) from source at test\/cookbooks\/test_helper<br \/>\nInstalling windows (3.0.4)<br \/>\nInstalling yum-epel (2.1.1)<\/p>\n<p>[root@test_03 audit]# pwd<br \/>\n\/root\/chef-repo\/chef-cookbooks\/audit<\/p>\n<p>[root@test_03 audit]# cd ..<\/p>\n<p>[root@test_03 chef-cookbooks]# cd ..<\/p>\n<p>[root@test_03 chef-repo]# knife cookbook upload audit -o .\/chef-cookbooks<br \/>\nUploading audit          [2.4.0]<br \/>\nERROR: Cookbook audit depends on cookbooks which are not currently<br \/>\nERROR: being uploaded and cannot be found on the server.<br \/>\nERROR: The missing cookbook(s) are: &#8216;compat_resource&#8217; version &#8216;>= 0.0.0&#8217;<\/p>\n<p>[root@ws chef-repo]# ls -l<br \/>\ntotal 8<br \/>\ndrwxr-xr-x 2 root root    6 Mar 20 12:28 certificates<br \/>\ndrwxr-xr-x 3 root root   18 Mar 31 11:59 chef-cookbooks<br \/>\ndrwxr-xr-x 2 root root    6 Mar 20 12:28 config<br \/>\ndrwxr-xr-x 7 root root  102 Mar 23 16:38 cookbooks<br \/>\ndrwxr-xr-x 4 root root   34 Mar 23 15:09 data-bags<br \/>\ndrwxr-xr-x 2 root root    6 Mar 20 12:31 environments<br \/>\n-rw-r&#8211;r&#8211; 1 root root 1125 Mar 20 16:33 how_to_use_chef.txt<br \/>\n-rw-r&#8211;r&#8211; 1 root root 2341 Mar 17 14:17 README.md<br \/>\ndrwxr-xr-x 2 root root   23 Mar 17 14:17 roles<\/p>\n<p>[root@ws chef-repo]# cd chef-cookbooks\/audit\/<\/p>\n<p>\/root\/chef-repo\/chef-cookbooks\/audit<\/p>\n<p>[root@test_03 audit]# ls -ltr<br \/>\ntotal 100<br \/>\n-rw-r&#8211;r&#8211; 1 root root 11357 Mar 31 11:59 LICENSE<br \/>\n-rw-r&#8211;r&#8211; 1 root root   653 Mar 31 11:59 Gemfile<br \/>\n-rw-r&#8211;r&#8211; 1 root root   111 Mar 31 11:59 CONTRIBUTING.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root 29402 Mar 31 11:59 CHANGELOG.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root   153 Mar 31 11:59 Berksfile<br \/>\n-rw-r&#8211;r&#8211; 1 root root  2858 Mar 31 11:59 TROUBLESHOOTING.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root   106 Mar 31 11:59 TESTING.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root 19196 Mar 31 11:59 README.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root  1852 Mar 31 11:59 Rakefile<br \/>\n-rw-r&#8211;r&#8211; 1 root root  1067 Mar 31 11:59 chefignore<br \/>\ndrwxr-xr-x 2 root root    23 Mar 31 11:59 attributes<br \/>\ndrwxr-xr-x 7 root root   103 Mar 31 11:59 examples<br \/>\ndrwxr-xr-x 3 root root    20 Mar 31 11:59 files<br \/>\ndrwxr-xr-x 4 root root    49 Mar 31 11:59 spec<br \/>\ndrwxr-xr-x 2 root root    33 Mar 31 11:59 resources<br \/>\ndrwxr-xr-x 2 root root    55 Mar 31 11:59 recipes<br \/>\n-rw-r&#8211;r&#8211; 1 root root   503 Mar 31 11:59 metadata.rb<br \/>\ndrwxr-xr-x 2 root root    87 Mar 31 11:59 libraries<br \/>\ndrwxr-xr-x 2 root root    27 Mar 31 11:59 tasks<br \/>\ndrwxr-xr-x 5 root root    63 Mar 31 11:59 test<br \/>\n-rw&#8212;&#8212;- 1 root root   587 Mar 31 14:13 Berksfile.lock<br \/>\n[root@test_03 audit]# cp metadata.rb  metadata.rb.orig<\/p>\n<p>[root@test_03 audit]# ls -ltr<br \/>\ntotal 104<br \/>\n-rw-r&#8211;r&#8211; 1 root root 11357 Mar 31 11:59 LICENSE<br \/>\n-rw-r&#8211;r&#8211; 1 root root   653 Mar 31 11:59 Gemfile<br \/>\n-rw-r&#8211;r&#8211; 1 root root   111 Mar 31 11:59 CONTRIBUTING.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root 29402 Mar 31 11:59 CHANGELOG.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root   153 Mar 31 11:59 Berksfile<br \/>\n-rw-r&#8211;r&#8211; 1 root root  2858 Mar 31 11:59 TROUBLESHOOTING.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root   106 Mar 31 11:59 TESTING.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root 19196 Mar 31 11:59 README.md<br \/>\n-rw-r&#8211;r&#8211; 1 root root  1852 Mar 31 11:59 Rakefile<br \/>\n-rw-r&#8211;r&#8211; 1 root root  1067 Mar 31 11:59 chefignore<br \/>\ndrwxr-xr-x 2 root root    23 Mar 31 11:59 attributes<br \/>\ndrwxr-xr-x 7 root root   103 Mar 31 11:59 examples<br \/>\ndrwxr-xr-x 3 root root    20 Mar 31 11:59 files<br \/>\ndrwxr-xr-x 4 root root    49 Mar 31 11:59 spec<br \/>\ndrwxr-xr-x 2 root root    33 Mar 31 11:59 resources<br \/>\ndrwxr-xr-x 2 root root    55 Mar 31 11:59 recipes<br \/>\ndrwxr-xr-x 2 root root    87 Mar 31 11:59 libraries<br \/>\ndrwxr-xr-x 2 root root    27 Mar 31 11:59 tasks<br \/>\ndrwxr-xr-x 5 root root    63 Mar 31 11:59 test<br \/>\n-rw&#8212;&#8212;- 1 root root   587 Mar 31 14:13 Berksfile.lock<br \/>\n-rw-r&#8211;r&#8211; 1 root root   503 Mar 31 14:21 metadata.rb.orig<br \/>\n-rw-r&#8211;r&#8211; 1 root root   541 Mar 31 14:23 metadata.rb<\/p>\n<p>[root@test_03 audit]# berks upload<br \/>\nUploaded audit (2.4.0) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded build-essential (8.0.0) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded compat_resource (12.16.3) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded dmg (3.1.0) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded git (6.0.0) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded mingw (2.0.0) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded ohai (5.0.2) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded seven_zip (2.0.2) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded test_helper (0.1.0) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded windows (3.0.4) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<br \/>\nUploaded yum-epel (2.1.1) to: &#8216;https:\/\/psvlxccas02.informatica.com:443\/organizations\/infosec_qa&#8217;<\/p>\n<p>[root@test_03 audit]# knife cookbook list<br \/>\napache             0.1.0<br \/>\naudit              2.4.0<br \/>\nbuild-essential    8.0.0<br \/>\ncompat_resource    12.16.3<br \/>\ndmg                3.1.0<br \/>\ngit                6.0.0<br \/>\nmingw              2.0.0<br \/>\nmy_test_cookbook   0.1.0<br \/>\nnginx              0.1.0<br \/>\nohai               5.0.2<br \/>\nseven_zip          2.0.2<br \/>\ntest_helper        0.1.0<br \/>\nwindows            3.0.4<br \/>\nyum-epel           2.1.1<br \/>\nyum_update         0.1.0<br \/>\n[root@psvlxccas03 audit]#<\/p>\n<p>delete 4 test cookbooks uploaded:<\/p>\n<p>apache             0.1.0<br \/>\nmy_test_cookbook   0.1.0<br \/>\nnginx              0.1.0<br \/>\nyum_update         0.1.0<\/p>\n<p>[root@test_03 chef-repo]# knife cookbook delete apache<br \/>\nDo you really want to delete apache version 0.1.0? (Y\/N) y<br \/>\nDeleted cookbook[apache version 0.1.0]<br \/>\n[root@test_03 chef-repo]# knife cookbook delete my_test_cookbook<br \/>\nDo you really want to delete my_test_cookbook version 0.1.0? (Y\/N) y<br \/>\nDeleted cookbook[my_test_cookbook version 0.1.0]<br \/>\n[root@test_03 chef-repo]# knife cookbook delete nginx<br \/>\nDo you really want to delete nginx version 0.1.0? (Y\/N) y<br \/>\nDeleted cookbook[nginx version 0.1.0]<br \/>\n[root@test_03 chef-repo]# knife cookbook delete yum_update<br \/>\nDo you really want to delete yum_update version 0.1.0? (Y\/N) y<br \/>\nDeleted cookbook[yum_update version 0.1.0]<br \/>\n[root@test_03 chef-repo]# knife cookbook list<br \/>\naudit             2.4.0<br \/>\nbuild-essential   8.0.0<br \/>\ncompat_resource   12.16.3<br \/>\ndmg               3.1.0<br \/>\ngit               6.0.0<br \/>\nmingw             2.0.0<br \/>\nohai              5.0.2<br \/>\nseven_zip         2.0.2<br \/>\ntest_helper       0.1.0<br \/>\nwindows           3.0.4<br \/>\nyum-epel          2.1.1<br \/>\n[root@psvlxccas03 chef-repo]#<\/p>\n<p>===============================================================<\/p>\n<p>troubleshoot tips for upload cookbooks from  &#8220;berks install&#8221; with &#8220;No Berksfile or Berksfile.lock found at &#8216;\/root\/chef-repo\/chef-cookbooks\/linux-baseline&#8217;!&#8221;<\/p>\n<p>fix:<\/p>\n<p>#  gem install berkshelf    #### run this to make sure berks is install,  or run:<br \/>\n#  gem update berkshelf  #### run this to make sure berks is updated version.<\/p>\n<p>example:<br \/>\nroot@ws5:~\/chef-repo# chef gem install berkshelf<br \/>\nSuccessfully installed berkshelf-5.6.4<br \/>\n1 gem installed<\/p>\n<p>[root@test_03 chef-cookbooks]# pwd<br \/>\n\/root\/chef-repo\/chef-cookbooks<\/p>\n<p>  # git clone https:\/\/github.com\/chef-cookbooks\/audit<br \/>\n  # git clone https:\/\/github.com\/dev-sec\/linux-baseline<br \/>\n  # git clone https:\/\/github.com\/dev-sec\/chef-os-hardening<\/p>\n<p>[root@ws chef-cookbooks]# ls -ltr<br \/>\ntotal 12<br \/>\ndrwxr-xr-x 13 root root 4096 Mar 31 14:33 audit<br \/>\ndrwxr-xr-x  9 root root 4096 Apr  6 17:07 chef-os-hardening<br \/>\ndrwxr-xr-x  9 root root 4096 Apr  7 11:05 linux-baseline<br \/>\n[root@ws3 chef-cookbooks]#<\/p>\n<p>1.   go to &#8220;\/root\/chef-repo\/chef-cookbooks&#8221;, run &#8220;chef generate cookbook linux-baseline -b&#8221; to add Berksfile  to cookbook &#8220;linux-baseline&#8221;<br \/>\n2.   cd linux-baseline<br \/>\n3.   run &#8220;berks install&#8221;;<br \/>\n4.   run &#8220;berks upload&#8221;;    ### this will upload the cookbook &#8220;linux-baseline&#8221; to chef server.<br \/>\n5.   verify with &#8221; knife cookbook list&#8221;, you will be able to see the cookbook is there uploaded onto chef server.<\/p>\n<p>example:<br \/>\n[root@ws chef-cookbooks]# chef generate cookbook chef-os-hardening -b   ### to add Berksfile  to cookbook &#8220;chef-os-hardening &#8220;.<br \/>\n[root@ws chef-cookbooks]# cd chef-os-hardening    ### the next two command &#8220;berks install&#8221; and &#8220;berks upload&#8221; must running inside the cookbook<br \/>\n[root@ws chef-os-hardening]# berks install<br \/>\n[root@ws chef-os-hardening]# berks upload<br \/>\n[root@ws chef-os-hardening]# knife cookbook list<\/p>\n<p>Do the same as above to uplaod cookbook &#8220;audit&#8221; to chef server.<\/p>\n<p>example to apply roles and cookbook to node to deploy:<\/p>\n<p>cd \/root\/chef-repo\/roles<\/p>\n<p>[root@ws roles]# pwd<br \/>\n\/root\/chef-repo\/roles<br \/>\nvi base_linux.rb<\/p>\n<p>[root@ws roles]# cat base_linux.rb<br \/>\nname &#8216;base_linux&#8217;<br \/>\ndescription &#8216;A base role to be applied to all linux nodes&#8217;<br \/>\nrun_list &#8216;recipe[chef-client::default]&#8217;,&#8217;recipe[audit::default]&#8217;<br \/>\ndefault_attributes({<br \/>\n  &#8216;audit&#8217; => {<br \/>\n    &#8216;collector&#8217; => &#8220;chef-server-visibility&#8221;,<br \/>\n    &#8216;profiles&#8217; => [<br \/>\n      {<br \/>\n        &#8216;name&#8217; => &#8216;linux-patch-baseline&#8217;,<br \/>\n        &#8216;git&#8217; => &#8216;https:\/\/github.com\/dev-sec\/linux-patch-baseline.git&#8217;<br \/>\n      },<br \/>\n      {<br \/>\n        &#8216;name&#8217; => &#8216;linux-baseline&#8217;,<br \/>\n        &#8216;git&#8217; => &#8216;https:\/\/github.com\/dev-sec\/linux-baseline.git&#8217;<br \/>\n      }<br \/>\n    ]<br \/>\n  }<br \/>\n})<\/p>\n<p>[root@ws roles]#<\/p>\n<p>[root@ws chef-cookbooks]# knife node run_list set test_01 &#8216;role[base_linux]&#8217;<\/p>\n<p>============================================================================================<\/p>\n<p>deploy cookbook in production test server :  test_01<\/p>\n<p>root@ws:~\/chef-repo\/cookbooks\/chef-os-hardening# knife cookbook list<br \/>\naudit             3.0.0<br \/>\nchef-client       7.2.1<br \/>\nchef-ingredient   1.1.0<br \/>\nchef-server       5.2.0<br \/>\ncompat_resource   12.16.3<br \/>\ncookbooks         0.1.0<br \/>\ncron              4.1.0<br \/>\nlinux-baseline    0.1.0<br \/>\nlogrotate         2.1.0<br \/>\nohai              5.0.3<br \/>\nos-hardening      2.0.0<br \/>\npackagecloud      0.3.0<br \/>\nrunit             3.0.5<br \/>\nsysctl            0.8.1<br \/>\nwindows           3.0.4<br \/>\nyum-epel          2.1.1<br \/>\nroot@ws:~\/chef-repo\/cookbooks\/chef-os-hardening# cd ..\/..<\/p>\n<p>root@ws:~\/chef-repo#  knife node run_list set test_01 &#8216;role[base_linux]&#8217;<\/p>\n<p>root@ws:~\/chef-repo#  knife node run_list set test_01 &#8216;recipe[linux-baseline]&#8217;<br \/>\ntest_01:<br \/>\n  run_list: recipe[linux-baseline]<br \/>\nroot@ws:~\/chef-repo#  knife node run_list set test_01 &#8216;recipe[os-hardening]&#8217;<br \/>\ntest_01:<br \/>\n  run_list: recipe[os-hardening]<\/p>\n<p>root@ws:~\/chef-repo#  knife node show test_01<br \/>\nNode Name:   test_01<br \/>\nEnvironment: _default<br \/>\nFQDN:        test_01.cephswift.com<br \/>\nIP:          10.1.37.5<br \/>\nRun List:    recipe[os-hardening]<br \/>\nRoles:       base_linux<br \/>\nRecipes:     chef-client::default, audit::default, chef-client::service, chef-client::systemd_service, audit::inspec<br \/>\nPlatform:    redhat 7.0<br \/>\nTags:<br \/>\nroot@ws:~\/chef-repo#<\/p>\n<p>go to &#8220;psvlxccpt01&#8221; to run &#8220;sudo chef-client&#8221; to roles, policies, cookbooks deployed on that host.<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>user add from Cli on chef QA server:<\/p>\n<p>[root@chef_server ~]#<\/p>\n<p>[jilu@chef_server ~]$ <\/p>\n<p>#   sudo chef-server-ctl user-create admin <First_Name> <Last)_Name> <E-mailaddress> <PASSWORD><\/p>\n<p>#   chef-server-ctl org-user-add infosec_qa admin<\/p>\n<p>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<\/p>\n<p>Scan_Key &#8212; how to<\/p>\n<p>on host :  ( Red Hat 7.0 )<\/p>\n<p>[root@ws .ssh]# hostname<\/p>\n<p># vi  \/etc\/ssh\/sshd_config   # to have all setings below:<\/p>\n<p>[root@ws ssh]# grep Authentication \/etc\/ssh\/sshd_config | egrep -v ^#<br \/>\nRSAAuthentication yes<br \/>\nPubkeyAuthentication yes<br \/>\nPasswordAuthentication yes<br \/>\nChallengeResponseAuthentication no<br \/>\nGSSAPIAuthentication yes<\/p>\n<p>[root@ws ssh]# grep Root \/etc\/ssh\/sshd_config | egrep -v ^#<br \/>\nPermitRootLogin yes<\/p>\n<p># service sshd restart   ### this restart the sshd service to make the change above to take effective.<\/p>\n<p>[root@ws .ssh]# pwd<br \/>\n\/root\/.ssh<\/p>\n<p># ssh-keygen -t dsa -f scan_key -C &#8220;scan_key&#8221;<\/p>\n<p>[root@ws .ssh]# ls -ltr<br \/>\ntotal 16<br \/>\n-rw-r&#8211;r&#8211; 1 root root 2861 Mar 30 13:24 known_hosts<br \/>\n-rw-r&#8211;r&#8211; 1 root root  598 Apr 13 13:12 scan_key.pub<br \/>\n-rw&#8212;&#8212;- 1 root root  668 Apr 13 13:12 scan_key<br \/>\n-rw&#8212;&#8212;- 1 root root 1594 Apr 13 16:59 authorized_keys<\/p>\n<p>#  cat scan_key.pub >> authorized_keys  #### put the pub key in this file,  system will use this file to check if remote user has pub key stored here for anthentication or not.<br \/>\n#  scp scan_key \/tmp\/<br \/>\n#  chmod 755 \/tmp\/scan_key<\/p>\n<p>Go to local host:<br \/>\njilu@ws:\/mnt\/c\/Users\/jilu\/.ssh$<\/p>\n<p>$ scp jilu@ws:\/tmp\/scan_key .    #### this is copy the scan private key to remote user at host &#8220;jilu@ws&#8221; on dir &#8220;\/mnt\/c\/Users\/jilu\/.ssh&#8221; or &#8221; ~\/.ssh\/&#8221; for next step use for ssh login with this key.<\/p>\n<p>$ ssh -i ~\/.ssh\/scan_key root@ws    ### this makes user jilu login to remote server with &#8220;scan_key&#8221; as &#8220;root&#8221; user.<\/p>\n<p>example:<\/p>\n<p>jilu@ws:\/mnt\/c\/Users\/jilu\/.ssh$ ssh -i ~\/.ssh\/scan_key root@ws<br \/>\nLast login: Thu Apr 13 17:09:03 2017 from 10.2.67.43<br \/>\n[root@ws ~]#<\/p>\n<p>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<\/p>\n<p>Setup docker test :<\/p>\n<p>blu@ubuntu-test01:~$ cat setup_chefdk_ubuntu.sh<br \/>\n#wget https:\/\/packages.chef.io\/files\/stable\/chefdk\/1.3.43\/ubuntu\/16.04\/chefdk_1.3.43-1_amd64.deb<br \/>\n#sudo dpkg -i chefdk_*.deb<br \/>\n#chef verify<br \/>\n#sleep 5<br \/>\necho &#8216;eval &#8220;$(chef shell-init bash)&#8221;&#8216; >> ~\/.bash_profile<br \/>\nsource ~\/.bash_profile<br \/>\nmkdir ~\/chef-repo\/.chef<br \/>\nblu@ubuntu-test01:~$<\/p>\n<p>blu@ubuntu-test01:~$ cat setup_docker.sh<br \/>\nsudo apt-key adv &#8211;keyserver hkp:\/\/p80.pool.sks-keyservers.net:80 &#8211;recv-keys 58118E89F3A912897C070ADBF76221572C52609D<br \/>\nsudo apt-add-repository &#8216;deb https:\/\/apt.dockerproject.org\/repo ubuntu-xenial main&#8217;<br \/>\nsudo apt-get update<br \/>\napt-cache policy docker-engine<br \/>\nsudo apt-get install -y docker-engine<br \/>\nsudo systemctl status docker<br \/>\n#sudo usermod -aG docker $(whoami)<br \/>\n#sudo usermod -aG docker <USER_NAME>   ## example :  $ sudo usermod -aG docker blu<br \/>\n#docker docker-subcommand &#8211;help<br \/>\ndocker info<br \/>\n#docker run hello-world<br \/>\ndocker search ubuntu<br \/>\ndocker pull ubuntu<br \/>\ndocker run ubuntu<br \/>\ndocker images<br \/>\n#docker run -it ubuntu<br \/>\n# https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-install-and-use-docker-on-ubuntu-16-04<br \/>\n# https:\/\/cloud.docker.com\/<br \/>\n# https:\/\/docs.docker.com\/engine\/userguide\/<\/p>\n<p>blu@ubuntu-test01:~$ sudo docker ps<br \/>\nCONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES<br \/>\nd8d0fb9aaa99        ubuntu              &#8220;\/bin\/bash&#8221;         18 minutes ago      Up 18 minutes                           networktest<\/p>\n<p>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<\/p>\n<p>kitchen test:  ( on RHEL 7.0):<\/p>\n<p>  448  cd git_cookbook\/<br \/>\n  449  cat .kitchen.yml<br \/>\n  450  berks install<br \/>\n  451  kitchen init<br \/>\n  452  kitchen create<br \/>\n  453  sudo kitchen create<br \/>\n  455  kitchen list<br \/>\n  457  kitchen login<br \/>\n  458  kitchen converge<br \/>\n  459  kitchen verify<\/p>\n<p>[chef@chefTest001 git_cookbook]$ pwd<br \/>\n\/export\/home\/chef\/cookbook\/git_cookbook<\/p>\n<p>[chef@chefTest001 git_cookbook]$ ls -la<br \/>\ntotal 36<br \/>\ndrwxrwxr-x.  7 chef chef 4096 May  6 02:01 .<br \/>\ndrwxrwxr-x. 10 chef chef 4096 May  6 00:21 ..<br \/>\n-rw-rw-r&#8211;.  1 chef chef   47 May  5 23:50 Berksfile<br \/>\n-rw&#8212;&#8212;-.  1 chef chef   89 May  6 02:03 Berksfile.lock<br \/>\n-rw-rw-r&#8211;.  1 chef chef 1133 May  5 23:50 chefignore<br \/>\ndrwxrwxr-x.  3 chef chef   64 May  5 23:50 .delivery<br \/>\n-rw-rw-r&#8211;.  1 chef chef  185 May  5 23:50 .gitignore<br \/>\ndrwxrwxr-x.  3 chef chef   86 May  6 02:01 .kitchen<br \/>\n-rw-rw-r&#8211;.  1 chef chef  399 May  6 01:59 .kitchen.yml<br \/>\n-rw-rw-r&#8211;.  1 chef chef  603 May  5 23:50 metadata.rb<br \/>\n-rw-rw-r&#8211;.  1 chef chef   60 May  5 23:50 README.md<br \/>\ndrwxrwxr-x.  2 chef chef   23 May  5 23:50 recipes<br \/>\ndrwxrwxr-x.  3 chef chef   38 May  5 23:50 spec<br \/>\ndrwxrwxr-x.  3 chef chef   20 May  5 23:50 test<\/p>\n<p>[chef@chefTest001 git_cookbook]$ cat .kitchen.yml<br \/>\n&#8212;<br \/>\ndriver:<br \/>\n  name: docker<br \/>\n  use_sudo: false<\/p>\n<p>provisioner:<br \/>\n  name: chef_solo<br \/>\n  always_update_cookbooks: true<\/p>\n<p>verifier:<br \/>\n  name: inspec<\/p>\n<p>platforms:<br \/>\n  &#8211; name: &#8216;centos&#8217;<br \/>\n    driver_plugin: docker<br \/>\n    driver:<br \/>\n      use_sudo: false<br \/>\n      image: centos:7<br \/>\nsuites:<br \/>\n  &#8211; name: default<br \/>\n    run_list:<br \/>\n      &#8211; recipe[git_cookbook::default]<br \/>\n    verifier:<br \/>\n      inspec_tests:<br \/>\n        &#8211; test\/recipes<br \/>\n    attributes:<br \/>\n[chef@chefTest001 git_cookbook]$<\/p>\n<p>[chef@chefTest001 git_cookbook]$ sudo kitchen create<br \/>\n&#8212;&#8211;> Starting Kitchen (v1.13.2)<br \/>\n&#8212;&#8211;> Creating <default-centos>&#8230;<br \/>\n       Sending build context to Docker daemon 63.49 kB<br \/>\n       Step 1 : FROM centos:7<br \/>\n        &#8212;> a8493f5f50ff<br \/>\n       Step 2 : ENV container docker<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> cd4f34c2a359<br \/>\n       Step 3 : RUN yum clean all<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> e57827f1b45a<br \/>\n       Step 4 : RUN yum install -y sudo openssh-server openssh-clients which curl<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> 98d0bbc9addc<br \/>\n       Step 5 : RUN ssh-keygen -t rsa -f \/etc\/ssh\/ssh_host_rsa_key -N &#8221;<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> ad964f0e4ec1<br \/>\n       Step 6 : RUN ssh-keygen -t dsa -f \/etc\/ssh\/ssh_host_dsa_key -N &#8221;<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> 1171ee68fc65<br \/>\n       Step 7 : RUN if ! getent passwd kitchen; then                 useradd -d \/home\/kitchen -m -s \/bin\/bash -p &#8216;*&#8217; kitchen;               fi<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> adf344a1c27e<br \/>\n       Step 8 : RUN echo &#8220;kitchen ALL=(ALL) NOPASSWD: ALL&#8221; >> \/etc\/sudoers<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> 9366130369e8<br \/>\n       Step 9 : RUN echo &#8220;Defaults !requiretty&#8221; >> \/etc\/sudoers<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> c84da9dac217<br \/>\n       Step 10 : RUN mkdir -p \/home\/kitchen\/.ssh<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> a93af0df0297<br \/>\n       Step 11 : RUN chown -R kitchen \/home\/kitchen\/.ssh<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> 40d10af1a509<br \/>\n       Step 12 : RUN chmod 0700 \/home\/kitchen\/.ssh<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> f6ca60f49247<br \/>\n       Step 13 : RUN touch \/home\/kitchen\/.ssh\/authorized_keys<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> 786812c8cff7<br \/>\n       Step 14 : RUN chown kitchen \/home\/kitchen\/.ssh\/authorized_keys<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> b4769fcf9c5d<br \/>\n       Step 15 : RUN chmod 0600 \/home\/kitchen\/.ssh\/authorized_keys<br \/>\n        &#8212;> Using cache<br \/>\n        &#8212;> 34137ca6012b<br \/>\n       Step 16 : RUN echo ssh-rsa\\ AAAAB3NzaC1yc2EAAAADAQABAAABAQD5OPccUfzFS7QWobVYo4ZcU953IV\\+TMsYby8U1EwDApxktasuFvL5EeZKcIpoa9T7yTrcrc2eoHhLx3dzHZn5KiilZmj7ifI2\\+c7nscNgP68Br15xbCCyRRILa3DNGdbwCvlNWPQST\\+dIOgnhvB2krT8jm8ppB8E\/3tyRCgwvKNWNs9jVOJKWqgQHfanpu4upQKsqbwv04cEOZ5fnivqTG90QvVOaG724czxcrdxkWcZMV6n9ztFwVTxcf11smyjZF0xCqHV9GoIxWhhbSCakn5uc9GnjHdrpeTcCPh9vDOn71TQrmaU8CFpwLK4dgVnvQGxVh1v4147XakGCGmbut\\ kitchen_docker_key >> \/home\/kitchen\/.ssh\/authorized_keys<br \/>\n        &#8212;> Running in 9e5593989577<br \/>\n        &#8212;> f07bfba007d4<br \/>\n       Removing intermediate container 9e5593989577<br \/>\n       Successfully built f07bfba007d4<br \/>\n       84dd0e5f49a7606b995cd82d3f85cc5932571814f5da5b42355be35dd44b413b<br \/>\n       0.0.0.0:32771<br \/>\n       [SSH] Established<br \/>\n       Finished creating <default-centos> (0m3.20s).<br \/>\n&#8212;&#8211;> Kitchen is finished. (0m4.26s)<br \/>\n[chef@chefTest001 git_cookbook]$ sudo kitchen list<br \/>\nInstance        Driver  Provisioner  Verifier  Transport  Last Action<br \/>\ndefault-centos  Docker  ChefSolo     Inspec    Ssh        Created<br \/>\n[chef@chefTest001 git_cookbook]$ kitchen list<br \/>\nInstance        Driver  Provisioner  Verifier  Transport  Last Action<br \/>\ndefault-centos  Docker  ChefSolo     Inspec    Ssh        Created<br \/>\n[chef@chefTest001 git_cookbook]$ kitchen ssh<br \/>\nCould not find command &#8220;ssh&#8221;.<br \/>\n[chef@chefTest001 git_cookbook]$ kitchen login<br \/>\nLast login: Fri May  5 20:31:56 2017 from 172.17.0.1<br \/>\n[kitchen@84dd0e5f49a7 ~]$ exit<br \/>\nlogout<br \/>\nConnection to localhost closed.<br \/>\n[chef@chefTest001 git_cookbook]$ kitchen converge<br \/>\n&#8212;&#8211;> Starting Kitchen (v1.13.2)<br \/>\n&#8212;&#8211;> Converging <default-centos>&#8230;<br \/>\n       Preparing files for transfer<br \/>\n       Preparing dna.json<br \/>\n       Resolving cookbook dependencies with Berkshelf 5.2.0&#8230;<br \/>\n       Removing non-cookbook files before transfer<br \/>\n       Preparing solo.rb<br \/>\n&#8212;&#8211;> Installing Chef Omnibus (install only if missing)<br \/>\n       Downloading https:\/\/omnitruck.chef.io\/install.sh to file \/tmp\/install.sh<br \/>\n       Trying curl&#8230;<br \/>\n       Download complete.<br \/>\n       el 7 x86_64<br \/>\n       Getting information for chef stable  for el&#8230;<br \/>\n       downloading https:\/\/omnitruck.chef.io\/stable\/chef\/metadata?v=&#038;p=el&#038;pv=7&#038;m=x86_64<br \/>\n         to file \/tmp\/install.sh.60\/metadata.txt<br \/>\n       trying curl&#8230;<br \/>\n       sha1     f0eac57e53833d710334839fbe4e9b940d1c43c6<br \/>\n       sha256   a3cb30fe2eb6e3ce5ea8914635d01562660f4978568fa3303b14336eefdb09ee<br \/>\n       url      https:\/\/packages.chef.io\/files\/stable\/chef\/13.0.118\/el\/7\/chef-13.0.118-1.el7.x86_64.rpm<br \/>\n       version  13.0.118<br \/>\n       downloaded metadata file looks valid&#8230;<br \/>\n       downloading https:\/\/packages.chef.io\/files\/stable\/chef\/13.0.118\/el\/7\/chef-13.0.118-1.el7.x86_64.rpm<br \/>\n         to file \/tmp\/install.sh.60\/chef-13.0.118-1.el7.x86_64.rpm<br \/>\n       trying curl&#8230;<br \/>\n       Comparing checksum with sha256sum&#8230;<\/p>\n<p>       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING<\/p>\n<p>       You are installing an omnibus package without a version pin.  If you are installing<br \/>\n       on production servers via an automated process this is DANGEROUS and you will<br \/>\n       be upgraded without warning on new releases, even to new major releases.<br \/>\n       Letting the version float is only appropriate in desktop, test, development or<br \/>\n       CI\/CD environments.<\/p>\n<p>       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING<\/p>\n<p>       Installing chef<br \/>\n       installing with rpm&#8230;<br \/>\n       warning: \/tmp\/install.sh.60\/chef-13.0.118-1.el7.x86_64.rpm: Header V4 DSA\/SHA1 Signature, key ID 83ef826a: NOKEY<br \/>\n       Preparing&#8230;                          ################################# [100%]<br \/>\n       Updating \/ installing&#8230;<br \/>\n          1:chef-13.0.118-1.el7              ################################# [100%]<br \/>\n       Thank you for installing Chef!<br \/>\n       Transferring files to <default-centos><br \/>\n       Starting Chef Client, version 13.0.118<br \/>\n       [2017-05-05T20:34:14+00:00] WARN: Plugin Network: unable to detect ipaddress<br \/>\n       [2017-05-05T20:34:14+00:00] WARN: Plugin Network: unable to detect ipaddress<br \/>\n       Creating a new client identity for default-centos using the validator key.<br \/>\n       resolving cookbooks for run list: [&#8220;git_cookbook::default&#8221;]<br \/>\n       Synchronizing Cookbooks:<br \/>\n         &#8211; git_cookbook (0.1.0)<br \/>\n       Installing Cookbook Gems:<br \/>\n       Compiling Cookbooks&#8230;<br \/>\n       Converging 1 resources<br \/>\n       Recipe: git_cookbook::default<br \/>\n         * log[This is default git recipe] action write<\/p>\n<p>       Running handlers:<br \/>\n       Running handlers complete<br \/>\n       Chef Client finished, 1\/1 resources updated in 01 seconds<br \/>\n       Finished converging <default-centos> (0m28.97s).<br \/>\n&#8212;&#8211;> Kitchen is finished. (0m30.11s)<br \/>\n[chef@chefTest001 git_cookbook]$ kitchen verify<br \/>\n&#8212;&#8211;> Starting Kitchen (v1.13.2)<br \/>\n&#8212;&#8211;> Setting up <default-centos>&#8230;<br \/>\n       Finished setting up <default-centos> (0m0.00s).<br \/>\n&#8212;&#8211;> Verifying <default-centos>&#8230;<br \/>\n       Using `\/export\/home\/chef\/cookbook\/git_cookbook\/test\/recipes\/default` for testing<\/p>\n<p>Target:  ssh:\/\/kitchen@localhost:32771<\/p>\n<p>  User root<br \/>\n     \u2714  should exist<br \/>\n     \u25cb  This is an example test, replace with your own test.<br \/>\n  Port 80<br \/>\n     \u2714  should not be listening<br \/>\n     \u25cb  This is an example test, replace with your own test.<\/p>\n<p>Test Summary: 2 successful, 0 failures, 2 skipped<br \/>\n       Finished verifying <default-centos> (0m0.73s).<br \/>\n&#8212;&#8211;> Kitchen is finished. (0m1.90s)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Example to add \/ register host to chef server and install &#8220;chef-client&#8221;: # knife bootstrap -N Working on Workstation host ( WS): local host ubuntu1404, chefdk dir \/opt\/chefdk\/bin root@WS:\/opt\/chefdk\/bin# pwd \/opt\/chefdk\/bin root@WS:\/opt\/chefdk\/bin# ls -ltr total 4605 -rwxr-xr-x 1 root root 532 Feb 2 11:22 rubocop -rwxr-xr-x 1 root root 1725 Feb 2 11:22 pushy-service-manager -rwxr-xr-x [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/166"}],"collection":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":1,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/166\/revisions"}],"predecessor-version":[{"id":167,"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/pages\/166\/revisions\/167"}],"wp:attachment":[{"href":"https:\/\/cephswift.com\/index.php\/wp-json\/wp\/v2\/media?parent=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}