The document discusses how to use the Fog library to interact with cloud services. Fog allows interacting with multiple cloud providers like AWS, Rackspace, etc in a portable way. It provides models, collections, and methods to manage resources like servers, storage, DNS etc. in an abstracted way across providers. The document demonstrates how to boot a server, install SSH keys, run commands via SSH, and ping a target using the Fog and Ruby APIs in just a few lines of code.
7. What?
on demand - only pay for what you actually use
flexible - add and remove resources in minutes (instead of weeks)
8. What?
on demand - only pay for what you actually use
flexible - add and remove resources in minutes (instead of weeks)
repeatable - code, test, repeat
9. What?
on demand - only pay for what you actually use
flexible - add and remove resources in minutes (instead of weeks)
repeatable - code, test, repeat
resilient - build better systems with transient resources
12. Why Worry?
option overload - which provider/service should I use
expertise - each service has yet another knowledge silo
13. Why Worry?
option overload - which provider/service should I use
expertise - each service has yet another knowledge silo
tools - vastly different API, quality, maintenance, etc
14. Why Worry?
option overload - which provider/service should I use
expertise - each service has yet another knowledge silo
tools - vastly different API, quality, maintenance, etc
standards - slow progress and differing interpretations
37. Worry!
arguments - what goes where, what does it mean?
portability - most of this will only work on Rackspace
38. Worry!
arguments - what goes where, what does it mean?
portability - most of this will only work on Rackspace
disservice - back to square one, but with tools in hand
39. Bootstrap
7 # boot server and setup ssh keys
8 server = compute.servers.bootstrap(server_attributes)
44. Servers?
1 compute.servers # list servers, same as #all
2
3 compute.servers.get(1234567890) # server by id
4
5 compute.servers.reload # update to latest
45. Servers?
1 compute.servers # list servers, same as #all
2
3 compute.servers.get(1234567890) # server by id
4
5 compute.servers.reload # update to latest
6
7 compute.servers.new(attributes) # local model
46. Servers?
1 compute.servers # list servers, same as #all
2
3 compute.servers.get(1234567890) # server by id
4
5 compute.servers.reload # update to latest
6
7 compute.servers.new(attributes) # local model
8
9 compute.servers.create(attributes) # remote model
64. exploring
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
:public_key_path: INTENTIONALLY_LEFT_BLANK
:private_key_path: INTENTIONALLY_LEFT_BLANK
:rackspace_api_key: INTENTIONALLY_LEFT_BLANK
:rackspace_username: INTENTIONALLY_LEFT_BLANK
...
67. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
68. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
69. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
70. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
71. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
72. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Compute[:rackspace]
73. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Compute[:rackspace]
#<Fog::Compute::Rackspace ...>
74. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Compute[:rackspace]
#<Fog::Compute::Rackspace ...>
>> Compute[:rackspace].requests
75. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Compute[:rackspace]
#<Fog::Compute::Rackspace ...>
>> Compute[:rackspace].requests
[:confirm_resized_server, ..., :update_server]
128. “Compatibility”
AWS EC2 - moving target, not a standard, kill it please
Rackspace Servers - better, sort of
129. “Compatibility”
AWS EC2 - moving target, not a standard, kill it please
Rackspace Servers - better, sort of
diff? - slightly different is harder than vastly different
132. Coherence
Code Talks - defining API is great, but code beats specs
Style Guide - specs miss stuff, so focus on general rules
133. Coherence
Code Talks - defining API is great, but code beats specs
Style Guide - specs miss stuff, so focus on general rules
diff? - slightly different is harder than vastly different
136. Documentation
Timely - I need more and better docs, yesterday
Maintained - I need to docs to reflect current reality
137. Documentation
Timely - I need more and better docs, yesterday
Maintained - I need to docs to reflect current reality
Versioned - I need docs that reflect particular past realities