Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
geemus (Wesley Beary)

cloud architect




                  field, sun reflected - dsevilla - flickr.com/photos/dsevilla/353...
Why?




   York Minster in the Fog - karlequin - flickr.com/photos/karlequin/440648686
Why?
seize the infrastructure




                York Minster in the Fog - karlequin - flickr.com/photos/karlequin/4406486...
Leave with




             Theft - ibcbulk - flickr.com/photos/ibcbulk/256435870
Leave with
 provisioning
    config




                Theft - ibcbulk - flickr.com/photos/ibcbulk/256435870
Leave with
 provisioning
    config
     DIY




                Theft - ibcbulk - flickr.com/photos/ibcbulk/256435870
The Plan




     Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/4456582998
The Plan
Yet Another Cloud Library?




               Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/...
The Plan
Yet Another Cloud Library?
        Blind Date




                Blueprints for Willborough Home - btobin - flick...
The Plan
Yet Another Cloud Library?
        Blind Date
    Reader Exercises




                Blueprints for Willborough...
The Plan
Yet Another Cloud Library?
        Blind Date
    Reader Exercises
       Next Steps




                Blueprin...
Yet Another
   Cloud
  Library?
the commodity market - baconandeggs - flickr.com/photos/baconandeggs/1490449135
Want




  the commodity market - baconandeggs - flickr.com/photos/baconandeggs/1490449135
Vendor Lockin




        Jail Kitty - 50362297@N07 - flickr.com/photos/50362297@N07/4673066549
Vendor Lockin



    Have




        Jail Kitty - 50362297@N07 - flickr.com/photos/50362297@N07/4673066549
Non-Standard - olivander - flickr.com/photos/olivander/198180580
Hope?




        Non-Standard - olivander - flickr.com/photos/olivander/198180580
Knowledge Silos




            Silos - zoomzoom - flickr.com/photos/zoomzoom/304135268
Knowledge Silos



  Demolish!




              Silos - zoomzoom - flickr.com/photos/zoomzoom/304135268
Progress




           Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
Progress

615+ followers




                 Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
Progress

615+ followers
  54+ forks




                 Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
Progress

615+ followers
  54+ forks
28+ contributors




                 Nice. - ianhampton - flickr.com/photos/ianhampto...
Progress

 615+ followers
   54+ forks
 28+ contributors
25,000+ downloads



                  Nice. - ianhampton - flickr...
Blind Date
Golfland start - twid - flickr.com/photos/twid/410697715
overabundance of choice
   lack of experience




                     Golfland start - twid - flickr.com/photos/twid/410697...
overabundance of choice
   lack of experience




exploratory programming



                     Golfland start - twid - fl...
Installation
Installation
geymus ~ ⌘ sudo gem install fog
Installation
geymus ~ ⌘ sudo gem install fog
Successfully installed fog-X.Y.Z
Installation
geymus ~ ⌘ sudo gem install fog
Successfully installed fog-X.Y.Z
geymus ~ ⌘ fog
Installation
geymus ~ ⌘ sudo gem install fog
Successfully installed fog-X.Y.Z
geymus ~ ⌘ fog
 To run as 'default', add the...
bin/fog
bin/fog
geymus ~ ⌘ fog
bin/fog
geymus ~ ⌘ fog
 Welcome to fog interactive!
 :default credentials provide AWS
bin/fog
geymus ~ ⌘ fog
 Welcome to fog interactive!
 :default credentials provide AWS
>> command_goes_here
bin/fog
geymus ~ ⌘ fog
 Welcome to fog interactive!
 :default credentials provide AWS
>> command_goes_here
return_value_go...
Providers
Providers
>> providers
Providers
>> providers
[AWS]
Providers
>> providers
[AWS]

                      Support for:
 AWS, Bluebox, Rackspace, Slicehost, Terremark vCloud
   ...
Services
Services
>> AWS.services
Services
>> AWS.services
[:compute, :elb, :simpledb, :storage]
Services
>> AWS.services
[:compute, :elb, :simpledb, :storage]

            compute and storage are shared
               ...
