Details the step-by-step procedure on installing HPCloud CLI on Ubuntu 11.10 or CentOS 6.2.
  • Pre-req
    # For Ubuntu 11.10
    apt-get install -y git gcc make zlib1g-dev libssl-dev libreadline-gplv2-dev libxml2-dev libsqlite3-dev libxslt1-dev
    
    # For CentOS 6.2
    yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel libxslt-devel sqlite-devel libxml2-devel
    
  • The recommended way of installing the correct ruby version is through rvm. This will also enable to you maintain and manage multiple ruby versions
    bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
    usermod -a -G rvm root
    source /etc/profile.d/rvm.sh
  • The two supported ruby versions are 1.8.7 and 1.9.2. We will install the latter. Zlib is also required
    rvm install 1.9.2
    rvm pkg install zlib
  • Use ruby 1.9.2 and if you prefer, you may also set it as default
    rvm use 1.9.2
    rvm use 1.9.2 --default
  • Install rubygems
    rvm rubygems current
  • Install HPFog
    cd /tmp
    wget https://build.hpcloud.com/sites/default/files/downloads/hpfog_2.tar
    tar xvf hpfog_2.tar
    gem install hpfog-0.0.14.gem
  • And finally, HPCloud
    wget https://build.hpcloud.com/sites/default/files/downloads/hpcloud_3.tar
    tar xvf hpcloud_3.tar
    gem install hpcloud-0.0.14.gem
  • Test
    hpcloud
    If that command display a list of supported hpcloud tasks, then you are good to go. The next step is to setup your hpcloud credentials.
  • Setup hpcloud account. You will need your Access Key Id, Secret Key, Auth Uri and Tenant Id. You can get those information from the HPCloud Management Console
    hpcloud account:setup
  • We are done! But let's try out some commands
    # Display available instance types/flavors
    hpcloud flavors
     
    # Display available images/OS
    hpcloud images
     
    # List of servers/instances
    hpcloud servers

More info from:
https://build.hpcloud.com/cli/unix/compute
https://build.hpcloud.com/cli/unix/object-storage
https://build.hpcloud.com/cli/unix/cdn