Knife Shove

DESCRIPTION:

The knife shove plugin is used by the Chef workstation to interact with the Goiardi Shovey API to start jobs, cancel jobs, view job status, view job lists, and view node status. It takes inspiration from Chef Push, and the knife plugin was originally forked from knife-push, but the implementation is quite different.

INSTALLATION:

To build and install the plugin, run:

rake install

Or install from rubygems with ‘gem install knife-shove`.

CONFIGURATION:

No reconfiguration is required on the Chef workstation.

SUBCOMMANDS:

This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a --help flag. All commands are in the “goairdi” namespace.

job list

The job list subcommand is used to view a list of Shovey jobs.

Syntax

$ knife goiardi job list

job start

The job start subcommand is used to start a Shovey job.

Syntax

$ knife goiardi job start (options) COMMAND [NODE, NODE, ...]

Options

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 --dont-wait

Exit immediately after starting a job instead of waiting for it to complete.

Examples

For example, to search for nodes assigned the role “webapp”, and where 90% of those nodes must be available, enter:

$ knife goiardi 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 goiardi job start --quorum 90% 'chef-client' chico harpo groucho gummo zeppo

Use the knife goirdi job start subcommand to run a job with the following syntax:

$ knife goiardi job start job_name node_name

For example, to run a job named add-glasses against a node named “ricardosalazar”, enter the following:

$ knife goiardi job start add-glasses 'ricardosalazar'

job status

The job status argument is used to view the status of Shovey jobs.

Syntax

$ knife goiardi job status

Examples

For example, to view the status of a job that has the identifier of “235”, enter:

$ knife goiardi job status 235

job cancel

The job cancel argument is used to cancel a Shovey job, optionally on only the given nodes.

Syntax

$ knife goiardi job cancel <job id> [node, node, ...]

Examples

For example, to cancel a job that has the identifier of “235” on node “foo.local”, enter:

$ knife goiardi job cancel 235 foo.local

job info

The job info argument is used to view detailed information about a node’s shovey run.

Syntax

$ knife goiardi job info <job id> <node>

job stream

The job stream argument can be used to stream the output of a shovey job running on a remote node to the managing workstation. Standard output will be normal colored, while standard out is normally printed in red.

Standard out and error are read, stored, and sent on the shovey node separately in 1024 byte chunks, and are displayed by knife as they are received. Thus, standard out and error output displayed by this command will probably not be woven together the same way they would if you were running the command locally.

Syntax

$ knife goiardi job stream <job id> <node>

node status

The node status argument is used to identify nodes that Shovey may interact with.

Syntax

$ knife goiardi node status

License

Shovey - The push jobs component for goiardi

Copyright: Copyright © 2014 Jeremy Bingham 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.

This plugin is forked from, and includes code from Chef Pushy:

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.