Ask Your Question
0

Swift: how to use CNAME_lookup middleware ?

asked 2013-04-17 09:13:26 -0500

mhu gravatar image

updated 2013-04-17 09:22:42 -0500

Has anyone ever used the http://docs.openstack.org/developer/swift/misc.html#module-swift.common.middleware.cname_lookup (CNAME_lookup middleware) for swift ? I have some trouble figuring out some use cases for it, as well as testing it.

So far I have deployed swift through devstack on a VM, installed and configured bind on the same VM for the domain swift.test. I am testing GETs with curl :

curl -v -H 'X-Auth-Token: XXXX' -H 'Host: demo.swift.test:8080' http://127.0.0.1:8080/v1/AUTH_YYYYYY

If CNAMElookup is not in the middleware pipeline, the request returns a 200 OK reply. If CNAMElookup isn't, the reply depends on whether my host is in my DNS configuration or not.

Anything I am missing here ?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-05-01 16:30:25 -0500

notmyname gravatar image

Correct, if I'm reading your question correctly. The cname_lookup middleware will allow you to white-label your Swift cluster for your users. It works especially well when you are also using the domain_remap middleware to allow your accounts and containers to be defined in the domain name.

edit flag offensive delete link more
0

answered 2013-05-02 03:35:47 -0500

mhu gravatar image

Thanks For the answer. During my tests I've come up with the following setup (very simplified but that's the gist of it):

  • 1 external DNS resolving *.mydomain to the swift server
  • 1 internal DNS, reachable by the swift server only, resolving container.mydomain to container.account.internaldomain

cnamelookup is configured to resolve addresses until it reaches an entry ending with internaldomain, and domainremap will map container.account.internaldomain to an URL like internaldomain/v1/account/container .

In the end, I obtain a configuration that allows me to query a container as a virtualhost, "a la S3".

Too bad it doesn't play well with the swift3 middleware, though.

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

Stats

Asked: 2013-04-17 09:13:26 -0500

Seen: 609 times

Last updated: May 02 '13