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

Hosting MySQL images in OpenShift Origin



Hi,

I am trying to host MySQL containers inside OpenShift. The goal would be that projects could connect to a given container, setup a database for themselves remotely and execute their integration tests.

The first question could be: is this something OpenShift could be used for or not?

For my installation I created a project with a single MySQL app (mysql:latest).

On the server, I can connect to the database via TCP (--protocol=tcp):
* via the IP of the pod
* via the IP of the service (that was auto created for me)

Of course the goal would be to access the database from our corporate network.

After digesting many threads on Stackoverflow, especially [1] and [2] I think the conclusion is that only
port 80/443/8000/8443 could be accessed externally.

I know of services, routes and port-forwarding, but probably I did not yet understand when they should be used.

I can use port-forwarding to map 3306 to a local port, then I access the database via "-h localhost".
I0302 09:20:01.133388    9195 portforward.go:213] Forwarding from 127.0.0.1:49220 -> 3306
I0302 09:20:01.133516    9195 portforward.go:213] Forwarding from [::1]:49220 -> 3306
But I assume I cannot use this to expose the port because of what I have found in [1] and [2].

Routes I learned could be used to match a path, but I think that is better used for HTTP services.

Frankly I did not yet understand the role of a Router in this context.

Could someone please let me know if it is possible to do what I want or not? RTFM is perfect for me, provided I can see a specific example for exposing a TCP port somehow. It is possible the solution is there but I did not realize.

I am using Origin: 1.1.3.

Thanks in advance,
Dave

[1] http://stackoverflow.com/questions/33985138/how-to-host-and-access-murmur-mumble-server-on-openshift-without-port-forwardi?rq=1
[2] http://stackoverflow.com/questions/33838765/openshift-v3-confusion-on-services-and-routes

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