Wesley Beary: Cloud computing scared the crap out of me - the quirks and nightmares
of provisioning computing and storage on AWS, Terremark, Rackspace,
etc - until I took the bull by the horns. Let me now show you how I
tamed that bull.
Learn how to easily get started cloud computing with fog. It gives you
the reins within any Ruby application or script. If you can control
your infrastructure choices, you can make better choices in
development and get what you need in production.
You'll get an overview of fog and concrete examples to give you a head
start on your own provisioning workflow.
7. What?
on demand - pay for only what you actually use
flexible - add and remove resources in minutes (instead of weeks)
8. What?
on demand - pay for only what you actually use
flexible - add and remove resources in minutes (instead of weeks)
repeatable - code, test, repeat
9. What?
on demand - pay for only 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. But, but...
option overload - which provider should I use
intimidating - each service requires separate expertise
13. But, but...
option overload - which provider should I use
intimidating - each service requires separate expertise
tools - vastly different API’s built on varying levels of quality
33. 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
34. 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
35. 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
38. bootstrap?
convenience method for servers
create - creates a server matching attributes
wait_for { ready? } - waits until server responds
ssh - sets up ssh keys and disables password authentication
53. 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
...
56. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
57. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
58. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
59. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
60. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
61. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Rackspace[:compute]
62. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Rackspace[:compute]
#<Fog::Rackspace::Compute ...>
63. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Rackspace[:compute]
#<Fog::Rackspace::Compute ...>
>> Rackspace[:compute].requests
64. sign posts
geymus ~ ⌘ fog
Welcome to fog interactive!
:default credentials provide AWS and Rackspace
>> providers
[AWS, Rackspace]
>> Rackspace.collections
[:directories, :files, :flavors, :images, :servers]
>> Rackspace[:compute]
#<Fog::Rackspace::Compute ...>
>> Rackspace[:compute].requests
[:confirm_resized_server, ..., :update_server]
119. Roadmap
compute - consolidating and refining the shared api
completion - fill in remaining requests and mocks for core services
120. Roadmap
compute - consolidating and refining the shared api
completion - fill in remaining requests and mocks for core services
errors - more consistent error raising and handling
121. Roadmap
compute - consolidating and refining the shared api
completion - fill in remaining requests and mocks for core services
errors - more consistent error raising and handling
documentation - blog posts, examples, fog.io