Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

This branch is 161 commits behind chef:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
external
lib
LICENSE
README.rdoc
Rakefile
knife-google.gemspec

README.rdoc

Knife Google

DESCRIPTION:

This is the official Opscode Knife plugin for Google. This plugin gives knife the ability to create, bootstrap, and manage servers on the Google Cloud.

INSTALLATION (LINUX/OSX):

Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don't support plugins:

gem install chef

This plugin depends on the gcutil CLI utility

pip install https://dl.google.com/dl/compute/gcutil.tar.gz

This plugin is distributed as a Ruby Gem. To build and install it, run:

gem build knife-google
gem install knife-google

Alternatively, the rake utility installs the gcutil CLI utility as part of installation

rake install

INSTALLATION (WINDOWS):

Be sure you are running the latest version Chef. Versions earlier than 0.10.0 don't support plugins:

Follow these instructions to install Chef-Workstation on Windows: http://wiki.opscode.com/display/chef/Workstation+Setup+for+Windows

The gcutil tool can be installed on Windows, via Cygwin.

Install Cygwin with Python Environment: https://developers.google.com/compute/docs/gcutil_setup

In Windows, set CYGWINPATH environment variable to point the Cygwin Installation and add %CYGWINPATH%\bin to the PATH environment variable

set CYGWINPATH=<CYGWIN INSTALLATION PATH>
set PATH=%CYGWINPATH%\\bin;%PATH%

Use the rake utility to install gcutil CLI utility and the knife plugin

rake install

CONFIGURATION:

Run gcutil auth to request a token. This command prints a URL where you can acquire an OAuth 2.0 refresh token for Google Compute.

gcutil auth --project_id=<your_project_id>
Go to the following link in your browser:
<link>

Enter verification code:

# provision a new 2 Core 1GB Ubuntu 10.04 webserver
knife google server create -N <server-name> -i <SSH Identity Key> -k <SSH Public Key> --tcp 22,80,8080 
--udp 10000 --project_id <project-name> --flavor standard-2-cpu-ephemeral-disk

Additionally the following options may be set in your `knife.rb`:

  • flavor

  • image

  • distro

  • template_file

SUBCOMMANDS:

This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a --help flag

knife google server create

Provisions a new server in the Google Cloud and then perform a Chef bootstrap (using the SSH protocol). The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily intended for Chef Client systems that talk to a Chef server. By default the server is bootstrapped using the ubuntu10.04-gems template. This can be overridden using the -d or --template-file command options.

knife google server delete

Deletes an existing server in the currently configured Google Cloud account by the server/instance id. You can find the instance id by entering 'knife google server list'. Please note - this does not delete the associated node and client objects from the Chef server.

knife google server list

Outputs a list of all servers in the currently configured Google Cloud account. Please note - this shows all instances associated with the account, some of which may not be currently managed by the Chef server.

LICENSE:

Author

Chirag Jog (<chiragj@websym.com>)

Copyright

Copyright © 2012 Opscode, 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.

Something went wrong with that request. Please try again.