consul-cluster-puppet icon indicating copy to clipboard operation
consul-cluster-puppet copied to clipboard

Running on Centos6

Open thbeh opened this issue 9 years ago • 8 comments

Hi, I found that your sample consul app very useful for learning consul. What changes need to be made if I intend to run on CentOS 6.6?

thbeh avatar Jul 15 '15 10:07 thbeh

There shouldn't be any real differences, the puppet modules take care of any differences.

I'd try swapping out the vagrant "box" with a centos version and seeing what happens :)

benschw avatar Jul 15 '15 16:07 benschw

Before moving to Centos6, I am encountering a couple of issues:

Error: curl -f -L -o /opt/staging/consul/consul.zip https://dl.bintray.com/mitchellh/consul/0.5.0_linux_amd64.zip returned 6 instead of one of [0]

If I ssh into the offending node, e.g. foo0, using sudo curl....I was able to get it work. But that means having to change file.pp in staging to include sudo. Is there something I can do without changing anything on the source of staging?

thbeh avatar Jul 15 '15 20:07 thbeh

Are you not running puppet with root?

benschw avatar Jul 15 '15 21:07 benschw

Are you saying I should run vagrant up using root?

thbeh avatar Jul 15 '15 21:07 thbeh

no, but on your vm puppet should be being run by root.

I think the problem is a bug with dnsmasq :-/ It looks like after being installed, names aren't resolving for a bit.

I don't have time right now to update the puppet, but if you reorder things so that dnsmasq is installed last it should solve your problem

benschw avatar Jul 16 '15 16:07 benschw

(a curl error code of 6 means there was a problem resolving the host)

http://curl.haxx.se/libcurl/c/libcurl-errors.html

benschw avatar Jul 16 '15 16:07 benschw

yes, i notice that the dnsmasq is breaking.

i broke the VMs down to a single consul and a node, dnsmasq is not resolving each other. Another question would be, don't the consul server needs dnsmasq too?

On Fri, Jul 17, 2015 at 4:03 AM, Ben Schwartz [email protected] wrote:

no, but on your vm puppet should be being run by root.

I think the problem is a bug with dnsmasq :-/ It looks like after being installed, names aren't resolving for a bit.

I don't have time right now to update the puppet, but if you reorder things so that dnsmasq is installed last it should solve your problem

— Reply to this email directly or view it on GitHub https://github.com/benschw/consul-cluster-puppet/issues/3#issuecomment-122003373 .

thbeh avatar Jul 16 '15 20:07 thbeh

You only need dnsmasq to discover with consul. The app node does a dns lookup on foo.service.consul, and dnsmasq routes *.consul lookups to the consul client agent running on localhost:5xxxx (I forget the port, but its not the default: 53)

So think of it aa a support feature for the app to find consul, not for consul to expose itself

benschw avatar Jul 18 '15 13:07 benschw