Ask Your Question
2

How do I get started with installing OpenStack Swift?

asked 2013-08-02 10:15:53 -0600

baran gravatar image

updated 2013-08-02 18:37:06 -0600

smaffulli gravatar image

hello my friends

I want:

  1. install Swift
  2. testing health connectivity Swift the keystone
  3. Store and retrieve files in a swift

I do:

apt-get install python-software-properties

add-apt-repository ppa:swift-core/release

apt-get update

apt-get install swift openssh-server

now What i do for 3 case above ??

thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-08-02 14:31:50 -0600

rahmu gravatar image

updated 2013-08-04 15:05:52 -0600

Evgeny gravatar image

It's difficult to answer your question exactly. Installing Swift is more complicated operation than just entering apt-get install swift. You should find a guide to follow during your installation. Luckily, you'll find plenty of documentation about the topic.

Selected guides

You can chose one of the following:

  • Swift All In One (SAIO): This document guides you through the installation of Swift on a single machine. Great to get yourself familiar with the process.
  • Multinode Server Swift Installation: This document will guide you through a slightly more realistic installation, as Swift is almost never deployed on a single node in production.

I selected these 2, but you can find more if you search through the official documentation website.

Real World installation

The guides I showed you above have great pedagogical value, and will give you a good insight on how Swift works. However, in the real world, you'll rarely install it manually. In good devops fashion (isn't that what all the cool kids say now?), everything will be automated.

  • Devstack: devstack describes itself as "an opinionated Openstack developer's installation". It's a shell script that deploys a minimal openstack on a single machine. Programmers use it to test their patches against, but it won't give you a real idea of what Openstack (or Swift) is like in production.

Note that going through the comments of devstack is a great way to learn how Openstack works

  • Deployment in production will be done with a specialized tool like Chef or Puppet. When dealing with several dozens of disks (if not hundreds!), you don't want to do everything by hand. Virtually every "real world" deployment is done using these tools (or something equivalent).

After installation

Now that you have a working Swift installation, you can accomplish your 2nd (querying Keystone) and 3rd (upload/download files) steps by querying Swift through its API. You can find it thoroughly documented.

If you don't want to write your own Swift client, (or you don't want to go through the joys of hand-writing your HTTP requests with wget or curl), you can use the official Swift client to do this. You'll find it either on PyPI or Github.

To install from PyPI:

$ sudo pip install python-swiftclient

To install from Github

$ git clone https://github.com/openstack/python-swiftclient
$ cd python-swiftclient
$ python setup.py develop

Note that you may want to use a virtualenv, but that's outside the scope of this answer.

You can then read the inline help to discover which commands to launch:

$ swift --help

Finally, note that adding the --debug option to every command will show you in detail the HTTP requests/responses going on between your client and the server. It will (very quickly) become very handy to do so.

edit flag offensive delete link more

Comments

Since I don't have 10 Karma, the formatting of the links is gone completely wrong. Especially in the code blocks. Can anyone with proper permissions edit my post and correct these formatting problems, please? Hopefully this works like SO, so it'd be fairly easy to do.

rahmu gravatar imagerahmu ( 2013-08-02 14:36:00 -0600 )edit

The answer looks good except for the bug https://bugs.launchpad.net/openstack-community/+bug/1208060. Thank you.

smaffulli gravatar imagesmaffulli ( 2013-08-03 23:04:25 -0600 )edit

@rahmu, @smaffulli this issue should be resolved now, please let me know otherwise. Thanks.

Evgeny gravatar imageEvgeny ( 2013-08-04 15:17:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-02 10:15:53 -0600

Seen: 477 times

Last updated: Aug 04 '13