Collections
Collections
>> AWS[:compute].collections
Collections
>> AWS[:compute].collections
[:addresses, ..., :volumes]
Collections
>> AWS[:compute].collections
[:addresses, ..., :volumes]

  flavors, images and servers are shared in compute
 ...
Collections




         Star Wars Collection - ception - flickr.com/photos/ception/356449209
Collections
interface to cloud resources




                    Star Wars Collection - ception - flickr.com/photos/ception...
Collections
    interface to cloud resources
#all - returns all matching resources
#new - initializes a local model
#creat...
Collection #all
Collection #all
returns all matching resources
Collection #all
           returns all matching resources
>> AWS[:compute].addresses.all
Collection #all
           returns all matching resources
>> AWS[:compute].addresses.all
<Fog::AWS::Compute::Addresses ......
Collection #all
           returns all matching resources
>> AWS[:compute].addresses.all
<Fog::AWS::Compute::Addresses ......
Collection #all
           returns all matching resources
>> AWS[:compute].addresses.all
<Fog::AWS::Compute::Addresses ......
Collection #new
Collection #new
 initializes a local model
Collection #new
              initializes a local model
>> AWS[:compute].addresses.new
Collection #new
                initializes a local model
>> AWS[:compute].addresses.new
<Fog::AWS::Compute::Address publi...
Collection #create
Collection #create
  provisions a new resource
Collection #create
              provisions a new resource
>> AWS[:compute].addresses.create
Collection #create
               provisions a new resource
>> AWS[:compute].addresses.create
<Fog::AWS::Compute::Address ...
Collection #create
               provisions a new resource
>> AWS[:compute].addresses.create
<Fog::AWS::Compute::Address ...
Collection #create
               provisions a new resource
>> AWS[:compute].addresses.create
<Fog::AWS::Compute::Address ...
Collection #get
Collection #get
returns a particular resource
Collection #get
             returns a particular resource
>> AWS[:compute].addresses.get(‘x.y.z’)
Collection #get
             returns a particular resource
>> AWS[:compute].addresses.get(‘x.y.z’)
<Fog::AWS::Compute::Add...
Collection #reload
Collection #reload
 update to latest remote state
Collection #reload
             update to latest remote state
>> AWS[:compute].addresses.all.reload
Collection #reload
             update to latest remote state
>> AWS[:compute].addresses.all.reload
<Fog::AWS::Compute::Ad...
Models




    Flying Into Boston 005 - Tilt Shift - tostie14 - flickr.com/photos/tostie14/117610830
Models
representation of a cloud resource




                   Flying Into Boston 005 - Tilt Shift - tostie14 - flickr.co...
Models
  representation of a cloud resource
  #save - provision or update resource
 #reload - update to latest remote stat...
Model #save
Model #save
provision or update resource
Model #save
            provision or update resource
>> AWS[:compute].addresses.new.save
Model #save
             provision or update resource
>> AWS[:compute].addresses.new.save
<Fog::AWS::Compute::Address publ...
Model #save
             provision or update resource
>> AWS[:compute].addresses.new.save
<Fog::AWS::Compute::Address publ...
Model #save
             provision or update resource
>> AWS[:compute].addresses.new.save
<Fog::AWS::Compute::Address publ...
Model #reload
Model #reload
update to latest remote state
Model #reload
            update to latest remote state
>> address = AWS[:compute].addresses.new.save
Model #reload
             update to latest remote state
>> address = AWS[:compute].addresses.new.save
<Fog::AWS::Compute:...
Model #reload
             update to latest remote state
>> address = AWS[:compute].addresses.new.save
<Fog::AWS::Compute:...
Model #reload
             update to latest remote state
>> address = AWS[:compute].addresses.new.save
<Fog::AWS::Compute:...
Model #wait_for
Model #wait_for
poll a block until timeout or true
Model #wait_for
           poll a block until timeout or true
