Skip to content

Creating a Google Compute Engine image

Navraj Chohan edited this page May 14, 2014 · 8 revisions

This document describes how to create a GCE image off of the master branches (latest and greatest).

Step 1: Get the cloud tools

Download and install the google cloud tools:

curl https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash | bash

You do not need to install App Engine SDK when prompted.

Step 2: Authenticate

$ cd google-cloud-sdk/bin

$ ./gcloud auth login

Now verify it worked by listing the images on your project:

$ ./gcutil listimages --project <project name>

Step 3: Start a base image

$ ./gcutil --project=<project name> addinstance --service_account_scopes=storage-rw,compute-rw --image=projects/debian-cloud/global/images/backports-debian-7-wheezy-v20140415 --permit_root_ssh <instance_name>

When prompted: Select the US region and n1-standard-2 instance size.

Step 4: Install AppScale

Run the bootstrap script

$ ./gcutil ssh  --project=<project name> --permit_root_ssh <instance_name>

$ wget bootstrap.appscale.com

$ bash index.html

Step 5: Bundle, upload, register the image

$ gcimagebundle -d /dev/sda -o /tmp/ --log_file=/tmp/abc.log

$ gsutil mb gs://<bucket-name>

$ gsutil cp /tmp/<your-image>.image.tar.gz gs://<bucket-name>

$ gcutil --project=<project-id> addimage <image-name> <image-uri>

Optionally, go and make the image public in the cloud console if you want the share it.

Clone this wiki locally