Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Provide Fedora setup instructions #5053

Open
ncoghlan opened this issue Oct 20, 2015 · 21 comments
Open

Provide Fedora setup instructions #5053

ncoghlan opened this issue Oct 20, 2015 · 21 comments

Comments

@ncoghlan
Copy link

The Vagrant setup instructions unfortunately don't work on Fedora: http://fabric8.io/guide/getStarted/vagrant.html

Specifically, the local DNS setup doesn't work, which means the reader is left completely on their own figuring out what to do about it.

@gashcrumb
Copy link
Contributor

I have it working here via a global dnsmasq instance, let me take a quick gander though at a simpler setup, will document it here and then we can get that rolled into the docs...

@gashcrumb
Copy link
Contributor

Okay, here's the raw steps that should work for a typical Fedora installation where network connections are managed by network manager, BTW you can do this even after the vagrant image is running:

  1. Edit /etc/NetworkManager/NetworkManager.conf and enable DNS caching under the [main] section, for example:
[main]
plugins=ifcfg-rh,ibft
dns=dnsmasq
  1. Add the landrush config to NetworkManager's dnsmasq configuration under /etc/NetworkManager/dnsmasq.d in a file called vagrant-landrush.conf:
server=/vagrant.f8/127.0.0.1#10053
  1. Restart NetworkManager via systemctl restart NetworkManager

Doing a dig fabric8.vagrant.f8 should give you the proper answer at this point:

] dig fabric8.vagrant.f8

; <<>> DiG 9.10.2-P4-RedHat-9.10.2-5.P4.fc22 <<>> fabric8.vagrant.f8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40548
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;fabric8.vagrant.f8.        IN  A

;; ANSWER SECTION:
fabric8.vagrant.f8. 0   IN  A   172.28.128.4

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Oct 20 10:48:49 EDT 2015
;; MSG SIZE  rcvd: 52

@gashcrumb
Copy link
Contributor

@ncoghlan let me know if that works for you and I'll get the docs updated, thanks!

@ncoghlan
Copy link
Author

Unfortunately not. It did change /etc/resolv.conf to use the local resolver, but it only changed the dig error message from NXDOMAIN to the following:

$ dig fabric8.vagrant.f8

; <<>> DiG 9.10.3-RedHat-9.10.3-1.fc23 <<>> fabric8.vagrant.f8
;; global options: +cmd
;; connection timed out; no servers could be reached

Normal DNS lookups are working fine, it's only the local lookup that is having problems. The landrush setting looks like it should be right:

$ cat /etc/NetworkManager/dnsmasq.d/vagrant-landrush 
server=/vagrant.f8/127.0.0.1#10053

@ncoghlan
Copy link
Author

There doesn't appear to be anything listening on port 10053, so it may be a problem with landrush not running correctly.

@gashcrumb
Copy link
Contributor

Ah yeah, that'd definitely be a problem... You should see landrush initialize as part of vagrant up, be worth validating that there's no obvious errors from that in the output.

@ncoghlan
Copy link
Author

I'm trying again, having explicit started vagrant landrush start before running vagrant up.

SELinux is in permissive mode, so if it still doesn't work, then the remaining likely culprits would be:

  • a compatibility issue with the vagrant-libvirt backend
  • a compatibility issue with running vagrant as root (since the libvirt vagrant backend uses the system virt session)

@gashcrumb
Copy link
Contributor

Gotcha. I'm still running with the VirtualBox backend here since originally the vagrant image didn't support libvirt.

@ncoghlan
Copy link
Author

Either setting up the local resolver or starting landrush explicitly appears to have made things worse - vagrant up is now getting stuck at "Waiting for domain to get an IP address...".

I'll keep digging tomorrow.

@ncoghlan
Copy link
Author

Retrying again today, the landrush daemon again didn't start, and there wasn't any output at all relating to landrush in the vagrant up output.

Further investigation found vagrant-landrush/landrush#20, so it looks like anything based on landrush simply won't work with the libvirt backend for the time being.

@strzibny has a PR adding vagrant-libvirt support at vagrant-landrush/landrush#124

@ncoghlan
Copy link
Author

I'm trying to figure out from the OpenShift console (which has its IP address displayed during vagrant up) what the IP address of fabric8.vagrant.f8 would be, so I can add it to dnsmasq manually, but none of the addresses I can find will resolve from the host.

@jimmidyson
Copy link
Contributor

It should be the public IP of the VM - if you're using the vagrant setup in fabric8 that would be 172.28.128.4.

@ncoghlan
Copy link
Author

That's coming back as "503 service unavailable", so I'm guessing the failure of the DNS resolution is meaning some latter aspect of the Fabric8 setup isn't executing properly.

I can't see any obvious errors in the vagrant up output or the OpenShift console, though.

@jimmidyson
Copy link
Contributor

What does oc get routes show? The host field in there needs to match fabric8.vagrant.f8 for the Vagrant box - that should be handled on vagrant up.

@ncoghlan
Copy link
Author

@jimmidyson explained on IRC that the OpenShift router needs the hostname in order to route the request to the correct service, so without the landrush/libvirt integration, it's necessary to add the appropriate entry to /etc/hosts.

@ncoghlan
Copy link
Author

I think that means the near term Fedora instructions are going to need to be something like "Edit /etc/hosts and add a line like:

172.28.128.4 fabric8.vagrant.f8 vagrant.f8

With any other services also added manually to that line.

@jimmidyson
Copy link
Contributor

Only for fedora & libvirt - landrush works fine with virtualbox afaik.

@ncoghlan
Copy link
Author

That's a good point, so a better near term option might be to recommend using VirtualBox even on Fedora, and point out the manual workaround for folks using the native libvirt backend.

@strzibny
Copy link

@ncoghlan so whats missing in landrush if my patch got merged? can I be of any help here?

@jimmidyson
Copy link
Contributor

@strzibny Integration with the libvirt dnsmasq server would be great.

@oscerd
Copy link
Member

oscerd commented Dec 27, 2015

I have similar problem on Centos 7. I have to add addresses manually in /etc/hosts

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants