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

FW: Wildcard DNS for OpenShift Origin

From: lorenz vanthillo outlook com
To: pablo halamaj semperti com
Subject: RE: Wildcard DNS for OpenShift Origin
Date: Thu, 12 Nov 2015 15:26:19 +0100


[root ip-10-0-0-104 etc]# oc describe svc jenkins-1-centos7
Name:            jenkins-1-centos7
Namespace:        jenkins
Labels:            app=jenkins-1-centos7
Selector:        app=jenkins-1-centos7,deploymentconfig=jenkins-1-centos7
Type:            ClusterIP
Port:            8080-tcp    8080/TCP
Port:            50000-tcp    50000/TCP
Session Affinity:    None
No events.

I don't get a real specific error in my browser, it's just a 'server not found'. The pod is running fine. There is nothing wrong with the app because when I'm going in my bash of my own real PC and I'm doing:
52.18.247.x jenkins.apps.example.com

Than I can visit the app. 52.18.247.X is the IP of the node where my router is running.
Do I have to 'link' my DNS server with my OpenShift node (where the router is on). Because I don't see how they should work together at the moment. On my DNS server I did the whole configuration with the IP of that server. And on the openshift-server I did not describe the IP of the DNS server somewhere. So what configuration do I need to do, to let the DNS-server and the OpenShift-server work together?

Subject: Re: Wildcard DNS for OpenShift Origin
To: lorenz vanthillo outlook com; users lists openshift redhat com
From: pablo halamaj semperti com
Date: Thu, 12 Nov 2015 11:16:02 -0300

Hi Lorenz,

El 12/11/15 a las 10:55, Lorenz Vanthillo escribió:
Thanks, I did what you said: new ec2 instance (centos7). I installed dnsmasq en dit the configuration of /etc/resolve.conf and of /etc/dnsmasq.conf on the DNS-server.

[root ip-10-0-0-x centos]# dig @52.17.145.x jenkins.apps.example.com (a route to one of my applications)
<<>> DiG 9.9.4-RedHat-9.9.4-18.el7_1.5 <<>> @ jenkins.apps.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64268
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;jenkins.apps.example.com.    IN    A

jenkins.apps.example.com. 0    IN    A    52.17.145.x (The IP of my DNS-server)

;; Query time: 0 msec
;; WHEN: Thu Nov 12 13:49:38 UTC 2015
;; MSG SIZE  rcvd: 58

I get an answer so it seems to work but when I'm browsing to my app it does not work. Maybe because I don't have apache in the pod. But that's something what is not clear. It was working when I just described my IP and hostnames in /etc/hosts (on my real computer).
So I would think it should work.

So now I have an instance with the router, some apps with routes and an instance with the DNS-server.

Jenkins start an Application Server like Tomcat for Web access.

Can you show us the error you have when try to access the Jenkins' app?
Can you give us the information about the jenkins app ? Run

# oc describe svc "the name of your jenkins service" -o yaml

At least you should see a page with an Error 502 , from the router.


Subject: Re: Wildcard DNS for OpenShift Origin
To: lorenz vanthillo outlook com; users lists openshift redhat com
From: pablo halamaj semperti com
Date: Thu, 12 Nov 2015 10:29:42 -0300

Hi Lorentz,

The reply are  inline.

El 12/11/15 a las 10:14, Lorenz Vanthillo escribió:
I have OpenShift v3 installed on an Amazon EC2 instance. The OS is CentOS7. OpenShift contains a router and routes which makes it possible to access services by their hostname.
In my initial configuration I was working like this:
  • I linked a service and a hostname via a route.
  • On my own PC (not the server), I edited /etc/hosts and added the following:
    52.18.247.x myapp.apps.example.com
you should use another EC2 instance for DNSMASQ, an instance of 1 vCPU and 512MB of RAM should be enough.
After that , in you machine ( assuming is a linux ), change the /etc/resolv.conf to something like this ( is the public IP of the instance with DNSMASQ )

search apps.example.com

52.18.247.x is my public IP of the amazon instance where my router is running. This was working. So I could acces myapp.apps.example in my browser. But I knew this was not the best way to do it. So I wanted to set up a Wildcard for resolving this issue. I cleared my /etc/hosts on my real pc and went into my amazon instance:
yum install dnsmasq
dnsmasq is running on port 53.
vi /etc/dnsmasq.conf
Than I did a restart:
sudo service dnsmasq restart
But it is not working and I cannot visit my services (apps) in my browser. What am I doing wrong or do I forget to configure something?

All the step you point are OK.
For testing DNSMASQ you could do

# dig @ myapp.apps.example.com

The response should by the ip of the Node running the Router Docker.

users mailing list
users lists openshift redhat com

Hope it helps , regards

Pablo Halamaj
Arquitecto de Soluciones
San Martin 574 5º C1004AAL CABA
tel     : +54 11 5236 9939
móvil : +54 911 3689 9786

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