• 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 IBM Cloud CDN Using OpenStack Swift Client

By Abhishek Ghosh December 9, 2018 7:20 am Updated on December 9, 2018

Upload to IBM Cloud CDN Using OpenStack Swift Client

Advertisement

IBM Cloud CDN needs Pay-as-you-go account. We have not tested the lite version of IBM Cloud Object Storage (free trial version) for the presence of features of OpenStack Swift. In this guide, we will show how to upload objects to IBM Cloud CDN or Object Storage using OpenStack Swift client and our a helper Python script. OpenStack Swift already have long known Python clients. We have a lot of articles on this website on OpenStack Swift. The keystone API is essentially a create, read, update, delete (CRUD) interface. The keystone API is essentially a create, read, update, delete (CRUD) interface. IBM Cloud Object Storage is a low-cost storage solution that can be used for various purposes. The command line is a powerful and flexible method to access object storage.

You should either a GNU/Linux computer or server or MacOS X with iTerm2 properly configured or Microsoft Windows 10 with Ubuntu Bash application with Python pip installed.

 

Required Configuration Files to Upload to IBM Cloud CDN Using OpenStack Swift Client

 

As alternative way, you can install python-swiftclient from apt repository too :

Advertisement

---

Vim
1
apt install python-swiftclient -y

But, age old method is to install using Python pip :

Vim
1
2
3
4
5
# keystone client
pip install python-keystoneclient
 
# swift client
pip install python-swiftclient

What in this website we do : to simplify authentication, we create an openrc file with the credentials to environment variables and load it from .zshrc, bashrc etc files to make it easy. IBM system needs three lines :

Vim
1
2
3
export ST_AUTH=     (https://tor01.objectstorage.softlayer.net/auth/v1.0/ )
export ST_USER=     (IBMOS278685-10:######)
export ST_KEY=      (#############)

You can keep the above script where your .zshrc, bashrc etc files are location.

IBM’s system is configured to work with API, like Rackspace. For username-password system of OpenStack Swift access, we can use this kind of openrc file :

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

We can use wift commands such as :

Vim
1
2
swift stat
swift list

Download and upload objects :

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

You must have that openrc.sh file imported in your .zshrc or .bashrc file. In other words, swift command must be working.

Create this script :

upload.sh
Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
#
# Author : Dr. Abhishek Ghosh
# GNU GPL 3.0
# https://thecustomizewindows.com
#
echo "Script to copy source files/directories to OpenStack Swift Storage"
echo "Supply the source file/directory below:"
read target
echo "Supply the container name below:"
read container
echo " "
swift upload $container $target
finish=`date "+%Y-%m-%d-%H-%M-%S"`
echo "Upload completed at ${finish}"

Make it executable :

Vim
1
2
3
chmod +x upload.sh
 
sh upload.sh

Upon run, it will ask “Supply the source file/directory below:”. You will paste/type the full UNIX path like :

Vim
1
/Users/abhishekghosh/Desktop/cdn

and hit the Return/Enter Key. Then it will ask “Supply the container name below:”. You’ll type only the container name on IBM Cloud and hit the Return/Enter Key.

Upload to IBM Cloud CDN Using OpenStack Swift Client

It will return the message the upload completed with a time stamp. As usually, the required scripts for this guide kept on GitHub.

Required official documentation can be found on IBM’s these web pages :

Vim
1
2
3
4
5
6
7
###
https://console.bluemix.net/docs/infrastructure/content-deliver-network/attach-edgecast-cdn-account-sl-object-storage.html
###
 
###
https://console.bluemix.net/docs/infrastructure/objectstorage-swift/connect-object-storage-using-command-line.html#connecting-to-object-storage-with-the-command-line
###

Tagged With LDVG , didbx9 , monkeyaev , orbitpj9 , partlyc1c , PUL3

This Article Has Been Shared 685 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 IBM Cloud CDN Using OpenStack Swift Client

  • Pricing War in Cloud Computing Storage Started Again

    Like We Have Seen In The Past, Pricing War in Cloud Computing Storage Started Again. A Downward Pricing For The Next 18 Months is Predicted.

  • Integration of Apache Hadoop With OpenStack Swift

    The Topic Integration of Apache Hadoop With OpenStack Swift Is Not Exactly New. You Can Follow Our Guide Specially For Handling OpenStack.

  • Ways To Backup MySQL Database And Save To Cloud Storage

    Here Are Ways To Backup MySQL Database And Save To Cloud Storage Including OpenStack Swift From SSH Side. Needed Scripts Has Been Included.

  • Cheapest CDNs With HTTPS, IPv6, HTTP/2, Brotli

    What Are The Cheapest CDNs With HTTPS, IPv6, HTTP/2, Brotli Support At This Moment? For A Website Origin Pull Is Preferred Over Origin Push.

  • Object Storage vs. Block Storage

    Block storage is as simple as like normal hard drives. In object storage, storage architecture manages data as objects. Both has pros & cons.

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

  • The Importance of Voice and Style in Essay Writing April 1, 2023
  • What Online Casinos Have No Deposit Bonus in Australia March 30, 2023
  • Four Foolproof Tips To Never Run Out Of Blog Ideas For Your Website March 28, 2023
  • The Interactive Entertainment Serving as a Tech Proving Ground March 28, 2023
  • Is it Good to Run Apache Web server and MySQL Database on Separate Cloud Servers? March 27, 2023

About This Article

Cite this article as: Abhishek Ghosh, "Upload to IBM Cloud CDN Using OpenStack Swift Client," in The Customize Windows, December 9, 2018, April 1, 2023, https://thecustomizewindows.com/2018/12/upload-to-ibm-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