Skip to content

Commit

Permalink
Bugfixes and updates for GCE driver
Browse files Browse the repository at this point in the history
This updates a few things relating to bugs found during
initial testing and includes some features to minimize
the configuration of the driver.
  • Loading branch information
clintkitson committed Dec 3, 2015
1 parent 7a9cbb3 commit 6a6960e
Show file tree
Hide file tree
Showing 7 changed files with 164 additions and 52 deletions.
51 changes: 51 additions & 0 deletions .docs/user-guide/gce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#Google Compute Engine

The Google Cloud

---

## Overview
The GCE registers a storage driver named `gce` with the `REX-Ray`
driver manager and is used to connect and manage Google Compute Engine storage.

## Pre-Requisites
In order to leverage the GCE driver, REX-Ray must be located on the
running GCE instane that you wish to receive storage. There must also
be a `json key` file for the credentials that can be retrieved from the [API
portal](https://console.developers.google.com/apis/credentials).

## Configuration
The following is an example configuration of the GCE driver.

```yaml
gce:
keyfile: path_to_json_key
```

For information on the equivalent environment variable and CLI flag names
please see the section on how non top-level configuration properties are
[transformed](./config/#all-other-properties).

## Activating the Driver
To activate the XtremIO driver please follow the instructions for
[activating storage drivers](/user-guide/config#activating-storage-drivers),
using `gce` as the driver name.

## Examples
Below is a full `rexray.yml` file that works with GCE.

```yaml
rexray:
storageDrivers:
- gce
gce:
keyfile: /certdir/cert.json
```

## Configurable Items
The `volumetype` parameter is configurable based on what types are available in
your zone. Check the [diskTypes](https://cloud.google.com/compute/docs/reference/latest/diskTypes/list)
active API call for more details.

## Limitations
This driver does not currently support snapshot functionality.
2 changes: 1 addition & 1 deletion drivers/os/linux/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (d *driver) Format(
if overwriteFs || !fsDetected {
switch newFsType {
case "ext4":
if err := exec.Command("mkfs.ext4", deviceName).Run(); err != nil {
if err := exec.Command("mkfs.ext4", "-F", deviceName).Run(); err != nil {
return fmt.Errorf(
"Problem creating filesystem on %s with error %s",
deviceName, err)
Expand Down

0 comments on commit 6a6960e

Please sign in to comment.