Ask Your Question
0

Swift installation on Ubuntu

asked 2013-04-17 10:06:19 -0500

chabani-mohamed-hadi gravatar image

Hello,

I'm working on the installation of OpenStack Object Storage (Swift) on my company's server, however i found lot of problems to achieve the installation, (I just knew openstack a month ago), so i'm wondering if some one has already try it and can help me to better understand it, i tried a lot of tutorials in openstack docs, and extern docs but i got nothing concret, please if some can give me the tutorial he followed to install Swift, it will be really great, or an mail or skype adress so we can get in touch just to understand really what should i have or do !

Thank you very much

edit retag flag offensive close merge delete

14 answers

Sort by ยป oldest newest most voted
0

answered 2013-04-24 09:39:25 -0500

choisy-alex gravatar image

In order to try your swift installation, you can use the "swift" client command.

This is a python program installed when you use the apt commands to install your swift cluster. This tool allows you to directly interact with your swift architecture and doing things like put datas, remove or list the content of your containers. There is a Man page for this tool and you can find some exemples all over the Openstack documentation (like there : http://docs.openstack.org/folsom/openstack-object-storage/admin/content/verify-swift-installation.html (http://docs.openstack.org/folsom/open...) ).

Be carefull by the way, the exemples given on the manual are made for particular swift architectures and meant to be adapted on each one's configuration. In this case, the exemple i've linked, uses the adress given by a swift installation configured to work with the Identity service Keystone. If you uses the Tempauth middleware (you can see it in your proxy-server.conf file), the adresses used on the swift client command will change. The link i gave you in the first message does contain a testing part which you may adapt according to the situation . Just keep in mind that you always need to adapt to your own configuration, and try things and others in order to understand and find the solution.

I'm glad i could help you, or at least give you some hope. Never give up, it may be hard but the more i work on swift, the more i enjoy it. You're welcome.

edit flag offensive delete link more
0

answered 2013-04-24 10:11:11 -0500

chabani-mohamed-hadi gravatar image

Thanks Alexandre Choisy, that solved my question.

edit flag offensive delete link more
0

answered 2013-04-24 10:13:42 -0500

chabani-mohamed-hadi gravatar image

Sorry i made a mistake when trying to add comment, i click on "problem resolved"

edit flag offensive delete link more
0

answered 2013-04-24 07:41:30 -0500

choisy-alex gravatar image

Hello, I am actually working on openstack for a project in my company too (started a couple of months ago). I've tried to install an Openstack Object Storage environnement and encountered a large amount of problems too. At the beginning i've tried to follow one tutorial from the start to the end and just stick with it ( http://docs.openstack.org/developer/swift/howto_installmultinode.html (http://docs.openstack.org/developer/s...) ). Of course, i encountered some problems, but i was able to resolve them gradually by searches on other parts of the Openstack documentation. Then, i started to add components (keystone, account_quotas, etc...) one by one, very carefully to finally fit a stronger architecture. I also had some troubles and it took a long time. But with researchs, reading articles and others, i finally understood a good part of what i was doing, why we choose 1 part of the setup instead of another. Now, i'm actually trying to understand the internal mechanisms and impacts of the data replication and i'm moving step by step.

Anyway, what i wanted to tell you, was that you need to understand what you are doing, and the best way to do it, is to walk through the Openstack documentation again and again (which is very very strong) and all the articles you can find other the internet (for exemple, this article is really usefull to understand how the rings works : http://julien.danjou.info/blog/2012/openstack-swift-consistency-analysis (http://julien.danjou.info/blog/2012/o...) ). All of this is a matter of patience.

Moreover, If you need help on a particular problem, i'm sure there are people who would be glad to help you, but they need a bit more informations on the nature of the exact problem, like the environnement (which version of ubuntu), the description of the problem, etc...

I hope this could be usefull and i wish you a good luck.

edit flag offensive delete link more
0

answered 2013-04-24 09:15:57 -0500

chabani-mohamed-hadi gravatar image

Hello,

I'm really thankful to you for the effort you make to answer me, and yes you are describing exactly what i'm having as obstacles, cause i've so problem 1/ to understand exactly what i should do. 2/ have an explanation to some steps in the installation process, cause as you told me, i encountered a lot of problems of network, instances...and when i get errors and don't know how to resolve them cause i follow sometimes tutorials without really understand where i should go !!

Hearing that you have resolved your problems step by step give me a breath of air, so i can now get back in, however i want to ask you if after the installation of the Swift object storage, you could install a swfit client and put data in, even if small sizes just to try ?

Your replay was really useful and hope i can have have some results soon.

Thank you

edit flag offensive delete link more
0

answered 2013-04-24 10:17:34 -0500

chabani-mohamed-hadi gravatar image

Great, i will try so spend more time on understanding the swift mecanism work, and go through step by step, i will start the installation from the beginning, i'm actually working on a remote virtual machine, 120 Go, 4 Go of Ram, oon Ubuntu 12.04 LTSn i don't know if its adequate for suck installation or no, for single or multiple node....whatever i will see, if you don't mind i may need help from you at some steps :)

Than you Alexandre

edit flag offensive delete link more
0

answered 2013-04-24 12:07:56 -0500

choisy-alex gravatar image

I will try to help you the best i can :) For an installation of multiple nodes on a single machine you can follow this tutorial from the Openstack documentation : http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...) I didn't try it personally but it seems to give you the steps to simulate a multiple node environment. After the first steps, i think this should join in a way the other tutorials about the installation and configuration of the Object Storage service.

Don't hesitate to ask for help, i'll be happy to answer you the best i can. Have a nice day

edit flag offensive delete link more
0

answered 2013-04-29 08:56:14 -0500

chabani-mohamed-hadi gravatar image

Hi Alexandre, i'm back :)

I was following the tutorial you gave me the last time http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...) and in the lattest steps :

  1. Get an X-Storage-Url and X-Auth-Token: curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0

