• 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 547 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic 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

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

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 (21K Followers)
  • Twitter (5.3k 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

  • What is Standard Software February 28, 2021
  • WordPress Link to text Fragment February 27, 2021
  • How to Protect IP Cameras From Hackers February 25, 2021
  • 6 Sectors That Have Undergone Revamps in Digital Landscape February 24, 2021
  • What You Can Control with a Smartwatch and ESP32 February 23, 2021

 

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, March 1, 2021, https://thecustomizewindows.com/2018/12/upload-to-ibm-cloud-cdn-using-openstack-swift-client/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

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

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