-
gcutil addinstance --image=windows-server-2008-r2-dc-v20140609 --zone=europe-west1-windows --machine_type=n1-standard-1 source-windows
-
Provide a password for the gceadmin account of your Windows instance(s):
-
wait about 10-15 minutes
-
confirm that the instance is completely up: gcutil getserialportoutput source-windows output should end with: ```
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#ZSH_THEME="robbyrussell" | |
ZSH_THEME="blinks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
appengine_config.py | |
def webapp_add_wsgi_middleware(app): | |
from google.appengine.ext.appstats import recording | |
app = recording.appstats_wsgi_middleware(app) | |
return app | |
appstats_SHELL_OK = True | |
app.yaml | |
[..] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
os.system("gcutil listinstances --filter='status eq RUNNING' --columns=disks --format=csv 2>&1 | grep '/' >/tmp/gcutil.mounted;" | |
"gcutil listdisks --columns=name --format=names >/tmp/gcutil.disks") | |
disks = set(open("/tmp/gcutil.disks").read().split()) | |
mounted = set(open("/tmp/gcutil.mounted").read().split()) | |
uniques = disks.difference(mounted).union(mounted.difference(disks)) |
- Take a snapshot of your existing instance. Go to console.developers.google.com/project/[Project Number]/compute/snapshots and click "New snapshot" Name your snapshot (e.g. windows-snapshot) and select the disk of your Windows instance under "SOURCE DISK" Click "Create" to create the instance.
- Create a bigger disk and apply the snapshot e.g. gcutil --service_version="v1" --project="modelity-wp" adddisk "mybigwindows" --zone="us-central2-windows" --source_snapshot="windows-snapshot" --disk_type="pd-standard" --size_gb="1300"
- Create a new instance and attach the bigger disk e.g. gcutil --service_version="v1" --project="modelity-wp" addinstance "mybigwindows" --zone="us-central2-windows" --machine_type="n1-standard-1" --network="default" --external_ip_address="ephemeral" --disk="mybigwindows,deviceName=mybigwindows,mode=READ_WRITE,boot"
- go to the cloud console https://console.developers.google.com
- go to snapshots and click on 'New snapshot'
- select your source disk
- Take note of the Name field and click 'Create'
- go to disks click on 'New disk'
- flip Source Type to Snapshot
- make sure you define the zone matching where the instance is going to be hosted
- select source snapshot created at step 4
Pre-requisite: go to http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html download http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe and http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe
- Click 'Generate' move the mouse around as instructed and wait
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import webapp2 | |
from apiclient.discovery import build | |
from apiclient.errors import HttpError | |
import httplib2 | |
from oauth2client.client import SignedJwtAssertionCredentials | |
# Enter your Google Developer Project number | |
PROJECT_NUMBER = "XXXXXXXXXX" | |
apt-get -y update
apt-get -y install nginx;
echo "<center><h2>Welcome to $HOSTNAME</h2></center>" | sudo tee /usr/share/nginx/www/index.html;
service nginx start
eg.:
OlderNewer