and

  1. Check that you can GET account: curl -v -H 'X-Auth-Token: <token-from-x-auth-token-above>' <url-from-x-storage-url-above>

i got such error :

"* getaddrinfo(3) failed for url-from-x-storage-url-above:80 * Couldn't resolve host 'url-from-x-storage-url-above' * Closing connection #0 curl: (6) Couldn't resolve host 'url-from-x-storage-url-above'"

I don't know what does this error really mean ! even the rule of these 2 steps and there syntax (10-11) !

If you have an idea about that, it would be great if you can explain me a bit what does it mean.

Thank you :)

edit flag offensive delete link more
0

answered 2013-04-29 13:18:40 -0500

choisy-alex gravatar image

Hello, The error sent back by curl means he isn't able to reach the url "url-from-x-storage-url-above". Actually, curl tried to reach an unknown url and failed badly. This is normal because in the tutoriel, the parts which are surrounded by "<" and ">" are supposed to be changed when you try the commands.

The meaning of this part of the tutorial is that you should be able to get some informations back from the first call of the curl command : curl -v -H 'X-Storage-User: test:tester' -H 'X-Storage-Pass: testing' http://127.0.0.1:8080/auth/v1.0 This should display some informations concerning the http request you made and the answer which is given back to you by your swift installation. The result of this command may display something like that :

       ....
       User-Agent: curl/7.27.0
       > Host: 192.168.30.123:5000
       > Accept: */*
       > X-Storage-User: admin:admin
       > X-Storage-Pass:admin
       >
       * HTTP 1.1 or later with persistent connection, pipelining supported
       < HTTP/1.1 200 OK
       < Vary: X-Auth-Token
       < Content-Type: application/json>
       ....

With some more informations, included the "X-Auth-Token" (which is required to interact with swift), and the "X-Storage-Url" which is the url to request with curl. Once you found these two informations, you can use the second command to get informations on the account you requested (test:tester, in this example). Finally, the second command looks like : curl -v -H 'X-Auth-Token: 600898b5e6304187b3bdfd304f3bea04' http://127.0.0.1:8080/auth/v1.0/AUTH_961bab294de84389acd53d63f8616f1c (http://127.0.0.1:8080/auth/v1.0/AUTH_...)

Of course, the url and the token you will get will change a bit :)

Curl is just another way than using the swift command to interact with your swift environnement. Curl is just a program made to execute http requests. This allows you to explore further the way swift works by being forced to manually play the authentication steps before you do your "real" request. You can read the Curl's man to see what exactly does this program and understanding the options it propose.

Anyway, when you use the Swift command, these steps gets played by the python script but you can't see it, you only get the final result.

You are welcome :)

edit flag offensive delete link more
0

answered 2013-04-30 09:48:44 -0500

chabani-mohamed-hadi gravatar image

thank you so much for your answer.

I spend yesterday afternoon, with a problem of connexion when i put : "curl -v -H 'X-Storage-User: admin:admin' -H 'X-Storage-Pass: admin' http://127.0.0.1:8080/auth/v1.0%22 (http://127.0.0.1:8080/auth/v1.0") i got : connexion refused...i was connected to Internet, but what i noticed is that the apache server wasn't installed ! but in the tutorial they didn't speak at all about the webserver (Swift was supposed using wich web server to connect to http://127.0.0.1:8080 ?)

After verification with a colleague, and doing some modifications (i didn't understand all xD ), todayand miraculously when put the first command ; it's connected and i got :

  • About to connect() to 127.0.0.1 port 8080 (#0)
  • Trying 127.0.0.1... connected > GET /auth/v1.0 HTTP/1.1 > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 > Host: 127.0.0.1:8080 > Accept: / > X-Storage-User: admin:admin > X-Storage-Pass: admin > < HTTP/1.1 200 OK
    < X-Storage-Url: http://127.0.0.1:8080/v1/AUTH_admin < X-Auth-Token: AUTH_tk64169e6bedb34452b56c5226c17c499b < Content-Type: text/html; charset=UTF-8 < X-Storage-Token: AUTH_tk64169e6bedb34452b56c5226c17c499b < Content-Length: 0 < Date: Tue, 30 Apr 2013 09:17:16 GMT <
  • Connection #0 to host 127.0.0.1 left intact
  • Closing connection #0

after that for the second cmmand i do : curl -v -H 'X-Auth-Token: tk64169e6bedb34452b56c5226c17c499b' http://127.0.0.1:8080/v1/AUTH_admin

i got :

"About to connect() to 127.0.0.1 port 8080 (#0) * Trying 127.0.0.1... connected

GET /v1/AUTH_admin HTTP/1.1 User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3 Host: 127.0.0.1:8080 Accept: / X-Auth-Token: tk64169e6bedb34452b56c5226c17c499b

< HTTP/1.1 401 Unauthorized < Content-Length: 131 < Content-Type: text/html; charset=UTF-8 < Date: Tue, 30 Apr 2013 09:44:03 GMT < * Connection #0 to host 127.0.0.1 left intact * Closing connection #0"

and

This server could not verify that you are authorized to access the document you requested

what do you think about ?? sorry for the disturbance :/

edit flag offensive delete link more

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-04-17 10:06:19 -0500

Seen: 273 times

Last updated: May 02 '13