>> AWS[:compute].servers.create(:image_id => ‘ami’)
Model #wait_for
           poll a block until timeout or true
>> AWS[:compute].servers.create(:image_id => ‘ami’)
<Fog::AW...
Model #wait_for
           poll a block until timeout or true
>> AWS[:compute].servers.create(:image_id => ‘ami’)
<Fog::AW...
Model #wait_for
           poll a block until timeout or true
>> AWS[:compute].servers.create(:image_id => ‘ami’)
<Fog::AW...
Model #destroy
Model #destroy
   destroy resource
Model #destroy
                   destroy resource
>> AWS[:compute].servers.create(:image_id => ‘i-x’)
Model #destroy
                   destroy resource
>> AWS[:compute].servers.create(:image_id => ‘i-x’)
<Fog::AWS::Compute:...
Model #destroy
                   destroy resource
>> AWS[:compute].servers.create(:image_id => ‘i-x’)
<Fog::AWS::Compute:...
Model #destroy
                   destroy resource
>> AWS[:compute].servers.create(:image_id => ‘i-x’)
<Fog::AWS::Compute:...
Requests




           API Docs - thesmith - flickr.com/photos/thesmith/4574969567
Requests
down and dirty with specifics




                     API Docs - thesmith - flickr.com/photos/thesmith/4574969567
Requests
down and dirty with specifics
 provides flexibility and power
 but requires vendor specifics




                   ...
Requests
Requests
>> AWS[:compute].requests
Requests
>> AWS[:compute].requests
[:allocate_address, ..., :stop_instances]
Requests
>> AWS[:compute].requests
[:allocate_address, ..., :stop_instances]

          requests are unique across provide...
