Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Google Computing and Open Source Technologies

Google Computing and Open Source Technologies

from Google Cloud Platform Live 2014
YouTube Video: https://www.youtube.com/watch?v=xFf1sBc8WLY

Kazunori Sato

April 24, 2014
Tweet

More Decks by Kazunori Sato

Other Decks in Technology

Transcript

  1. Linux Foundation's 2013 "Who writes Linux" report puts Google in

    the Top 10 corporate contributors. http://arstechnica.com/information-technology/2013/09/google-and-samsung-soar-into-list-of-top-10-linux-contributors/ Giving back, open development "Google's been doing work all over the kernel (networking, security, scheduler, cgroups), all good stuff." – Greg Kroah-Hartman
  2. Compute Engine with Python libcloud 1 from libcloud.compute.types import Provider

    2 from libcloud.compute.providers import get_driver 3 4 connection = get_driver(Provider.GCE)(EMAIL, KEY, project=PROJECT_ID) 5 6 node = connection.create_node( 7 name="libcloud", # Instance name 8 size="n1-standard-1", # Machine type, 1 CPU 9 image="debian-7-wheezy-v20131120", # Debian 7 (Wheezy) image 10 location="us-central1-b" # Central United States 11 ) 12 13 print(node.name)
  3. Compute Engine with Ruby fog 1 require 'fog' 2 3

    connection = Fog::Compute.new({:provider => 'google', 4 :google_project => PROJECT_ID, :google_client_email => EMAIL, 5 :google_key_location => KEY}) 6 7 server = connection.servers.create({ 8 :name => "fog", # Instance Name 9 :image_name => "debian-7-wheezy", # Debian 7 (Wheezy) image 10 :machine_type => "n1-standard-1", # Machine type, 1 CPU 11 :zone_name => "us-central1-a", # Central United States 12 }) 13 14 puts server.name
  4. Compute Engine with Java jclouds 1 public static void main(String[]

    args) throws RunNodesException { 2 String provider = "google-compute-engine"; 3 String email = "[email protected]"; 4 String pem_key = getPrivateKeyFromFile("/path/to/pkey.pem"); 5 6 ComputeService compute = initComputeService(provider, email, pem_key); 7 8 // Uses a 'default template' for node attributes 9 NodeMetadata node = getOnlyElement(compute.createNodesInGroup("demo", 1)); 10 11 System.out.printf("%s%n", node.getName()); 12 }
  5. Virtual machines are great! But how will you configure and

    manage them? Putting your VMs to work...
  6. Compute Engine is a great fit for up and coming

    technologies such as Docker, CoreOS, and more... ...and other Open Source tools
  7. 1 from libcloud.compute.types import Provider 2 from libcloud.compute.providers import get_driver

    3 from time import time 4 5 conn = get_driver(Provider.GCE)(email, key, datacenter='us-central1-b', 6 project=my_project) 7 8 print('Creating 100 nodes...') 9 start = time() 10 nodes = conn.ex_create_multiple_nodes("lc", # .... Instance name prefix 11 "n1-standard-1", # ............................ Machine type 12 "debian-7-wheezy-v20131120", # ................ Debian 7 (Wheezy) 13 100) # ........................................ Quantity to create 14 minutes, seconds = divmod(time() - start, 60) 15 print("Created %d nodes in %dm%.2fs." % (len(nodes), minutes, seconds)) A few noteworthy examples... libcloud A Quick Demo...
  8. Images by Connie Zhou cloud.google.com What's Next? • Always more

    Google Cloud Platform Features coming... • We would love to collaborate with you! • http://googlecloudplatform.github.io/ • http://github.com/erjohnso