The knife push plugin is used by the Chef workstation to interact with the Push API to start jobs, view job status, view job lists, and view node status.
To build and install the plugin, run:
rake install
If push server is running on the same host as the OPC, then no reconfiguration is required on the Chef workstation.
This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a --help
flag.
The job list
subcommand is used to view a list of Push jobs.
$ knife job list
The job start
subcommand is used to start a Push job.
$ knife job start (options) COMMAND [NODE, NODE, ...]
This argument has the following options:
--timeout TIMEOUT
The maximum amount of time (in seconds) by which a job must complete, before it will be stopped.
-q QUORUM --quorum QUORUM
The minimum number of nodes that match the search criteria, are available, and acknowledge the job request. This can be expressed as a percentage (e.g. 50%) or as an absolute number of nodes (e.g. 145). Default value: 100%
-b --no-wait
Exit immediately after starting a job instead of waiting for it to complete.
For example, to search for nodes assigned the role “webapp”, and where 90% of those nodes must be available, enter:
$ knife job start -quorum 90% 'chef-client' --search 'role:webapp'
To search for a specific set of nodes (named chico, harpo, groucho, gummo, zeppo), and where 90% of those nodes must be available, enter:
$ knife job start --quorum 90% 'chef-client' chico harpo groucho gummo zeppo
Use the knife job start
subcommand to run a job with the following syntax:
$ knife job start job_name node_name
For example, to run a job named add-glasses against a node named “ricardosalazar”, enter the following:
$ knife job start add-glasses 'ricardosalazar'
The job status
argument is used to view the status of Push jobs.
$ knife job status
For example, to view the status of a job that has the identifier of “235”, enter:
$ knife job status 235
The node status
argument is used to identify nodes that Push may interact with.
$ knife node status
Push - The push jobs component for chef
Copyright: Copyright © 2008-2014 Chef Software, Inc. License: Apache License, Version 2.0
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.