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 <[email protected]> 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: [email protected]
>
> On Wed, Feb 10, 2016 at 2:51 PM, Ben Parees <[email protected]> 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 <[email protected]>
>> 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: [email protected]
>>>
>>> On Wed, Feb 10, 2016 at 1:34 PM, Clayton Coleman <[email protected]>
>>> 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 <[email protected]>
>>>> 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: [email protected]
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> [email protected]
>>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>
>>
>>
>> --
>> Ben Parees | OpenShift
>>
>

_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to