Fog currently supports two Google Cloud services: Google Compute Engine and Google Cloud Storage. The main maintainer for the Google sections is @icco.
Google Cloud Storage originally was very similar to Amazon's S3. Because of this, Fog implements the XML GCS API. We eventually want to move to the new JSON API, once it has similar performance characteristics to the XML API. If this migration interests you, send us a pull request!
Google Compute Engine is a Virtual Machine hosting service. Currently it is built on version v1 of the GCE API.
Our implementation of the API currently supports
- Server creation, deletion and bootstrapping
- Persistent Disk creation and deletion
- Image lookup
- Network and Firewall configuration
- Operations
- Snapshots
- Instance Metadata
- Project Metadata
Features we are looking forward to implementing in the future:
- Image creation
- Load balancer configuration
If you are using Fog to interact with GCE, please keep Fog up to date and file issues for any anomalies you see or features you would like.
Add this line to your application's Gemfile:
gem 'fog-google'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fog-google
Follow the instructions to generate a private key. You can then create a fog credentials file at ~/.fog
, which will look something like this:
my_credential:
google_project: my-project
google_client_email: xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx@developer.gserviceaccount.com
google_json_key_location: /path/to/my-project-xxxxxxxxxxxx.json
If you want to be able to bootstrap SSH-able instances, (using servers.bootstrap
,) be sure you have a key in ~/.ssh/id_rsa
and ~/.ssh/id_rsa.pub
.
See CONTRIBUTING.md
in this repository.