• 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 » Upload to HP Cloud CDN Using OpenStack Swift Client

By Abhishek Ghosh January 18, 2015 3:36 am Updated on January 18, 2015

Upload to HP Cloud CDN Using OpenStack Swift Client

Advertisement

Here is How to Upload Images, Java-scripts, CSS Files to HP Cloud CDN Using OpenStack Swift Python Client From OS X or GNU Linux Terminal. You basically can use this primitive method to upload static contents of WordPress to HP Cloud CDN. The PHP Binding for HP Cloud CDN is unusable with WordPress due to unknown reason. Not everyone can easily use OpenStack Swift Client – neither good guide is available for free anywhere, nor so detailed steps are written for the common users. We hope that, with this guide, users can feel better, as at least it can upload faster than HP Cloud web GUI.

OpenStack Python command-line client is very powerful tool. With this basic idea, you can actually create a script to sync the files. Python is better than PHP plus it is native OpenStack tool, making the basic thing to a WordPress plugin is not very difficult. The practical fact is that – the way the Vendor (read Rackspace, HP Cloud) install OpenStack, the way to authenticate changes with that, which makes the Plugins kind of vendor-locked. Otherwise there are lot of WordPress Plugins for Rackspace Cloud Files, modifying them will not make them working as WordPress HP Cloud CDN Plugin. Learn How to Upload to HP Cloud CDN Using OpenStack Swift Client From This Basic Guide. Your Server is also a computer. You have to filter out the PHP, HTML etc. files on Server’s Public Directory and Upload them to HP Cloud CDN. If you want to develop yourself, do slowly, else wait when we will develop a plugin. There are lot of tools like we wrote in the OpenStack Cloud Tools Python Packages guide.

 

Upload to HP Cloud CDN Using OpenStack Swift Client : Installing the Python Clients

 

We published a detailed guide on how to install this tools in HP Helion Public Cloud Getting Started guide. The title of the article possibly was a misnomer. Read that guide if you have not installed the Python Client.

Advertisement

---

We are using iTerm2-HomeBrew-ZSH on OSX, you have to change the method a bit for GNU Linux – only difference is the profile dot file. We are editing the .zshrc file here.

 

Upload to HP Cloud CDN Using OpenStack Swift Client : How To Get the Ready Made Configuration File to Authenticate?

 

OpenStack RC File is actually present – you can find it in your in OpenStack Horizon control panel on HP Cloud. Then go into Access & Security panel, then into API Access tab. Finally, click on Download OpenStack RC File. You will see, under the Access and Security option, there API Access tab. You will get a button like link to Download OpenStack RC File. It will look like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
 
# To use an Openstack cloud you need to authenticate against keystone, which
# returns a **Token** and **Service Catalog**.  The catalog contains the
# endpoint for all services the user/tenant has access to - including nova,
# glance, keystone, swift.
#
# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0.  We
# will use the 1.1 *compute api*
export OS_AUTH_URL=https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
 
# With the addition of Keystone we have standardized on the term **tenant**
# as the entity that owns the resources.
export OS_TENANT_ID=xxxxxxxxxxxxxxxxx
export OS_TENANT_NAME="xxxxxxxxxxxx-Project"
 
# In addition to the owning entity (tenant), openstack stores the entity
# performing the action as the **user**.
export OS_USERNAME="yourusername"
 
# With Keystone you pass the keystone password.
echo "Please enter your OpenStack Password: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD=$OS_PASSWORD_INPUT
 
# If your configuration has multiple regions, we set that information here.
# OS_REGION_NAME is optional and only valid in certain environments.
export OS_REGION_NAME="region-a.geo-1"
# Don't leave a blank variable, unset it if it was empty
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi

Clean it a bit and add the password thing too :

Vim
1
2
3
4
5
6
export OS_AUTH_URL=https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/
export OS_TENANT_ID=xxxxxxxxxxxxxx
export OS_TENANT_NAME="xxxxxxxxxxx-Project"
export OS_USERNAME="yourusername"
export OS_PASSWORD="yourpassword"
export OS_REGION_NAME="region-a.geo-1"

As we are using Oh-My-ZSH / ZSH shell, we will simply open the file at $HOME :

Vim
1
nano .zshrc

and add the thing on the bottom of the file. Then load the environment :

Vim
1
source .zshrc

You have to install the clients like written in the older Getting Started guide.

Upload to HP Cloud CDN Using OpenStack Swift Client
 

Upload to HP Cloud CDN Using OpenStack Swift Client

 

It is very easy to use. If you run swift command, you will get a kind of user guide. That is what is written here :

Vim
1
http://docs.openstack.org/cli-reference/content/swiftclient_commands.html

To test your settings you can run :

Vim
1
swift stat

It will give you an output like this :

Vim
1
2
3
4
5
6
7
8
9
Account: xxxxxxxxxxxx
   Containers: 7
      Objects: 345
        Bytes: 116969
Accept-Ranges: bytes
   Connection: keep-alive
  X-Timestamp: 1416220171.44924
   X-Trans-Id: ttttttttttttttttttttttttt
Content-Type: text/plain; charset=utf-8

If you run this command :

Vim
1
swift list

You will get the list of the containers. If you have a container named test, if you run :

Vim
1
swift list test

You will get the list of the stuffs inside the container. Suppose, you downloaded that pdf guide on OpenStack docs :

Vim
1
wget http://docs.openstack.org/api/openstack-object-storage/1.0/os-objectstorage-devguide-1.0.pdf

If you run this kind of command :

Vim
1
swift upload test os-objectstorage-devguide-1.0.pdf

It will upload the file in the test named container. In this way, you can change the metadata, add headers etc. We will get hacked if we show the real names, so we have shown you another example in the screenshot.

Tagged With paperuri:(0788ef4e94fdc08227dec5770ff19381)

This Article Has Been Shared 331 Times!

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 Upload to HP Cloud CDN Using OpenStack Swift Client

  • Cloud Computing : Everything as a Service (XaaS or EaaS)

    Cloud Computing has several levels, Everything as a Service (XaaS or EaaS) targets to make the available resources consumable.

  • Run Cloud Computing based web applications with Prism from Mozilla

    Run Cloud Computing based web applications with rock solid stability with either Prism standalone app or as Firefox Plugin. Both are from Mozilla Labs.

  • Private Cloud Computing – Advantages Over Public Cloud

    Private Cloud Computing offers more adaptability,more safety, more control over the Public Cloud Computing Platform. In this article,we will discuss the points.

  • Networking Basics and Cloud Computing

    Networking Basics is a starter article on how two computers or servers are inter connected within a network. Networking is the spine of Cloud Computing.

  • HP Cloud : Getting Started with Pay as you Go Cloud Computing

    HP Cloud, which is based on OpenCloud platform delivers various Cloud Solution in a Pay as you Go Cloud Computing model like unmanaged Rackspace Cloud Server.

Additionally, 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

  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023
  • What is Vehicular Ad-Hoc Network? January 24, 2023
  • Difference Between Panel Light, COB Light, Track Light January 21, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Upload to HP Cloud CDN Using OpenStack Swift Client," in The Customize Windows, January 18, 2015, January 29, 2023, https://thecustomizewindows.com/2015/01/upload-hp-cloud-cdn-using-openstack-swift-client/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT