Hi Tien,

You just need to create a passthrough route like this:

https://docs.openshift.com/container-platform/3.9/architecture/networking/routes.html#passthrough-termination

For it to work, your swing client needs to use SNI (server name
identification), so that the OpenShift router knows what you're trying to
connect to.  A bit of quick googling suggests that Java 7 supports that,
but it depends if the RMI SSL Client uses SNI or not.

Then you'd need to tell your swing clients to connect to RMI on port 443,
ie <openshift router hostname>:443. This is because that is what port the
router listens on.

Then the router will do the normal things like redirecting the traffic to
your service on whatever port your RMI server is actually running on.

In this passthrough mode, you're essentially using the router as a TCP load
balancer.

I think it has a fair chance of working.

Good luck.

Thanks,

Joel

On Thu, May 3, 2018 at 1:40 AM Tien Hung Nguyen <tienhng.ngu...@gmail.com>
wrote:

> Currently, our application is already running on Docker through RMI over
> SSL. Therefore, we are able to connect our client to the server via SSL and
> RMI using Docker.
>
> What do we have to do in order to make it work with OpenShift, now?
>
> 2018-05-02 16:34 GMT+02:00 Joel Pearson <japear...@agiledigital.com.au>:
>
>> Selectors refer to labels, so it’d be
>> deploymentconfig.metadata.labels.name
>>
>> SSL/TLS means the client has to support it too. So if there is some
>> option to run RMI over SSL/TLS then it could work pretty easily. But if
>> it’s not possible to run server and client that way then yes, nodeports
>> will be easier. Otherwise I think there might be other Ingress options. But
>> I’ve never used them.
>> On Thu, 3 May 2018 at 12:14 am, Tien Hung Nguyen <
>> tienhng.ngu...@gmail.com> wrote:
>>
>>> Thank you for the response.
>>>
>>> How can I set up SSL/TLS as a connection method on OpenShift that my
>>> Client connects through SSL/TLS to the server? Is that done on the
>>> OpenShift router or where can I do the settings?
>>>
>>> Otherwise, I think NodePorts are the easier solution to establish a
>>> connection between Client-Server using RMI. In this case, do I just have to
>>> specify the service with the proper NodePort as the property like this
>>> example, where the selector.name is the name of the
>>> deploymentConfig.metadata.name? :
>>>
>>> apiVersion: v1
>>> kind: Service
>>> metadata:
>>>   name: mysql
>>>   labels:
>>>     name: mysql
>>> spec:
>>>   type: NodePort
>>>   ports:
>>>     - port: 3036
>>>       nodePort: 30036
>>>       name: http
>>>   selector:
>>>     name: mysql
>>>
>>>
>>>
>>>
>>>
>>> 2018-05-02 15:53 GMT+02:00 Joel Pearson <japear...@agiledigital.com.au>:
>>>
>>>> If you're using SSL/TLS you could traverse the Router by use
>>>> Passthrough.  Otherwise, you have to use NodePorts on a Service or
>>>> something like that.  The Router is generally only really for HTTP, but
>>>> with passthrough SSL/TLS just about anything could be running in the pod.
>>>>
>>>> On Wed, May 2, 2018 at 10:52 PM Tien Hung Nguyen <
>>>> tienhng.ngu...@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> we have a application, which is actually running on
>>>>> Wildfly 12.0.0.Final via Docker.
>>>>> Now, we would like to put our application on OpenShift with the
>>>>> existing Dockerfile.
>>>>>
>>>>> However, our client is using RMI to connect connect to the server. Is
>>>>> it still possible to run our application on OpenShift while using RMI for
>>>>> the client-server connection? If yes, how should we configure the client
>>>>> and the router of OpenShift to connect to the server?
>>>>>
>>>>> At the moment our java client is using the hostname:port in order to
>>>>> connect to the server running on Docker.
>>>>>
>>>>> Regards,
>>>>> Tien
>>>>>
>>>>> Note: Our application is not a web application, but it is java swing
>>>>> application (desktop application) which uses RMI to connect to the server.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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

Reply via email to