• 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 » OpenStack Swift Client Web Interface That Works

By Abhishek Ghosh January 26, 2015 1:34 am Updated on January 26, 2015

OpenStack Swift Client Web Interface That Works

Advertisement

Here is an OpenStack Swift Client Web Interface That Works Like Somewhat Rackspace Provides Options For the Clients. It is Python, Django Based. OpenStack, frankly is coded for Rackspaces own usage (obvious, who will develop for the others); where NASA or NSA uses it; that is unknown, but for sure, OpenStack Swift can give solid pain. Understand it – OpenStack is actually nicely coded, but despite it is Free, it is kind of vendor locked, unlike Apache2, Nginx web servers. Rackspace gives everything, but that way of installing OpenStack makes the Clients API dependent. Others install for Key Stone based Authentication. Others mean – IBM, HP etc. HP installed OpenStack a bit wrongly, that actually give some errors. Python is the only way to practically use the power of OpenStack Swift.

Practically, we first published a guide on OpenStack Swift object uploading for the clients in an easy way. You can grep the static objects and upload in modified easy way. It sounds unrealistic, but real development around OpenStack is quite sad. This Python tool has easy web interface that will help to add container meta data and other stuffs. More sadly, most tools are for the Vendor, not the clients. Everyone has http://127.0.0.1:8080/, you have, I have, Rackspace has, HP Cloud has; that kind of URL is for the Vendor, who installed the main instance, kind of bigger version of cPanel.

 

OpenStack Swift Client Web Interface That Works : Basics

 

If you never worked with Python, know the basics; Django for example is very light framework. When we test on local computer, we directly run the App. It sucks so less memory, that you’ll get astonished. It runs as standalone web server. When we run on Server, usually, another web server like Nginx is added as that way of running has small problems.

Advertisement

---

The software is great but has no documentation. This is the original project :

Vim
1
https://github.com/cschwede/django-swiftbrowser

If you directly install it, the login page will appear, but you actually can not find the settings files, particularly if it is OS X. So, if you edit the core files before running the setup, it will be easier. Python is not PHP – Python has two clear state – working or not working, PHP has nth number of unofficial states – white pages, sucking huge memory etc.

 

OpenStack Swift Client Web Interface That Works : Working With The Existing Project

 

It is better to describe the method for the existing users. We can modify and release it for out of the box Vendor specific usage. Installing the Python Swift-Client is optional. But you need to install tox. Open Terminal (not iTerm2) and run these commands :

Vim
1
sudo pip install tox

If you get Successfully installed tox virtualenv py, Cleaning up... message after any Python web software, it means everything is fine. If you get Storing complete log in /Users/USERNAME/Library/Logs/pip.log, it means the thing has failed to get installed.

Now, you could install that django-swiftbrowser (do not do it) :

Vim
1
sudo pip install django-swiftbrowser

In this state, if you run this command :

Vim
1
django-admin runserver --settings=swiftbrowser.settings

and open your browser to http://127.0.0.1:8000/; you’ll be able to see this thing :

OpenStack Swift Client Web Interface That Works

The person who developed, wrote the README for Microsoft Windows; NOT *nix system. swiftbrowser.settings flag actually incorrect. That has dummy data. Plus the person’s Native Language is German. So, what you’ll do is, if you have installed django-swiftbrowser in that wrong way, uninstall by running :

Vim
1
sudo pip uninstall django-swiftbrowser

On OS X, the installation path in that way is :

Vim
1
/Library/Python/{version}/site-packages/swiftbrowser

You will do these :

Vim
1
2
3
cd ~
git clone git://github.com/cschwede/django-swiftbrowser.git && cd django-swiftbrowser
cd swiftbrowser && ls

If you open settings file with nano settings.py, you’ll find :

Vim
1
2
3
4
5
6
7
8
9
10
SWIFT_AUTH_URL = 'http://127.0.0.1:8080/auth/v1.0'
SWIFT_AUTH_VERSION = 1  # 2 for keystone
STORAGE_URL = 'http://127.0.0.1:8080/v1/'
BASE_URL = 'http://127.0.0.1:8000'  # default if using built-in runserver
SWAUTH_URL = 'http://127.0.0.1:8080/auth/v2'
 
TIME_ZONE = 'Europe/Berlin'
LANGUAGE_CODE = 'de-de'
SECRET_KEY = 'DONT_USE_THIS_IN_PRODUCTION'
STATIC_URL = "http://cdnjs.cloudflare.com/ajax/libs/"

SWIFT_AUTH_VERSION = 2 will be default, second change with real values. Read our old guide linked in the begining of this guide. That openstack_rc file is important plus your dashboard info. First install django :

Vim
1
sudo pip install django

That swiftbrowser.settings was not edited. Now, if you run :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
sudo pip install --upgrade setup tools
sudo python setup.py install
# create a new Django project:
django-admin.py startproject myproj
cd myproj
cp ~/django-swiftbrowser/example/settings.py myproj/settings.py
# edit myproj/settings.py to your need
# edit myproj/urls.py and include swiftbrowser.urls
import swiftbrowser.urls
 
urlpatterns = patterns(,
url(r™^™, include(swiftbrowser.urls)),
)
 
# collect static files:\
python manage.py collectstatic
# run development server:
python manage.py runserver “insecure

settings.py should be adjusted :

Vim
1
2
3
DEFAULT_FILE_STORAGE='swift.storage.SwiftStorage'
# add this to store your static files on swift
STATICFILES_STORAGE ='swift.storage.StaticSwiftStorage'

More settings :

OptionDefaultDescription
SWIFT_AUTH_URLNoneThe URL for the auth server, e.g. http://127.0.0.1:5000/v2.0
SWIFT_USERNAMENoneThe username to use to authenticate.
SWIFT_KEYNoneThe key (password) to use to authenticate.
SWIFT_AUTH_VERSION1The version of the authentication protocol to use.
SWIFT_TENANT_NAMENoneThe tenant name to use when authenticating.
SWIFT_CONTAINER_NAMENoneThe container in which to store the files.
SWIFT_STATIC_CONTAINER_NAMENoneAlternate container used by StaticSwiftStorage.
SWIFT_AUTO_CREATE_CONTAINERFalseShould the container be created if it does not exist?
SWIFT_AUTO_BASE_URLTrueQuery the authentication server for the base URL.
SWIFT_BASE_URLNoneThe base URL from which the files can be retrieved, e.g. http://127.0.0.1:8080/.
SWIFT_USE_TEMP_URLSFalseGenerate temporary URLs for file access (allows files to be accessed without a permissive ACL).
SWIFT_TEMP_URL_KEYNoneTemporary URL key — see the OpenStack documentation.
SWIFT_TEMP_URL_DURATION30*60How long a temporary URL remains valid, in seconds.
SWIFT_EXTRA_OPTIONS{}Extra options, eg. { “endpoint_type”: “adminURL” }, which will return adminURL instead publicURL.

Although it is painful, it is really the best way to specially change the expire headers. Rackspace, basically added these with a nice CSS.

Tagged With django swift-browser get login failed , openstack client gui account , openstack swift client , openstack swift UI client , openstack swift web , openstack swift web gui , openstack web client , swift web client
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 OpenStack Swift Client Web Interface That Works

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • OpenStack Cloud Tools Python Packages

    OpenStack Cloud Tools Python Packages are quite easy to install python using the pip command. We have shown how to install for Linux server.

  • Python Script to Upload Files to OpenStack Swift (HP Cloud CDN)

    Here is a Simple Python Script to Upload Files to OpenStack Swift, for Our Case HP Cloud CDN. Very easy to use from Mac or Linux Server.

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