[Openstack] how to use swift in another container

Matthew Oliver matt at oliver.net.au
Tue Oct 24 22:53:40 UTC 2017


Interesting. I'm not a docker expert, but it's an interesting idea. But is
only a 1 replica, 1 device system. maybe if it was extended you so you add
more devices or more containers to grow the cluster, that could be cool.
The ring management would be the interesting part. And if you want to grow
it you may want to give it some real disks so how do they plumb.
But like the author said, it's a good POC, and could be expanded.

Now how can you access it from another container. The -p command says to
publish the docker container's port 8080 to your hosts 12345 port on all
interfaces. So pointing at the host machine on port 12345 will actually
connect to port 8080 on the docker container. This means if you want the
other container to talk to the swift one, just hit up either the host's IP
on 12345 or the swift container's IP on port 8080. Noting I don't know if
you need to look at iptables or routing on the host to do the latter.

Matt

On Wed, Oct 25, 2017 at 8:30 AM, Jaln <valiantljk at gmail.com> wrote:

> Hello,
>
> I have installed swift in a docker container, and opened another
> container, where I want to use swift.
>
> Here is how I configured swift container:
> I followed https://hub.docker.com/r/morrisjobke/docker-swift-onlyone/
>
> and launched this swift container with:
>
> docker run -d -p 12345:8080 --volumes-from SWIFT_DATA -t morrisjobke/docker-swift-onlyone
>
>
> Then, I can connect to swift from host, but not from another container,
> e.g.,
>
>
> swift -A http://127.0.0.1:12345/auth/v1.0 -U test:tester -K testing stat
>
>
>
> While in another container:
> docker run -it ubuntu bash
>
> How can I use swift?
>
> Best,
> Jialin
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/
> openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/
> openstack
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171025/d1e11f3a/attachment.html>


More information about the Openstack mailing list