1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

initial revision of rackspace documentation

This commit is contained in:
Kyle Rames 2013-01-17 16:17:34 -06:00
parent 263e65f5a5
commit 4bcfef6956
2 changed files with 141 additions and 0 deletions

View file

@ -0,0 +1,65 @@
#Next Gen Cloud Servers™ (compute_v2)
This document will explain how to get started using Next Gen Cloud Servers™ with Fog. User should have read to [Getting Started with Rackspace Open Cloud](/getting_started.md).
## Starting irb console
Start by executing the following command:
irb
Once `irb` has launched you will need to require the Fog library.
If using Ruby 1.8.x execute the following command:
require 'rubygems'
require 'fog'
If using Ruby 1.9.x execute the following command:
require 'fog'
## Create Service
Start by creating connection to the Next Gen Cloud Servers™ by creating an instance of `Fog::Compute`:
service = Fog::Compute.new({
:provider => 'Rackspace',
:rackspace_username => RACKSPACE_USER_NAME,
:rackspace_api_key => RACKSPACE_API,
:version => :v2
})
Values in uppercase should be replaced with the proper Rackspace Open Cloud credentials. To learn more about obtaining Cloud Credentials visit the [Getting Started](/getting_started.md) document.
By default `Fog::Compute` will connect to the DFW region. In order connect to the ORD region you will need to
To use the ORD region you will need to add the key `:rackspace_endpoint` with a value of `Fog::Compute::RackspaceV2::ORD_ENDPOINT` to the `Fog::Compute` constructor. To interact with the London Region you will need to add the key `:rackspace_endpoint` with a value of Fog::Compute::RackspaceV2::LON_ENDPOINT as well as specifying the authentication with `:rackspace_auth_url` https://lon.auth.api.rackspacecloud.com/v1.0
#### Endpoints
By default `Fog::Compute` will authenticate against the US Rackspace Open Cloud and create servers in the DFW region.
Alernative data centers can be specificed by adding the key `:rackspace_endpoint` into the constructor specifing one of the following values:
<table>
<tr>
<th>Value</th>
<th>Location</th>
</tr>
<tr>
<td>Fog::Compute::RackspaceV2::DFW_ENDPOINT</td>
<td>Dallas Region</td>
</tr>
<tr>
<td>Fog::Compute::RackspaceV2::ORD_ENDPOINT</td>
<td>Chicago Region</td>
</tr>
<tr>
<td>Fog::Compute::RackspaceV2::LON_ENDPOINT</td>
<td>London Region</tr>
</table>
**Please Note:** If you specify the London region you must specify the `:rackspace_auth_url`

View file

@ -0,0 +1,76 @@
# Getting Started with Rackspace Open Cloud
This document will explain how to get started using Fog with the [Rackspace Open Cloud](http://www.rackspace.com/cloud/).
## Requirements
Fog is officially supports Ruby 1.9.3, 1.9.2, and 1.8.7 (Also known as Matz Ruby Interpreter or MRI). While not officially supported, fog has been known to work with Rubinus and JRuby.
Ruby 1.9.3 is suggested for new projects. For information on installing Ruby please refer to the [Ruby download page](http://www.ruby-lang.org/en/downloads/).
## Credentials
To obtain credentials for the US Rackspace Open Cloud, please sign up for an account at [US Rackspace Open Cloud](https://cart.rackspace.com/cloud/). Once an account is created, you can login to the [Cloud Control Panel (US)](https://mycloud.rackspace.com/) and find your credentials by clicking on your username in the top right corner and then selecting API keys.
Likewise, you can create an account on our UK Rackspace Open Cloud by going to [UK Rackspace Open Cloud](https://buyonline.rackspace.co.uk/cloud/userinfo?type=normal) and login into [Cloud Control Panel (UK)](https://mycloud.rackspace.co.uk/).
## Installation
To install Fog via RubyGems run the following command:
$ gem install fog
To install Fog via Bundler add `gem 'fog'` to your `Gemfile`. This is a sample `Gemfile` to install Fog:
source :rubygems
gem 'fog'
After creating your `Gemfile` execute the following command to install the libraries:
bundle install
Bundler is the suggested method for new projects. For more information about bundler, please refer to the [bundler documentation](http://gembundler.com/). For information on installing rubygems, please refer to [rubygems download page](http://rubygems.org/pages/download).
## Next Steps
Now that you have installed Fog and obtained your credentials, you are ready to begin exploring the capabilities of the Rackspace Open Cloud and Fog using `irb`.
Start by executing the following command:
irb
Once `irb` has launched you will need to require the Fog library.
If using Ruby 1.8.x execute the following command:
require 'rubygems'
require 'fog'
If using Ruby 1.9.x execute the following command:
require 'fog'
You should now be able to execute the following command to see a list of services Fog provides for the Rackspace Open Cloud:
Fog::Rackspace.services
These services can be explored in further depth in the following documents:
* Next Gen Cloud Servers™ (compute_v2)
* Cloud Files™ (storage)
* Cloud Block Storage (block_storage)
*Note: The compute service provides an interface to the First Gen Cloud Servers™ (compute). This service is deprecated. Users are encouraged to use Next Gen Cloud Servers™ (compute_v2).*
## Additional Resources
* [fog.io](http://fog.io)
* [API Documentation](http://rubydoc.info/gems/fog)
* [Source](https://github.com/fog/fog)
* [Release Notes](https://github.com/fog/fog/blob/master/changelog.txt)
* [developer.rackspace.com](http://developer.rackspace.com/)
## Support and Feedback
Your feedback is appreciated! If you have specific issues with the **fog** SDK, developers should file an [issue via Github](https://github.com/fog/fog/issues).
For general feedback and support requests, send an email to: <sdk-support@rackspace.com>.