[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Exposing Host port to docker image in openshift



The name of the service will be the local DNS name your clients talk to - if you call it "db" then the MySQL client in your container would want to connect to db:3306

You don't need to expose the host ports either.

On Feb 10, 2016, at 9:54 AM, David Strejc <david strejc gmail com> wrote:

No it doesn't.

So I should setup a service for MySQL Galera Cluster? Than every application will be able to acces it at its own Node? 

David Strejc
t: +420734270131

On Wed, Feb 10, 2016 at 3:15 PM, Clayton Coleman <ccoleman redhat com> wrote:
You would set up a service for mysql and then access the service.
Does mysql need to be available outside the cluster?

On Wed, Feb 10, 2016 at 9:05 AM, David Strejc <david strejc gmail com> wrote:
> Using IP of Node was think which I was trying to avoid. I am trying to build
> HA cluster and when application reaches Node via IP addres there will have
> to be some HA Proxy in front of MySQL.
>
> When I will use hostpath with socket I can reach a way how to propagate
> MySQL through socket and on every Node it will be the same so if one node
> fails application get rescheduled and than
> it again can reach MySQL through socket.
>
> David Strejc
> t: +420734270131
> e: david strejc gmail com
>
> On Wed, Feb 10, 2016 at 2:51 PM, Ben Parees <bparees redhat com> wrote:
>>
>> You should be able to access the node's mysql port from within the
>> container w/o doing anything special, just providing the node host/ip+port
>> to the container.
>>
>> For the mysql socket, you'd have to mount it into the pod/container as a
>> HostPath volume, I think.
>>
>>
>> On Wed, Feb 10, 2016 at 7:36 AM, David Strejc <david strejc gmail com>
>> wrote:
>>>
>>> I got different setup.
>>>
>>> I have Node with MySQL installed on it (it is MariaDB galera  cluster) -
>>> as my scenario consists of five nodes each running Open Shift, GlusterFS and
>>> MariaDB directly on Node.
>>>
>>> What I want is to expose Node port (3306) or Node MariaDB socket INTO
>>> docker container.
>>>
>>> Is this possible?
>>>
>>> David Strejc
>>> t: +420734270131
>>> e: david strejc gmail com
>>>
>>> On Wed, Feb 10, 2016 at 1:34 PM, Clayton Coleman <ccoleman redhat com>
>>> wrote:
>>>>
>>>> You want the MySQL container to be exposed on the host address?  Or you
>>>> want another non-MySQL container to be able to access the MySQL container?
>>>>
>>>> On Feb 10, 2016, at 7:04 AM, David Strejc <david strejc gmail com>
>>>> wrote:
>>>>
>>>> Dear all,
>>>>
>>>> I have MySQL cluster running on all nodes of Open Shift and I need to
>>>> expose 3306 port FROM Host into docker container - or propagate
>>>> /var/run/mysqld/mysqld.socket into docker container.
>>>>
>>>> Is this possible with Open Shift?
>>>> David Strejc
>>>> t: +420734270131
>>>> e: david strejc gmail com
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users lists openshift redhat com
>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> users lists openshift redhat com
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>
>>
>>
>> --
>> Ben Parees | OpenShift
>>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]