forked from AppScale/gts
-
Notifications
You must be signed in to change notification settings - Fork 1
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).
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.
$ cd google-cloud-sdk/bin
$ ./gcloud auth login
Now verify it worked by listing the images on your project:
$ ./gcutil listimages --project <project name>
$ ./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.
Run the bootstrap script
$ ./gcutil ssh --project=<project name> --permit_root_ssh <instance_name>
$ wget bootstrap.appscale.com
$ bash index.html
$ 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.