| 31 | '' * The above command lists all possible sub-commands that should be used in conjunction with knife.'' |
| 32 | {{{ |
| 33 | OUTPUT EXCERPT |
| 34 | ============== |
| 35 | ERROR: You need to pass a sub-command (e.g., knife SUB-COMMAND) |
| 36 | |
| 37 | Usage: knife sub-command (options) |
| 38 | -s, --server-url URL Chef Server URL |
| 39 | --chef-zero-host HOST Host to start chef-zero on |
| 40 | --chef-zero-port PORT Port (or port range) to start chef-zero on. Port ranges like 1000,1010 or 8889-9999 will try all given ports until one works. |
| 41 | -k, --key KEY API Client Key |
| 42 | --[no-]color Use colored output, defaults to enabled |
| 43 | -c, --config CONFIG The configuration file to use |
| 44 | --config-option OPTION=VALUE Override a single configuration option |
| 45 | --defaults Accept default values for all questions |
| 46 | -d, --disable-editing Do not open EDITOR, just accept the data as is |
| 47 | -e, --editor EDITOR Set the editor to use for interactive commands |
| 48 | -E, --environment ENVIRONMENT Set the Chef environment (except for in searches, where this will be flagrantly ignored) |
| 49 | --[no-]fips Enable fips mode |
| 50 | -F, --format FORMAT Which format to use for output |
| 51 | --[no-]listen Whether a local mode (-z) server binds to a port |
| 52 | -z, --local-mode Point knife commands at local repository instead of server |
| 53 | -u, --user USER API Client Username |
| 54 | --print-after Show the data after a destructive operation |
| 55 | -V, --verbose More verbose output. Use twice for max verbosity |
| 56 | -v, --version Show chef version |
| 57 | -y, --yes Say yes to all prompts for confirmation |
| 58 | -h, --help Show this message |
| 59 | |
| 60 | Available subcommands: (for details, knife SUB-COMMAND --help) |
| 61 | |
| 62 | ** BOOTSTRAP COMMANDS ** |
| 63 | knife bootstrap [SSH_USER@]FQDN (options) |
| 64 | knife bootstrap windows ssh FQDN (options) |
| 65 | knife bootstrap windows winrm FQDN (options) |
| 66 | |
| 67 | ** CLIENT COMMANDS ** |
| 68 | knife client bulk delete REGEX (options) |
| 69 | knife client create CLIENTNAME (options) |
| 70 | |
| 71 | ... |
| 72 | }}} |
| 73 | $ kitchen[[br]] |
| 74 | ''* see'' [[https://docs.chef.io/kitchen.html|Kitchen]][[br]] |
| 75 | ''* Using kitchen without a sub-command likewise produces a listing of possible sub-commands'' |
| 76 | {{{ |
| 77 | OUTPUT |
| 78 | ====== |
| 79 | Commands: |
| 80 | kitchen console # Kitchen Console! |
| 81 | kitchen converge [INSTANCE|REGEXP|all] # Change instance state to ... |
| 82 | kitchen create [INSTANCE|REGEXP|all] # Change instance state to ... |
| 83 | kitchen destroy [INSTANCE|REGEXP|all] # Change instance state to ... |
| 84 | kitchen diagnose [INSTANCE|REGEXP|all] # Show computed diagnostic ... |
| 85 | kitchen driver # Driver subcommands |
| 86 | kitchen driver create [NAME] # Create a new Kitchen Driv... |
| 87 | kitchen driver discover # Discover Test Kitchen dri... |
| 88 | kitchen driver help [COMMAND] # Describe subcommands or o... |
| 89 | kitchen exec INSTANCE|REGEXP -c REMOTE_COMMAND # Execute command on one or... |
| 90 | kitchen help [COMMAND] # Describe available comman... |
| 91 | kitchen init # Adds some configuration t... |
| 92 | kitchen list [INSTANCE|REGEXP|all] # Lists one or more instances |
| 93 | kitchen login INSTANCE|REGEXP # Log in to one instance |
| 94 | kitchen package INSTANCE|REGEXP # package an instance |
| 95 | kitchen setup [INSTANCE|REGEXP|all] # Change instance state to ... |
| 96 | kitchen test [INSTANCE|REGEXP|all] # Test (destroy, create, co... |
| 97 | kitchen verify [INSTANCE|REGEXP|all] # Change instance state to ... |
| 98 | kitchen version # Print Kitchen's version i... |
| 99 | |
| 100 | }}} |
30 | | ''* see'' [[https://docs.chef.io/kitchen.html|Kitchen]][[br]] |
| 102 | ''* The people project contains every possible configuration file to build the project. The output is lengthy.'' |
| 103 | ''* The execution will stop if there is an error.'' |
| 104 | {{{ |
| 105 | OUTPUT EXCERPT |
| 106 | ============== |
| 107 | -----> Starting Kitchen (v1.13.2) |
| 108 | -----> Creating <default-centos-67>... |
| 109 | Bringing machine 'default' up with 'virtualbox' provider... |
| 110 | ==> default: Box 'bento/centos-6.7' could not be found. Attempting to find and install... |
| 111 | default: Box Provider: virtualbox |
| 112 | default: Box Version: >= 0 |
| 113 | ==> default: Loading metadata for box 'bento/centos-6.7' |
| 114 | default: URL: https://atlas.hashicorp.com/bento/centos-6.7 |
| 115 | ==> default: Adding box 'bento/centos-6.7' (v2.2.7) for provider: virtualbox |
| 116 | default: Downloading: https://atlas.hashicorp.com/bento/boxes/centos-6.7/versions/2.2.7/providers/virtualbox.box |
| 117 | ==> default: Successfully added box 'bento/centos-6.7' (v2.2.7) for 'virtualbox'! |
| 118 | ==> default: Importing base box 'bento/centos-6.7'... |
| 119 | ==> default: Matching MAC address for NAT networking... |
| 120 | ==> default: Checking if box 'bento/centos-6.7' is up to date... |
| 121 | ==> default: Setting the name of the VM: kitchen-iam-app-people-default-centos-67_default_1477008499277_5702 |
| 122 | ==> default: Clearing any previously set network interfaces... |
| 123 | ==> default: Preparing network interfaces based on configuration... |
| 124 | default: Adapter 1: nat |
| 125 | ==> default: Forwarding ports... |
| 126 | default: 80 (guest) => 8082 (host) (adapter 1) |
| 127 | default: 443 (guest) => 8445 (host) (adapter 1) |
| 128 | default: 22 (guest) => 2222 (host) (adapter 1) |
| 129 | ==> default: Booting VM... |
| 130 | ==> default: Waiting for machine to boot. This may take a few minutes... |
| 131 | default: SSH address: 127.0.0.1:2222 |
| 132 | default: SSH username: vagrant |
| 133 | default: SSH auth method: private key |
| 134 | default: Warning: Remote connection disconnect. Retrying... |
| 135 | default: |
| 136 | default: Vagrant insecure key detected. Vagrant will automatically replace |
| 137 | default: this with a newly generated keypair for better security. |
| 138 | default: |
| 139 | default: Inserting generated public key within guest... |
| 140 | default: Removing insecure key from the guest if it's present... |
| 141 | |
| 142 | ... |
| 143 | |
| 144 | Current file[/etc/sensu/ssl/key.pem]: /tmp/kitchen/cache/cookbooks/iam-app-people/recipes/sensu.rb:122:in `from_file' at 1 location: |
| 145 | - /tmp/kitchen/cache/cookbooks/iam-app-people/recipes/sensu.rb:122:in `from_file' |
| 146 | |
| 147 | Chef Client finished, 49/68 resources updated in 02 minutes 40 seconds |
| 148 | Finished converging <default-centos-67> (3m4.23s). |
| 149 | -----> Kitchen is finished. (4m27.33s) |
| 150 | }}} |
| 154 | ''* A final check verifies the system is fully installed in the local chef-repo'' |
| 155 | {{{ |
| 156 | OUTPUT |
| 157 | ====== |
| 158 | -----> Starting Kitchen (v1.13.2) |
| 159 | -----> Setting up <default-centos-67>... |
| 160 | Finished setting up <default-centos-67> (0m0.00s). |
| 161 | -----> Verifying <default-centos-67>... |
| 162 | Preparing files for transfer |
| 163 | -----> Installing Busser (busser) |
| 164 | Fetching: thor-0.19.0.gem (100%) |
| 165 | Successfully installed thor-0.19.0 |
| 166 | Fetching: busser-0.7.1.gem (100%) |
| 167 | Successfully installed busser-0.7.1 |
| 168 | 2 gems installed |
| 169 | Installing Busser plugins: busser-serverspec |
| 170 | Plugin serverspec installed (version 0.5.10) |
| 171 | -----> Running postinstall for serverspec plugin |
| 172 | Suite path directory /tmp/verifier/suites does not exist, skipping. |
| 173 | Transferring files to <default-centos-67> |
| 174 | -----> Running serverspec test suite |
| 175 | -----> Installing Serverspec.. |
| 176 | Fetching: diff-lcs-1.2.5.gem (100%) |
| 177 | Fetching: rspec-expectations-3.5.0.gem (100%) |
| 178 | Fetching: rspec-mocks-3.5.0.gem (100%) |
| 179 | Fetching: rspec-3.5.0.gem (100%) |
| 180 | Fetching: rspec-its-1.2.0.gem (100%) |
| 181 | Fetching: multi_json-1.12.1.gem (100%) |
| 182 | Fetching: net-ssh-3.2.0.gem (100%) |
| 183 | Fetching: net-scp-1.2.1.gem (100%) |
| 184 | Fetching: net-telnet-0.1.1.gem (100%) |
| 185 | Fetching: sfl-2.3.gem (100%) |
| 186 | Fetching: specinfra-2.63.3.gem (100%) |
| 187 | Fetching: serverspec-2.37.2.gem (100%) |
| 188 | -----> serverspec installed (version 2.37.2) |
| 189 | /opt/chef/embedded/bin/ruby -I/tmp/verifier/suites/serverspec -I/tmp/verifier/gems/gems/rspec-support-3.5.0/lib:/tmp/verifier/gems/gems/rspec-core-3.5.4/lib /opt/chef/embedded/bin/rspec --pattern /tmp/verifier/suites/serverspec/\*\*/\*_spec.rb --color --format documentation --default-path /tmp/verifier/suites/serverspec |
| 190 | |
| 191 | Service "httpd" |
| 192 | should be enabled |
| 193 | should be running |
| 194 | |
| 195 | Port "80" |
| 196 | should be listening |
| 197 | |
| 198 | Port "443" |
| 199 | should be listening |
| 200 | |
| 201 | Package "sensu" |
| 202 | should be installed |
| 203 | |
| 204 | Service "sensu-client" |
| 205 | should be enabled |
| 206 | should be running |
| 207 | |
| 208 | Finished in 0.68722 seconds (files took 0.4512 seconds to load) |
| 209 | 7 examples, 0 failures |
| 210 | |
| 211 | Finished verifying <default-centos-67> (0m10.06s). |
| 212 | -----> Kitchen is finished. (0m11.28s) |
| 213 | }}} |
| 214 | $ kitchen login[[br]] |
| 215 | ''* Entering the kitchen allows the user to see what is in the Chef cookbook'' |
| 216 | {{{ |
| 217 | Last login: Fri Oct 21 00:12:22 2016 from 10.0.2.2 |
| 218 | [vagrant@default-centos-67 ~]$ whoami |
| 219 | vagrant |
| 220 | [vagrant@default-centos-67 ~]$ ls ../ |
| 221 | vagrant |
| 222 | [vagrant@default-centos-67 ~]$ ls ../../ |
| 223 | bin boot dev etc home lib lib64 lost+found media mnt opt proc root sbin selinux srv sys tmp usr var |
| 224 | [vagrant@default-centos-67 ~]$ ls |
| 225 | [vagrant@default-centos-67 ~]$ ls /var |
| 226 | cache crash db empty games lib local lock log mail nis opt preserve run spool tmp www yp |
| 227 | [vagrant@default-centos-67 ~]$ ls /var/www |
| 228 | cgi-bin error html icons |
| 229 | [vagrant@default-centos-67 ~]$ ls /var/www/html |
| 230 | entry.js index.css library_ldap.php people_logo.png search.js settings_gear.png UA-logo-people.jpg UAS-logo-people.jpg |
| 231 | favicon.ico index.js library.php people_logo.text.png search.php UAA-logo-people.jpg UAlogo.png zoom-in.png |
| 232 | generic.css index.php main.css search.css search.png UAF-logo-people.jpg uapeople_logo.png |
| 233 | [vagrant@default-centos-67 ~]$ exit |
| 234 | logout |
| 235 | Connection to 127.0.0.1 closed. |
| 236 | }}} |
| 237 | $ kitchen destroy[[br]] |
| 238 | ''* It is recommended to destroy this instance and you will create a completely new one once you submit changes or if you download a more recent version.'' |
| 239 | {{{ |
| 240 | -----> Starting Kitchen (v1.13.2) |
| 241 | -----> Destroying <default-centos-67>... |
| 242 | ==> default: Forcing shutdown of VM... |
| 243 | ==> default: Destroying VM and associated drives... |
| 244 | Vagrant instance <default-centos-67> destroyed. |
| 245 | Finished destroying <default-centos-67> (0m4.37s). |
| 246 | -----> Kitchen is finished. (0m5.20s) |
| 247 | }}} |