• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Manage OpenStack Swift With Fog (HP Cloud)

By Abhishek Ghosh March 29, 2015 9:04 pm Updated on March 29, 2015

Manage OpenStack Swift With Fog (HP Cloud)

Advertisement

On the Client Side, We Can Install a Ruby Gem Named Fog. In This Example, We Will Use OS X 10.10.1 as Client and HP Cloud as Cloud Service Provider. Obviously, we can use Python Swift Client to manage OpenStack Swift. Fog has extensive guides.

 

Manage OpenStack Swift With Fog (HP Cloud) : OS X Part

 

Our quite popular guide – iTerm2, Homebrew and ZSH Installation on OS X is the first step to get started. Next steps are :

Vim
1
curl -L get.rvm.io | bash -s stable

Sadly, two more profile files will be created apart from .zshrc, they are :

Advertisement

---

Vim
1
2
3
~/.bash_profile
~/.profile
~/.zlogin

You’ll run cat against these :

Vim
1
2
3
cat ~/.bash_profile
cat ~/.profile
cat ~/.zlogin

practically they’ll have this :

Vim
1
2
3
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
 
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

WE WILL DELETE :

Vim
1
2
3
rm ~/.bash_profile
rm ~/.profile
rm ~/.zlogin

AS WE HAVE ONLY ONE DOT FILE – .zshrc. We will only depend on .zshrc. Source it :

Vim
1
source ~/.zshrc

Next, we will run these commands :

Vim
1
2
3
brew update
source ~/.rvm/scripts/rvm
rvm requirements

Then :

Vim
1
2
3
brew install libksba
rvm install ruby-2.0.0-p598
rvm user all && rvm install ruby-2.0.0 --with-gcc=clang

last two steps are :

Vim
1
rvm use 2.0.0 --default && gem install fog

You should be able to install the gem properly. This is a fixed instruction for OS X Mavericks. 1.9.2 will give you error :

Vim
1
2
3
4
RVM does not know how to build working ruby-1.9.2-p330 on OSX 10.10,
if you know please let us know by opening a ticket with instructions here:
 
    https://github.com/wayneeseguin/rvm/issues

Manage OpenStack Swift With Fog (HP Cloud)
 

Manage OpenStack Swift With Fog : HP Cloud Part

 

Its pretty easy :

Vim
1
2
3
4
5
6
irb -r 'rubygems'
irb -r 'fog'
irb
# you'll get an interactive session
require 'rubygems'
require 'fog'

require 'rubygems' and require 'fog' should return true as output. Example configuration goes like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
def credentials_hash
   {
     :provider => :hp,
     :hp_auth_uri => ENV['OS_AUTH_URL'],
     :hp_access_key => ENV['OS_USER'],
     :hp_secret_key => ENV['OS_API_KEY'],
     :hp_tenant_id =>  ENV['OS_TENANT'] ,
     :hp_avl_zone => ENV['OS_REGION']
   }
end
 
storage = Fog::<SERVICE-NAME>.new(credentials_hash)

The can be Fog::Storage.new(), which is a variable string. It can be cdn, compute etc. You will get question answers on Fog on StackOverflow > http://stackoverflow.com/questions/tagged/fog. Better specific guides can be found on HP’s website itself :

Vim
1
https://dev.hpcloud.com/ruby/sdk-connect.html

On OS X, installation can go hugely painful due to UNIX wheel group. Problem arises mainly from Homebrew part with OS X Mavericks. Fog is exactly not as painless as Python Swift Client for current version of OS X but it can become your solution for the need.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Manage OpenStack Swift With Fog (HP Cloud)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • Install RVM on Rackspace Cloud Server (Ubuntu, PVHVM)

    Here is a step by step guide for the beginners on how to install RVM on Rackspace Cloud Server running Ubuntu 14.04, PVHVM version for Rails.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy