Mr Cheng bio photo

Mr Cheng

  • created DigitalOcean node through terraform
  • registered sshkey in github
  • verified python-based Google query reproduced on the VM
  • installed git manually

todo for next time, via ansible:

  • install git
  • register pubkey automatically with github


I’d rather run these python Google searches off a DigitalOcean node. First let’s time bound this since I’m at work. Timer set to 15 minutes

Stole pre-existing terraform to launch a node:

$ terraform show
id = 90602327
  disk = 30
  image = ubuntu-16-04-x64
  ipv4_address =
  locked = false
  name = node0
  price_hourly = 0.01488
  price_monthly = 10
  region = sfo2
  resize_disk = true
  size = 1gb
  ssh_keys.# = 1
  ssh_keys.0 = 19717796
  status = active
  tags.# = 0
  vcpus = 1


	node_ip_addresses = [


apt install python-pip
pip install google

… and manually put this into /root/

from googlesearch import search

query = "john cheng"

for j in search(query, tld="", num=10, stop=1, pause=2):

6 minutes left. let’s pull the snippet of python from git:

apt-get install git

ok, will need to upload a currently non-existant sshkey, so created it with a ssh-keygen with all defaults:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC2115Q8QajYp//AcFRzQMXP1B31GEpFvl4a2ECOIqeVTq+fVkbQ77FgQSJblY0qqcDWZ9J/Z9uqZKQb9RtAVfpgskkcSSTNkatzTAUGrO/XX8IiBL6RCNvBKsqeZYAoBxYZzgww+ovAEw37sQLxklGZBdLRTBMIIgCyLxs5vL1a6WV/2WyhcDM5fOMSEDrrKTNQwfZrHsQ2EhPm9/XEsr/1Tp/ZyDPPKXT3tvt7CkoUcGE5HdEmLpHc4zWCDdkeUgRr4NfbsrOxSMQCNDX55cd8ogcR5WMwUY25jw/zazTrThWWdTL7HlPCFmt/dXQLRh/EicRLXEbd900KQXc6hTX root@node0

git clone

and just to verify:

# python /root/jchacklog/day1/