Differences between revisions 28 and 31 (spanning 3 versions)
Revision 28 as of 2014-09-23 04:47:19
Size: 7481
Editor: MishaBrukman
Comment: Switch from gcutil to gcloud for instance creation.
Revision 31 as of 2014-09-23 16:03:01
Size: 7236
Editor: MishaBrukman
Comment: The requirement of using only Google-provided kernels has been removed.
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
 * Currently, all images must run Google-provided kernels, currently version 3.3.8. These kernels have module loading and direct memory access (e.g. /dev/mem) disabled for security purposes. /proc/config.gz lists the configuration details, and [[https://developers.google.com/compute/docs/kernels|source is available]]. Google is working to lift this restriction and expects to allow arbitrary kernels in the future.
Line 36: Line 35:
See also detailed documentation for the [[https://developers.google.com/cloud/sdk/gcloud/reference/compute/instances/create|gcloud compute instances create]] command. See also: [[https://developers.google.com/cloud/sdk/gcloud/reference/compute/instances/create|gcloud compute instances create]] command reference.
Line 38: Line 37:
== Listing All Images == == Listing Current Images ==
Line 40: Line 39:
To list the currently available and recommended Debian Google Compute Engine images, use [[https://developers.google.com/cloud/sdk/gcloud/reference/compute/images/list|gcloud]]: To list the currently-recommended, newest versions of Debian images on Google Compute Engine, use [[https://developers.google.com/cloud/sdk/gcloud/|gcloud]]:
Line 42: Line 41:
{{{gcloud compute images list --project=debian-cloud --no-standard-images}}} {{{
gcloud compute images list --project=debian-cloud --no-standard-images
}}}
Line 44: Line 45:
== Deprecated Images == See also: [[https://developers.google.com/cloud/sdk/gcloud/reference/compute/images/list|gcloud compute images list]] command reference.

== Listing Older and Deprecated Images ==
Line 48: Line 51:
Use the gcloud tool to list images and review their deprecation status, if any: Use [[https://developers.google.com/cloud/sdk/gcloud/|gcloud]] to list images and review their deprecation status, if any:
Line 50: Line 53:
{{{gcloud compute images list --project=debian-cloud --no-standard-images --show-deprecated}}} {{{
gcloud compute images list --project=debian-cloud --no-standard-images --show-deprecated
}}}

Cloud/?Google Compute Engine Image lists for Google Compute Engine

Google Compute Engine Documentation

Google Compute Engine home page, including documentation: https://developers.google.com/compute/

Debian Images

These images result from a collaboration between Debian and Google. Debian community members are welcome to help improve and maintain the images in Google Compute Engine. This includes directly uploading the Debian images which Google publicizes to Google Compute Engine customers.

The images deviate in these ways from official Debian images:

  • Certain non-Debian software is installed to facilitate integration, all freely licensed under the Apache License 2.0:
    • Three debs: google-startup-scripts, google-compute-daemon, image-bundle (these are mostly or completely replaceable with cloud-init if someone does the work)
    • Two unpackaged command-line utilities installed in /usr/local/share/google and symlinked into /usr/local/bin: gcutil and gsutil (optimal packaging situation TBD)
    • The google-startup-scripts deb manages user accounts by default - see below.

Google is interested in working with Debian to make the images even more standard and achieve official Debian image status. In the meantime, Debian has indicated that it's okay with these images being labeled as Debian instead of Debian-based.

For discussion about Debian on various cloud providers, please visit the debian-cloud mailing list.

SSH user accounts

One intentional difference from Debian's Amazon EC2 images is that, instead of sshing in via a default “admin” account, we install a cron job in /etc/cron.d to manage accounts in line with the Google Compute Engine documentation. For more information, review how ssh works on Google Compute Engine. The cron job can be safely removed or disabled to use alternative ways of managing accounts.

Using An Image

To use an image, use gcloud:

gcloud compute instances create "<instance-name>" --image="<image-name>" --image-project=debian-cloud --zone="<zone>" --machine-type="<machine-type>"

See also: gcloud compute instances create command reference.

Listing Current Images

To list the currently-recommended, newest versions of Debian images on Google Compute Engine, use gcloud:

gcloud compute images list --project=debian-cloud --no-standard-images

See also: gcloud compute images list command reference.

Listing Older and Deprecated Images

As Google Compute Engine releases new images, older images will be deprecated and eventually removed. When this happens, Google Compute Engine sets the deprecation status on an image and if your instances or disks uses a deprecated image, you will need to restart them with a newer, non-deprecated image.

Use gcloud to list images and review their deprecation status, if any:

gcloud compute images list --project=debian-cloud --no-standard-images --show-deprecated

A list of deprecation statuses are available in the Images reference documentation.

Building a Google Compute Engine Image

To build a Debian image for Google Compute Engine, follow these instructions:

  1. Request access to Google Compute Engine

    • If you want to help with the Cloud/GoogleComputeEngineImage effort and don't already have a Google Compute Engine space to work in, contact David (cache@google.com) and Jimmy (jkaplowitz@google.com). Be sure to provide the following information in your email:

      • A description of how you can help
      • The email of your Google account (Google Apps and consumer accounts are both fine)
      We will add people to the appropriate projects, within certain constraints. See "Access To Test Account for Debian Developers" below for more information.
  2. Create images using the build script (see below) on any Linux machine

    • Example command line (root access is needed for the loopback mounting process):
      • # Either squeeze or wheezy should work.
      • sudo ./build-debian-cloud gce --codename wheezy
  3. Follow the steps to upload and use a custom image

    • The image will end up in the same directory. From there, follow the steps to upload and use a custom image in Google Compute Engine, beginning with step 4. Note the linked instructions tell you to run:

      • gcutil --project=<project-id> addimage <image-name> <image-uri> --preferred_kernel=/projects/google/global/kernels/<kernel-name>

      To find the correct <kernel-name>, choose from a list of available kernels:

      • gcutil listkernels --project=google (rather than your own project)
      If you omit --preferred_kernel, simply choose the newest available kernel when prompted by gcutil.

Image Build Script

Anders Ingemann has created a build script for bootstrapping instances that runs automatically and needs no user interaction. You can also attach custom scripts to the script as well. Download or clone the script on github. Any bugs or suggestions should be reported via the github issue tracker or discussed on debian-cloud.

Note: Google's fork of Anders' repository may sometimes have newer changes specific to Google Compute Engine, including ones used to build Debian images. Pull requests are regularly submitted to Anders and merged upstream in his repository.

Future Plans

Not yet available

Google Contacts

If you have any questions, concerns, or general feedback, please don’t hesitate to contact the Google Compute team (gc-team@google.com) or David McWherter (cache@google.com) or me (jimmy@debian.org or jkaplowitz@google.com) directly about this effort.

Access to test account, for Debian Developers interested in testing, or working on Debian images

Google has created two Google Compute Engine projects for Debian’s use. Billing for Google Compute Engine and Google Cloud Storage has been waived on these projects. The first project, ‘debian-cloud’, is intended for pushing new images to customers. The second project, ‘debian-cloud-experiments’, is intended for Debian volunteers to experiment with the project. It has a small quota and must be shared. Google will work with Debian to manage access to these projects. Google Compute Engine is working toward toward general availability, so over time it will become easier for anyone to get involved. Until then, Google is happy to facilitate access for this purpose.