From 9fc864d92a2e50fb349198b21dd56fd23f32f83a Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 25 Apr 2017 04:43:46 +0000 Subject: [PATCH] update gcp docs Signed-off-by: Akihiro Suda --- README.md | 3 +-- docs/gcp.md | 13 ++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c9223f620..cdae2d5fe 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,7 @@ See `linuxkit run --help`. `make test` or `make test-hyperkit` will run the test suite -There are also docs for booting on [Google Cloud](docs/gcp.md); `linuxkit push gcp && linuxkit run gcp .yml` should -work if you specified a GCP image to be built in the config. +There are also docs for booting on [Google Cloud](docs/gcp.md). More detailed docs will be available shortly, for running both single hosts and clusters. diff --git a/docs/gcp.md b/docs/gcp.md index c82dec8da..ab166615e 100644 --- a/docs/gcp.md +++ b/docs/gcp.md @@ -50,22 +50,25 @@ Make sure to download the credentials in JSON format and store them somewhere sa ## Build an image -Add a `gcp-img` output line to your yaml config, see the example in `examples/gcp.yml`. +Add a `gcp-img` output line to your yaml config, see the example in [`examples/gcp.yml`](../example/gcp.yml). -Then do `moby build myfile.yml` +Then do `moby build myprefix.yml` -This will create a local `myfile.img.tar.gz` compressed image file. +This will create a local `myprefix.img.tar.gz` compressed image file. ## Push image -Do `moby push gcp -project myproject-1234 -bucket bucketname myfile.img.tar.gz` to upload it to the +Do `linuxkit push gcp -project myproject-1234 -bucket bucketname myprefix.img.tar.gz` to upload it to the specified bucket, and create a bootable image from the stored image. +Alternatively, you can set the project name and the bucket name using environment variables, `CLOUDSDK_CORE_PROJECT` and `CLOUDSDK_IMAGE_BUCKET`. +See the constant values defined in [`src/cmd/linuxkit/run_gcp.go`](../src/cmd/linuxkit/run_gcp.go) for the complete list of the supported environment variables. + ## Create an instance and connect to it With the image created, we can now create an instance and connect to the serial port. ``` -moby run gcp -project myproject-1234 myfile +linuxkit run gcp -project myproject-1234 myprefix ```