Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #201 from ehazlett/gce-env-vars
Browse files Browse the repository at this point in the history
add env vars for google driver; add google instructions to docs
  • Loading branch information
bfirsh committed Jan 2, 2015
2 parents 5a3b491 + 0ab3bfa commit e32c54d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ Options:
- `--amazonec2-vpc-id`: Your VPC ID to launch the instance in.
- `--amazonec2-zone`: The AWS zone launch the instance in (i.e. one of a,b,c,d,e).

### Google Compute

Create machines on [Google Compute](https://cloud.google.com/compute/). You will need a Google account and project name. See https://cloud.google.com/compute/docs/projects for details on projects.

The Google driver uses oAuth. When creating the machine, you will have your browser opened to authorize. Once authorized, paste the code given in the prompt to launch the instance.

Options:

- `--google-zone`: The zone to launch the instance. Default: `us-central1-a`
- `--google-machine-type`: The type of instance. Default: `f1-micro`
- `--google-username`: The username to use for the instance. Default: `docker-user`
- `--google-instance-name`: The name of the instance. Default: `docker-machine`
- `--google-project`: The name of your project to use when launching the instance.

## Contributing

[![GoDoc](https://godoc.org/github.com/docker/machine?status.png)](https://godoc.org/github.com/docker/machine)
Expand Down
33 changes: 19 additions & 14 deletions drivers/google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,33 @@ func init() {
func GetCreateFlags() []cli.Flag {
return []cli.Flag{
cli.StringFlag{
Name: "google-zone",
Usage: "GCE Zone",
Value: "us-central1-a",
Name: "google-zone",
Usage: "GCE Zone",
Value: "us-central1-a",
EnvVar: "GOOGLE_ZONE",
},
cli.StringFlag{
Name: "google-machine-type",
Usage: "GCE Machine Type",
Value: "f1-micro",
Name: "google-machine-type",
Usage: "GCE Machine Type",
Value: "f1-micro",
EnvVar: "GOOGLE_MACHINE_TYPE",
},
cli.StringFlag{
Name: "google-username",
Usage: "User Name",
Value: "docker-user",
Name: "google-username",
Usage: "User Name",
Value: "docker-user",
EnvVar: "GOOGLE_USERNAME",
},
cli.StringFlag{
Name: "google-instance-name",
Usage: "GCE Instance Name",
Value: "docker-machine",
Name: "google-instance-name",
Usage: "GCE Instance Name",
Value: "docker-machine",
EnvVar: "GOOGLE_INSTANCE_NAME",
},
cli.StringFlag{
Name: "google-project",
Usage: "GCE Project",
Name: "google-project",
Usage: "GCE Project",
EnvVar: "GOOGLE_PROJECT",
},
}
}
Expand Down

0 comments on commit e32c54d

Please sign in to comment.