e.g. #allocate_address
e.g. #allocate_address
>> AWS[:compute].allocate_address
e.g. #allocate_address
>> AWS[:compute].allocate_address
#<Excon::Response
@headers={...},
@body={"requestId"=>"a-b-c", "p...
Reader
Exercises
Got Infrastructure




           New IBM Z10 Mainframe - pchow98 - flickr.com/photos/pchow98/2545281504
Got Infrastructure
      now what?




             New IBM Z10 Mainframe - pchow98 - flickr.com/photos/pchow98/2545281504
servers#bootstrap
servers#bootstrap
>> AWS[:compute].servers.bootstrap(
  :image_id => ‘ami’,
  :private_key_path => ‘~/.ssh/id_rsa’,
  :pub...
servers#bootstrap
>> AWS[:compute].servers.bootstrap(
  :image_id => ‘ami’,
  :private_key_path => ‘~/.ssh/id_rsa’,
  :pub...
servers#bootstrap
>> AWS[:compute].servers.bootstrap(
  :image_id => ‘ami’,
  :private_key_path => ‘~/.ssh/id_rsa’,
  :pub...
servers#bootstrap
>> AWS[:compute].servers.bootstrap(
  :image_id => ‘ami’,
  :private_key_path => ‘~/.ssh/id_rsa’,
  :pub...
servers#bootstrap
>> AWS[:compute].servers.bootstrap(
  :image_id => ‘ami’,
  :private_key_path => ‘~/.ssh/id_rsa’,
  :pub...
servers#bootstrap
>> AWS[:compute].servers.bootstrap(
  :image_id => ‘ami’,
  :private_key_path => ‘~/.ssh/id_rsa’,
  :pub...
Configuration
Configuration
for more complex/repeatable setup
Configuration
      for more complex/repeatable setup
  chef - http://opscode.com/chef
puppet - http://puppetlabs.com/puppe...
Switching Providers?




            Light Switch Complicator - lenore-m - flickr.com/photos/lenore-m/510420532
servers#create
servers#create
>> Bluebox[:compute].servers.create
servers#create
>> Bluebox[:compute].servers.create
ArgumentError: image_id is required ...
servers#create
>> Bluebox[:compute].servers.create
ArgumentError: image_id is required ...
>> Rackspace[:compute].servers....
servers#create
>> Bluebox[:compute].servers.create
ArgumentError: image_id is required ...
>> Rackspace[:compute].servers....
servers#create
>> Bluebox[:compute].servers.create
ArgumentError: image_id is required ...
>> Rackspace[:compute].servers....
servers#create
>> Bluebox[:compute].servers.create
ArgumentError: image_id is required ...
>> Rackspace[:compute].servers....
servers#create
>> Bluebox[:compute].servers.create
ArgumentError: image_id is required ...
>> Rackspace[:compute].servers....
Simulation




      John Manning John’s Flight Simulator - yugen - flickr.com/photos/yugen/3119723360
Simulation
   make believing
    your way to
better infrastructure




             John Manning John’s Flight Simulator -...
Simulation
    make believing
     your way to
 better infrastructure
     Fog.mock!
         or
⌘ FOG_MOCK=true fog




 ...
Next Steps
Getting Help
Getting Help
additional resources (see also: README)
Getting Help
    additional resources (see also: README)
      bugs - http://github.com/geemus/fog/issues
         irc - i...
The Future




        Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
The Future
  modularity




               Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
The Future
  modularity
  providers




               Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
The Future
  modularity
  providers
 abstractions




                Rettrofuturism - grumbler - flickr.com/photos/grumble...
The Future
  modularity
  providers
 abstractions
   testing




                Rettrofuturism - grumbler - flickr.com/pho...
Get Involved
Get Involved
additional resources (see also: README)
Get Involved
      additional resources (see also: README)
   guide - github.com/geemus/fog/wiki/contributor-guide
provide...
Questions?




        Clouds oven IL-RT50 - richardcox - flickr.com/photos/richardcox/3892767597
Upcoming SlideShare
Loading in …5
×

Fog

7,673 views

Published on

Fog is the Ruby cloud computing library and this is a presentation on how to use it and what you can do with it.

Published in: Technology, Education
  • DOWNLOAD THE BOOK INTO AVAILABLE FORMAT (New Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THE can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THE is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBOOK .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookBOOK, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, EBOOK, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THE Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THE the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THE Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❤❤❤ http://bit.ly/2Qu6Caa ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area is here: ♥♥♥ http://bit.ly/2Qu6Caa ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Fog

  1. 1. geemus (Wesley Beary) cloud architect field, sun reflected - dsevilla - flickr.com/photos/dsevilla/3531297705
  2. 2. Why? York Minster in the Fog - karlequin - flickr.com/photos/karlequin/440648686
  3. 3. Why? seize the infrastructure York Minster in the Fog - karlequin - flickr.com/photos/karlequin/440648686
  4. 4. Leave with Theft - ibcbulk - flickr.com/photos/ibcbulk/256435870
  5. 5. Leave with provisioning config Theft - ibcbulk - flickr.com/photos/ibcbulk/256435870
  6. 6. Leave with provisioning config DIY Theft - ibcbulk - flickr.com/photos/ibcbulk/256435870
  7. 7. The Plan Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/4456582998
  8. 8. The Plan Yet Another Cloud Library? Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/4456582998
  9. 9. The Plan Yet Another Cloud Library? Blind Date Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/4456582998
  10. 10. The Plan Yet Another Cloud Library? Blind Date Reader Exercises Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/4456582998
  11. 11. The Plan Yet Another Cloud Library? Blind Date Reader Exercises Next Steps Blueprints for Willborough Home - btobin - flickr.com/photos/btobin/4456582998
  12. 12. Yet Another Cloud Library?
  13. 13. the commodity market - baconandeggs - flickr.com/photos/baconandeggs/1490449135
  14. 14. Want the commodity market - baconandeggs - flickr.com/photos/baconandeggs/1490449135
  15. 15. Vendor Lockin Jail Kitty - 50362297@N07 - flickr.com/photos/50362297@N07/4673066549
  16. 16. Vendor Lockin Have Jail Kitty - 50362297@N07 - flickr.com/photos/50362297@N07/4673066549
  17. 17. Non-Standard - olivander - flickr.com/photos/olivander/198180580
  18. 18. Hope? Non-Standard - olivander - flickr.com/photos/olivander/198180580
  19. 19. Knowledge Silos Silos - zoomzoom - flickr.com/photos/zoomzoom/304135268
  20. 20. Knowledge Silos Demolish! Silos - zoomzoom - flickr.com/photos/zoomzoom/304135268
  21. 21. Progress Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
  22. 22. Progress 615+ followers Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
  23. 23. Progress 615+ followers 54+ forks Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
  24. 24. Progress 615+ followers 54+ forks 28+ contributors Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
  25. 25. Progress 615+ followers 54+ forks 28+ contributors 25,000+ downloads Nice. - ianhampton - flickr.com/photos/ianhampton/1197107567
  26. 26. Blind Date
  27. 27. Golfland start - twid - flickr.com/photos/twid/410697715
  28. 28. overabundance of choice lack of experience Golfland start - twid - flickr.com/photos/twid/410697715
  29. 29. overabundance of choice lack of experience exploratory programming Golfland start - twid - flickr.com/photos/twid/410697715
  30. 30. Installation
  31. 31. Installation geymus ~ ⌘ sudo gem install fog
  32. 32. Installation geymus ~ ⌘ sudo gem install fog Successfully installed fog-X.Y.Z
  33. 33. Installation geymus ~ ⌘ sudo gem install fog Successfully installed fog-X.Y.Z geymus ~ ⌘ fog
  34. 34. Installation geymus ~ ⌘ sudo gem install fog Successfully installed fog-X.Y.Z geymus ~ ⌘ fog To run as 'default', add the following to ~/.fog :default: :aws_access_key_id: INTENTIONALLY_LEFT_BLANK :aws_secret_access_key: INTENTIONALLY_LEFT_BLANK [...]
  35. 35. bin/fog
  36. 36. bin/fog geymus ~ ⌘ fog
  37. 37. bin/fog geymus ~ ⌘ fog Welcome to fog interactive! :default credentials provide AWS
  38. 38. bin/fog geymus ~ ⌘ fog Welcome to fog interactive! :default credentials provide AWS >> command_goes_here
  39. 39. bin/fog geymus ~ ⌘ fog Welcome to fog interactive! :default credentials provide AWS >> command_goes_here return_value_goes_here
  40. 40. Providers
  41. 41. Providers >> providers
  42. 42. Providers >> providers [AWS]
  43. 43. Providers >> providers [AWS] Support for: AWS, Bluebox, Rackspace, Slicehost, Terremark vCloud Initial support for: GoGrid, Linode, Local, NewServers
  44. 44. Services
  45. 45. Services >> AWS.services
  46. 46. Services >> AWS.services [:compute, :elb, :simpledb, :storage]
  47. 47. Services >> AWS.services [:compute, :elb, :simpledb, :storage] compute and storage are shared other services are unique
  48. 48. Collections
  49. 49. Collections >> AWS[:compute].collections
  50. 50. Collections >> AWS[:compute].collections [:addresses, ..., :volumes]
  51. 51. Collections >> AWS[:compute].collections [:addresses, ..., :volumes] flavors, images and servers are shared in compute directories and files are shared in storage other collections are unique
  52. 52. Collections Star Wars Collection - ception - flickr.com/photos/ception/356449209
  53. 53. Collections interface to cloud resources Star Wars Collection - ception - flickr.com/photos/ception/356449209
  54. 54. Collections interface to cloud resources #all - returns all matching resources #new - initializes a local model #create - provisions a new resource #get - returns a particular resource #reload - update to latest remote state Star Wars Collection - ception - flickr.com/photos/ception/356449209
  55. 55. Collection #all
  56. 56. Collection #all returns all matching resources
  57. 57. Collection #all returns all matching resources >> AWS[:compute].addresses.all
  58. 58. Collection #all returns all matching resources >> AWS[:compute].addresses.all <Fog::AWS::Compute::Addresses ... []>
  59. 59. Collection #all returns all matching resources >> AWS[:compute].addresses.all <Fog::AWS::Compute::Addresses ... []> >> AWS[:compute].addresses
  60. 60. Collection #all returns all matching resources >> AWS[:compute].addresses.all <Fog::AWS::Compute::Addresses ... []> >> AWS[:compute].addresses <Fog::AWS::Compute::Addresses ... []>
  61. 61. Collection #new
  62. 62. Collection #new initializes a local model
  63. 63. Collection #new initializes a local model >> AWS[:compute].addresses.new
  64. 64. Collection #new initializes a local model >> AWS[:compute].addresses.new <Fog::AWS::Compute::Address public_ip=nil ... >
  65. 65. Collection #create
  66. 66. Collection #create provisions a new resource
  67. 67. Collection #create provisions a new resource >> AWS[:compute].addresses.create
  68. 68. Collection #create provisions a new resource >> AWS[:compute].addresses.create <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... >
  69. 69. Collection #create provisions a new resource >> AWS[:compute].addresses.create <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... > >> AWS[:compute].servers.create
  70. 70. Collection #create provisions a new resource >> AWS[:compute].addresses.create <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... > >> AWS[:compute].servers.create ArgumentError: image_id is required ...
  71. 71. Collection #get
  72. 72. Collection #get returns a particular resource
  73. 73. Collection #get returns a particular resource >> AWS[:compute].addresses.get(‘x.y.z’)
  74. 74. Collection #get returns a particular resource >> AWS[:compute].addresses.get(‘x.y.z’) <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... >
  75. 75. Collection #reload
  76. 76. Collection #reload update to latest remote state
  77. 77. Collection #reload update to latest remote state >> AWS[:compute].addresses.all.reload
  78. 78. Collection #reload update to latest remote state >> AWS[:compute].addresses.all.reload <Fog::AWS::Compute::Addresses ... []>
  79. 79. Models Flying Into Boston 005 - Tilt Shift - tostie14 - flickr.com/photos/tostie14/117610830
  80. 80. Models representation of a cloud resource Flying Into Boston 005 - Tilt Shift - tostie14 - flickr.com/photos/tostie14/117610830
  81. 81. Models representation of a cloud resource #save - provision or update resource #reload - update to latest remote state #wait_for - poll block until timeout or true #destroy - destroy resource Flying Into Boston 005 - Tilt Shift - tostie14 - flickr.com/photos/tostie14/117610830
  82. 82. Model #save
  83. 83. Model #save provision or update resource
  84. 84. Model #save provision or update resource >> AWS[:compute].addresses.new.save
  85. 85. Model #save provision or update resource >> AWS[:compute].addresses.new.save <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... >
  86. 86. Model #save provision or update resource >> AWS[:compute].addresses.new.save <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... > >> AWS[:compute].servers.new.save
  87. 87. Model #save provision or update resource >> AWS[:compute].addresses.new.save <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... > >> AWS[:compute].servers.new.save ArgumentError: image_id is required ...
  88. 88. Model #reload
  89. 89. Model #reload update to latest remote state
  90. 90. Model #reload update to latest remote state >> address = AWS[:compute].addresses.new.save
  91. 91. Model #reload update to latest remote state >> address = AWS[:compute].addresses.new.save <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... >
  92. 92. Model #reload update to latest remote state >> address = AWS[:compute].addresses.new.save <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... > >> address.reload
  93. 93. Model #reload update to latest remote state >> address = AWS[:compute].addresses.new.save <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... > >> address.reload <Fog::AWS::Compute::Address public_ip=‘x.y.z’ ... >
  94. 94. Model #wait_for
  95. 95. Model #wait_for poll a block until timeout or true
  96. 96. Model #wait_for poll a block until timeout or true >> AWS[:compute].servers.create(:image_id => ‘ami’)
  97. 97. Model #wait_for poll a block until timeout or true >> AWS[:compute].servers.create(:image_id => ‘ami’) <Fog::AWS::Compute::Server ... []>
  98. 98. Model #wait_for poll a block until timeout or true >> AWS[:compute].servers.create(:image_id => ‘ami’) <Fog::AWS::Compute::Server ... []> >> _.wait_for { ready? }
  99. 99. Model #wait_for poll a block until timeout or true >> AWS[:compute].servers.create(:image_id => ‘ami’) <Fog::AWS::Compute::Server ... []> >> _.wait_for { ready? } {:duration=>20}
  100. 100. Model #destroy
  101. 101. Model #destroy destroy resource
  102. 102. Model #destroy destroy resource >> AWS[:compute].servers.create(:image_id => ‘i-x’)
  103. 103. Model #destroy destroy resource >> AWS[:compute].servers.create(:image_id => ‘i-x’) <Fog::AWS::Compute::Server ... []>
  104. 104. Model #destroy destroy resource >> AWS[:compute].servers.create(:image_id => ‘i-x’) <Fog::AWS::Compute::Server ... []> >> _.destroy
  105. 105. Model #destroy destroy resource >> AWS[:compute].servers.create(:image_id => ‘i-x’) <Fog::AWS::Compute::Server ... []> >> _.destroy true
  106. 106. Requests API Docs - thesmith - flickr.com/photos/thesmith/4574969567
  107. 107. Requests down and dirty with specifics API Docs - thesmith - flickr.com/photos/thesmith/4574969567
  108. 108. Requests down and dirty with specifics provides flexibility and power but requires vendor specifics API Docs - thesmith - flickr.com/photos/thesmith/4574969567
  109. 109. Requests
  110. 110. Requests >> AWS[:compute].requests
  111. 111. Requests >> AWS[:compute].requests [:allocate_address, ..., :stop_instances]
  112. 112. Requests >> AWS[:compute].requests [:allocate_address, ..., :stop_instances] requests are unique across providers
  113. 113. e.g. #allocate_address
  114. 114. e.g. #allocate_address >> AWS[:compute].allocate_address
  115. 115. e.g. #allocate_address >> AWS[:compute].allocate_address #<Excon::Response @headers={...}, @body={"requestId"=>"a-b-c", "publicIp"=>"x.y.z"}, @status=200 >
  116. 116. Reader Exercises
  117. 117. Got Infrastructure New IBM Z10 Mainframe - pchow98 - flickr.com/photos/pchow98/2545281504
  118. 118. Got Infrastructure now what? New IBM Z10 Mainframe - pchow98 - flickr.com/photos/pchow98/2545281504
  119. 119. servers#bootstrap
  120. 120. servers#bootstrap >> AWS[:compute].servers.bootstrap( :image_id => ‘ami’, :private_key_path => ‘~/.ssh/id_rsa’, :public_key_path => ‘~/.ssh/id_rsa.pub’ )
  121. 121. servers#bootstrap >> AWS[:compute].servers.bootstrap( :image_id => ‘ami’, :private_key_path => ‘~/.ssh/id_rsa’, :public_key_path => ‘~/.ssh/id_rsa.pub’ ) <Fog::AWS::Compute::Server ... []>
  122. 122. servers#bootstrap >> AWS[:compute].servers.bootstrap( :image_id => ‘ami’, :private_key_path => ‘~/.ssh/id_rsa’, :public_key_path => ‘~/.ssh/id_rsa.pub’ ) <Fog::AWS::Compute::Server ... []> >> _.ssh(‘pwd’)
  123. 123. servers#bootstrap >> AWS[:compute].servers.bootstrap( :image_id => ‘ami’, :private_key_path => ‘~/.ssh/id_rsa’, :public_key_path => ‘~/.ssh/id_rsa.pub’ ) <Fog::AWS::Compute::Server ... []> >> _.ssh(‘pwd’) [#<Fog::SSH::Result @stdout=”/Users/root” ...>]
  124. 124. servers#bootstrap >> AWS[:compute].servers.bootstrap( :image_id => ‘ami’, :private_key_path => ‘~/.ssh/id_rsa’, :public_key_path => ‘~/.ssh/id_rsa.pub’ ) <Fog::AWS::Compute::Server ... []> >> _.ssh(‘pwd’) [#<Fog::SSH::Result @stdout=”/Users/root” ...>] >> _.ssh(‘foo’, ‘bar’)
  125. 125. servers#bootstrap >> AWS[:compute].servers.bootstrap( :image_id => ‘ami’, :private_key_path => ‘~/.ssh/id_rsa’, :public_key_path => ‘~/.ssh/id_rsa.pub’ ) <Fog::AWS::Compute::Server ... []> >> _.ssh(‘pwd’) [#<Fog::SSH::Result @stdout=”/Users/root” ...>] >> _.ssh(‘foo’, ‘bar’) [#<Fog::SSH::Result ...>, #<Fog::SSH::Result ...>]
  126. 126. Configuration
  127. 127. Configuration for more complex/repeatable setup
  128. 128. Configuration for more complex/repeatable setup chef - http://opscode.com/chef puppet - http://puppetlabs.com/puppet/introduction
  129. 129. Switching Providers? Light Switch Complicator - lenore-m - flickr.com/photos/lenore-m/510420532
  130. 130. servers#create
  131. 131. servers#create >> Bluebox[:compute].servers.create
  132. 132. servers#create >> Bluebox[:compute].servers.create ArgumentError: image_id is required ...
  133. 133. servers#create >> Bluebox[:compute].servers.create ArgumentError: image_id is required ... >> Rackspace[:compute].servers.create
  134. 134. servers#create >> Bluebox[:compute].servers.create ArgumentError: image_id is required ... >> Rackspace[:compute].servers.create ArgumentError: image_id and name are required ...
  135. 135. servers#create >> Bluebox[:compute].servers.create ArgumentError: image_id is required ... >> Rackspace[:compute].servers.create ArgumentError: image_id and name are required ... >> Slicehost[:compute].servers.create
  136. 136. servers#create >> Bluebox[:compute].servers.create ArgumentError: image_id is required ... >> Rackspace[:compute].servers.create ArgumentError: image_id and name are required ... >> Slicehost[:compute].servers.create ArgumentError: image_id and name are required ...
  137. 137. servers#create >> Bluebox[:compute].servers.create ArgumentError: image_id is required ... >> Rackspace[:compute].servers.create ArgumentError: image_id and name are required ... >> Slicehost[:compute].servers.create ArgumentError: image_id and name are required ... different parameters, same methods
  138. 138. Simulation John Manning John’s Flight Simulator - yugen - flickr.com/photos/yugen/3119723360
  139. 139. Simulation make believing your way to better infrastructure John Manning John’s Flight Simulator - yugen - flickr.com/photos/yugen/3119723360
  140. 140. Simulation make believing your way to better infrastructure Fog.mock! or ⌘ FOG_MOCK=true fog John Manning John’s Flight Simulator - yugen - flickr.com/photos/yugen/3119723360
  141. 141. Next Steps
  142. 142. Getting Help
  143. 143. Getting Help additional resources (see also: README)
  144. 144. Getting Help additional resources (see also: README) bugs - http://github.com/geemus/fog/issues irc - irc://irc.freenode.net/ruby-fog mailing list - http://groups.google.com/group/ruby-fog
  145. 145. The Future Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
  146. 146. The Future modularity Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
  147. 147. The Future modularity providers Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
  148. 148. The Future modularity providers abstractions Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
  149. 149. The Future modularity providers abstractions testing Rettrofuturism - grumbler - flickr.com/photos/grumbler/297064185
  150. 150. Get Involved
  151. 151. Get Involved additional resources (see also: README)
  152. 152. Get Involved additional resources (see also: README) guide - github.com/geemus/fog/wiki/contributor-guide providers - github.com/geemus/fog/wiki/providers users - github.com/geemus/fog/wiki/in-the-wild
  153. 153. Questions? Clouds oven IL-RT50 - richardcox - flickr.com/photos/richardcox/3892767597

×