f1-micro
g1-small
My pipe dream is for Google to combine Compute Engine’s flexible virtual machines with App Engine’s ridiculously impressive datastore.
me@workstation$ gcutil addinstance metadata-example \ --metadata=role:master --metadata_from_file=config:config.txt me@workstation$ gcutil ssh metadata-example [...snip...] me@metadata-example$ MDS=http://metadata/computeMetadata/v1beta1/instance me@metadata-example$ curl ${MDS}/attributes/role master me@metadata-example$ curl ${MDS}/attributes/config [...file content...]
me@metadata-example$ curl -s http://metadata/computeMetadata/v1beta1/?recursive=true \
| python -m json.tool
{
"instance": {
"attributes": {
"role": "master"
"config": "[...snip...]"
},
"description": "",
"disks": [
[...snip...]
],
"hostname": "metadata-example.c.my-project.internal",
[...snip...]
},
"project": {
"attributes": {
"sshKeys": "[...snip...]"
},
"numericProjectId": 1234,
"projectId": "my-project"
}
}
me@workstation$ cat startup.sh #! /bin/bash wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo rpm -Uvh epel-release-6*.rpm yum install -y npm npm install socket.io socket.io-client express request ROLE=$(curl http://metadata/computeMetadata/v1beta1/instance/attributes/role) gsutil cp gs://my-app/roles/$ROLE role.sh ./role.sh me@workstation$ gcutil addinstance start-me-up \ --metadata_from_file=startup-script:startup.sh \ --service_account_scopes=storage-rw me@workstation$ gcutil ssh start-me-up [...snip...] me@start-me-up$ cat /var/log/startupscript.log
$! /bin/bash IMAGE_VERSION=2 IMAGE_MARK=/var/myapp.image.$IMAGE_VERSION if [ ! -e $IMAGE_MARK ]; then [... runs one time ...] fi [... runs every boot ...]
me@workstation$ gcutil addinstance sa-example \ --service_account_scopes=storage-rw me@workstation$ gcutil ssh sa-example [snip] me@sa-example$ gsutil mb gs://unique-bucket-name Creating gs://unique-bucket-name/...