• 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 WordPress Objects to OpenStack Swift (HP Cloud CDN)

By Abhishek Ghosh January 23, 2015 6:12 pm Updated on January 23, 2015

Upload WordPress Objects to OpenStack Swift (HP Cloud CDN)

Advertisement

Here is How to Upload WordPress Objects to OpenStack Swift, Working Example is With HP Cloud CDN and W3TC Plugin. Necessity is the Mother. What a Linux Server will have difference with a Mac? We have shown how to upload objects to HP Cloud CDN, that is a raw OpenStack Swift from OS X. OpenStack Swift – simple! Why fight with hundreds of crap PHP scripts when there is a perfect tool name Python Swift Client? Most funny, Python Swift Client is more easy to use on GNU/Linux. For our Example, it is an Ubuntu Server! This thing actually trying for the last 3 years. HP has, dedicated developers as employees.

We love OpenShift. It is PaaS, true. But they honor all the peoples who works for free for OpenShift. No freebie, no backlink, not even a Retweet, who will work for free?

 

Upload WordPress Objects to OpenStack Swift (HP Cloud CDN) : Initial Preparation

 

Read that guide to upload stuffs to HP Cloud CDN. You need that modified OpenStack RC file. Our modified way is (this is for West) :

Advertisement

---

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"

We hope, you have a colorful SSH with Nano’s Syntax Highlighting. If you have not, read it later, you can do something within this guide. You are root, right? If sudo su is throwing error, read this guide to resolve sudo: unable to resolve host error. You can do that later too. Your $HOME is ~. You can not see, but there is a .bashrc file. Open it :

Vim
1
cd ~ && nano .bashrc

uncomment the line unset color_prompt force_color_prompt, that will give you some color on SSH. Go to the end of the file and add your modified real stuffs copied from above block, which is actually part of OpenStack RC file. Load the environment :

Vim
1
source .bashrc

First part done.

 

Upload WordPress Objects to OpenStack Swift (HP Cloud CDN) : Step 2

 

Run this command :

Vim
1
apt-get install python-swiftclient

It will say many things, you need not to read, accept with Y. After installation, run this command to test :

Vim
1
swift stat

It will return a thing which means, you have done the right :

Vim
1
2
3
4
5
6
7
8
No handlers could be found for logger "keystoneclient.httpclient"
       Account: XXXXXXXXXXXXXXX
    Containers: XXXXXX
       Objects: XXXXXXXX
         Bytes: 116969
Accept-Ranges: bytes
   X-Timestamp: 1416220171.44924
    X-Trans-Id: tx1baabf46a5ee4baea80a7-005

You can list your containers :

Vim
1
swift list

That No handlers could be found for logger "keystoneclient.httpclient" is not a problematic error. It looks bad, but you’ll have no issue. Suppose you are using nginx and your WordPress is located at /usr/share/nginx/html, then cd to that place :

Vim
1
cd /usr/share/nginx/html

Or may be :

Vim
1
cd /usr/share/nginx/html/wp-content

Upload to HP Cloud CDN Using OpenStack Swift Client

See the screenshot here in full size.

wget this on your local computer and read :

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

Upload all the files you want. Actually, on nginx, you need a simple directive to auto replace the static files’ URLs. That is exactly done by W3TC. You can enable CDN with Rackspace Cloud Files option and use the HP Cloud or whatever OpenStack Swift domain name. W3TC will provoke you to use password, username etc. Do not use your real HP Cloud credentials. Rackspace guys will able to see your password! NSA can also see, that is different thing. But the needed change either will be done automatically by W3TC or it will prompt. Together, PHP and Nginx block does the thing. Simple.

Yeah, as there is no filter, all files will get uploaded. 35MB extra upload. You can create a small bash script to do avoid typing commands and set cron. Instead of PHP, you’ll use command line. WordPress plugin is for those who use Shared Hosting.

No password prompt, no fuss. Very fast upload. You are not disturbing weak PHP, so no chance of WordPress white page. Run this command (create a container named tcw-january-w3tc from Dashboard, set TTL, Publish it publicly as CDN beforehand) :

Vim
1
swift upload tcw-january-w3tc /usr/share/nginx/html

You’ll see, how nicely stuffs are getting uploaded. If you want only to upload the updated stuffs, then run :

Vim
1
swift upload -c tcw-january-w3tc /usr/share/nginx/html

Thats what you need to create a script with. Instead of you, cron will run it. Virtual directory will be created in this way :

Vim
1
2
https://horizon.hpcloud.com/project/containers/tcw-all-january/usr/share/nginx/html/
# fake url

You can not download from CDN :

Vim
1
/usr/share/nginx/html/wp-config.php

It is file ownership and permission preventing it to get uploaded! Thats the fun of *nix. It is basically, file level backup which Rackspace sells at higher cost. If you modify the method, you can use more powerfully. By the way, it is Apache2 server, .htacess works! .htacess does not work. You can block need to delete the sensitive PHP, HTML etc. files on web server.

Tagged With openstack swift , koken integrate swift api , swift upload , wordpress cdn openstack

This Article Has Been Shared 241 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 WordPress Objects to OpenStack Swift (HP Cloud CDN)

  • Cloud Computing Articles – List With Description of all we have Published

    Cloud Computing Solution penetrating as business solution and in day to day usage. Here is list of all articles on Cloud computing we have published so far.

  • Cloud Computing Business Model

    Cloud Computing Business Model, often we hear about this phrase or its shorter phrase Cloud Computing Biz Model. What is exactly this Business Model is?

  • Untrained Employees Increasingly Becoming a Burden For Cloud

    Untrained Employees increasingly becoming a burden for Cloud, a vacuum of skilled networking administrators and personnel lacking experience which is grave.

  • Libswarm : The Open Source Docker API

    Libswarm is an Open Source Docker, a Toolkit for Composing Network Services and Supported by Rackspace Cloud. We can aggregate all containers easily.

  • Install WordPress on Nginx With HHVM on Ubuntu Cloud Server

    Here is Step by Step Guide to Install WordPress on Nginx With HHVM on Ubuntu Cloud Server. This simple and most easy standalone HHVM only guide. We talked about HipHop Virtual Machine or HHVM in order article. Normally, with Nginx, we use PHP5-FPM. This guide is how to install WordPress on Nginx with HHVM on […]

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 (22.1K 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 Future Of Serverless: The Load-Intensive Workload Case May 25, 2022
  • Cutting Out The Coding: Serverless Computing In Action May 24, 2022
  • Types of Blackjack Variants: Discover the Different Versions of the Game May 23, 2022
  • How Cloud, Robotics And Sensor Technologies Are Changing The Business Landscape May 23, 2022
  • Modernizing Your Business With a Hybrid Cloud Strategy May 22, 2022

About This Article

Cite this article as: Abhishek Ghosh, "Upload WordPress Objects to OpenStack Swift (HP Cloud CDN)," in The Customize Windows, January 23, 2015, May 25, 2022, https://thecustomizewindows.com/2015/01/upload-wordpress-objects-openstack-swift-hp-cloud-cdn/.

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 Privacy Policy.

PC users can consult Corrine Chorney for Security.

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

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

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