Skip to content

Instantly share code, notes, and snippets.

@imduffy15
Created September 25, 2013 19:38
Show Gist options
  • Select an option

  • Save imduffy15/6704923 to your computer and use it in GitHub Desktop.

Select an option

Save imduffy15/6704923 to your computer and use it in GitHub Desktop.
duffy at thunder in ~/bin/gcutilexo
$ ./gcutil --authorization_uri_base=https://localhost:5000/oauth2 --auth_host_name=127.0.0.1 --auth_host_port=9999 --auth_local_webserver=true --api_host="https://localhost:5000/" --ssh_user=root --fetch_discovery=true --project=ian@ianduffy.ie addinstance example71
Selecting the only available zone: CH-GV2
1: Extra-large Extra-large 16384mb 4cpu
2: Huge Huge 32184mb 8cpu
3: Large Large 8192mb 4cpu
4: Medium Medium 4096mb 2cpu
5: Micro Micro 512mb 1cpu
6: Small Small 2048mb 2cpu
7: Tiny Tiny 1024mb 1cpu
>>> 5
The boot disk is unspecified. I can create a new persistent boot disk and use it (preferred), or use a scratch disk (not recommended). Do you want to use a persistent boot disk? [y/n]
>>> n
1: CentOS 5.5(64-bit) no GUI (KVM)
2: Linux CentOS 6.4 64-bit
3: Linux CentOS 6.4 64-bit
4: Linux CentOS 6.4 64-bit
5: Linux CentOS 6.4 64-bit
6: Linux CentOS 6.4 64-bit
7: Linux Ubuntu 12.04 LTS 64-bit
8: Linux Ubuntu 12.04 LTS 64-bit
9: Linux Ubuntu 12.04 LTS 64-bit
10: Linux Ubuntu 12.04 LTS 64-bit
11: Linux Ubuntu 12.04 LTS 64-bit
12: Linux Ubuntu 13.04 64-bit
13: Linux Ubuntu 13.04 64-bit
14: Linux Ubuntu 13.04 64-bit
15: Linux Ubuntu 13.04 64-bit
16: Linux Ubuntu 13.04 64-bit
17: Windows Server 2008 R2 SP1
18: Windows Server 2008 R2 SP1
19: Windows Server 2008 R2 SP1
20: Windows Server 2008 R2 SP1
21: Windows Server 2012
22: Windows Server 2012
23: Windows Server 2012
24: Windows Server 2012
>>> 5
INFO: Waiting for insert of instance . Sleeping for 3s.
INFO: Waiting for insert of instance . Sleeping for 3s.
INFO: Waiting for insert of instance . Sleeping for 3s.
INFO: Waiting for insert of instance . Sleeping for 3s.
INFO: Waiting for insert of instance . Sleeping for 3s.
INFO: Waiting for insert of instance . Sleeping for 3s.
Table of resources:
+-----------+--------------+-------------------------+--------+---------+--------------+--------------+-------+--------+---------+----------------+
| name | machine-type | image | kernel | network | network-ip | external-ip | disks | zone | status | status-message |
+-----------+--------------+-------------------------+--------+---------+--------------+--------------+-------+--------+---------+----------------+
| example71 | Micro | Linux CentOS 6.4 64-bit | | default | 185.19.28.12 | 185.19.28.12 | | CH-GV2 | RUNNING | |
+-----------+--------------+-------------------------+--------+---------+--------------+--------------+-------+--------+---------+----------------+
Table of operations:
+--------------------------------------+--------+--------+--------+----------------+-----------+--------------------------+----------------+-------+---------------+---------+
| name | region | zone | status | status-message | target | insert-time | operation-type | error | error-message | warning |
+--------------------------------------+--------+--------+--------+----------------+-----------+--------------------------+----------------+-------+---------------+---------+
| c5576593-bc5c-4eeb-8bc6-57a8a694fe4b | | CH-GV2 | DONE | | example71 | 2013-09-25T21:37:49+0200 | insert | | | |
+--------------------------------------+--------+--------+--------+----------------+-----------+--------------------------+----------------+-------+---------------+---------+
duffy at thunder in ~/bin/gcutilexo
$ ping 185.19.28.12
PING 185.19.28.12 (185.19.28.12): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
Request timeout for icmp_seq 10
Request timeout for icmp_seq 11
64 bytes from 185.19.28.12: icmp_seq=12 ttl=50 time=32.644 ms
64 bytes from 185.19.28.12: icmp_seq=13 ttl=50 time=35.399 ms
^C
--- 185.19.28.12 ping statistics ---
14 packets transmitted, 2 packets received, 85.7% packet loss
round-trip min/avg/max/stddev = 32.644/34.022/35.399/1.377 ms
duffy at thunder in ~/bin/gcutilexo
$ ./gcutil --authorization_uri_base=https://localhost:5000/oauth2 --auth_host_name=127.0.0.1 --auth_host_port=9999 --auth_local_webserver=true --api_host="https://localhost:5000/" --ssh_user=root --fetch_discovery=true --project=ian@ianduffy.ie ssh example71
WARNING: Consider passing '--zone=CH-GV2' to avoid the unnecessary zone lookup which requires extra API calls.
INFO: Zone for example71 detected as CH-GV2.
WARNING: You appear to be running on a SCRATCH root disk so your data will not persist beyond the life of the instance. Consider using a persistent disk instead.
For more information, see:
https://developers.google.com/compute/docs/disks#persistentdisks
INFO: Running command line: ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no -i /Users/duffy/.ssh/google_compute_engine -A -p 22 root@185.19.28.12 --
Warning: Permanently added '185.19.28.12' (RSA) to the list of known hosts.
[root@example71 ~]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment