• 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 » Using OpenShift PaaS Shell For OpenStack Python Clients

By Abhishek Ghosh July 5, 2015 9:42 am Updated on July 5, 2015

Using OpenShift PaaS Shell For OpenStack Python Clients

Advertisement

We Discovered a Way of Using OpenShift PaaS Shell For Using the OpenStack Python Clients Including OpenStack Object Storage (Swift) Easily. Previously we have shown the running web shell on OpenShift. That is PHP cartridge. OpenStack Swift Python client is written in Python. Not exactly easy to run both PHP and Python on PaaS together and then execute command from front end. Without doubt, this is most complex App ever made on OpenShift PaaS. The setup is very easy on an IaaS – we have the full control of the server.

 

Using OpenShift PaaS Shell For OpenStack Python Clients : Installing Web Shell as PHP App

 

First create a PHP ZEND cartridge and push the Web Shell as PHP App on the cartridge after minimal needed changes. You should get a thing like this one – https://shell-abhishekghosh.rhcloud.com (username: thecustomizewindows.com ; password: jima.in). Easy thing. It is PHP plus Javascript functions.

 

Using OpenShift PaaS Shell For OpenStack Python Clients : Activating Python on the Same Cartridge

 

SSH to that gear/application from your Mac or GNU/Linux computer. The ready to use command to do SSH looking like ssh 1qaz2wsx3edc4rfv@py27-abhishekghosh.rhcloud.com will be found on OpenShift dashboard. The next commands are tricky :

Advertisement

---

Vim
1
2
virtualenv --no-site-packages $OPENSHIFT_DATA_DIR/env
source $OPENSHIFT_DATA_DIR/env/bin/activate

Now you can install Python Swift Client with pip!

Using OpenShift PaaS Shell For OpenStack Python Clients

 

Using OpenShift PaaS Shell For OpenStack Python Clients : Installing Python Swift Client

 

Now run :

Vim
1
pip install python-swiftclient

from OpenShift client’s SSH screen. Swift Client will get activated and you can run swift command to check. Keep it mind – this is SSH. We need to run that swift command from frontend. Actually PHP will run the commands. The big difference between running command from SSH and our Web Shell is that – that $OPENSHIFT_DATA_DIR will not work. So, to repeat the same commands at front end, you need to do a pwd at SSH screen to get the real path of this – $OPENSHIFT_DATA_DIR. You can understand, the commands will be very long due to bigger path.

 

Using OpenShift PaaS Shell For OpenStack Python Clients : Executing Commands

 

There is a bit cheating way to run the valid commands. These command syntax is valid for HP Cloud. Instead of running swift list command, you have to run :

Vim
1
swift --os-auth-url https://api.example.com/v2.0 --os-tenant-name tenant --os-username user --os-password password list

We do not need the openstackrc file for this way. You are testing on OpenShift, you’ll use a real full server to use it. You do not need PHP bindings, Ruby Bindings for OpenStack Clients anymore. That official Python Clients will work fine. PHP bindings varies from providers to providers. It gives a huge pain.

We first tested on IaaS, obviously. It works and we can restrict the access to the web shell in various ways, limit the number of commands that can be executed etc. As you do not know what is the real path of $OPENSHIFT_DATA_DIR for https://shell-abhishekghosh.rhcloud.com, it is not PUBLICLY usable.

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 Using OpenShift PaaS Shell For OpenStack Python Clients

  • OpenShift PaaS Less Used Features : Update Yourself

    There are many OpenShift PaaS Changes which demands to understand how you should upgrade your machine to use our huge guides on OpenShift PaaS.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • Unix Shell or Shell

    Unix Shell or Shell refers to the traditional user interface under Unix or Unix-like computer operating systems. User can type a command type, which is executed by the computer.

  • Command Prompt Commands : Alphabetical list of all commands in Windows 7

    Command Prompt Commands in Windows 7 provides the user access to 180+ command line commands. Here is a list of 200 Command Prompt Commands in Windows 7.

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

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
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