Skip to content

Commit 7ef79b1

Browse files
committed
[hue-ha] Adding script
1 parent cdf3e91 commit 7ef79b1

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

hue-ha/howto.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
1. Install rsyslogd, edit its config file (/etc/rsyslog.conf), add the following lines at the very bottom, then restart rsyslogd.
2+
$ModLoad imudp $UDPServerAddress 127.0.0.1 $UDPServerRun 514
3+
4+
2. Add the following to /etc/rsyslog.d/haproxy.conf:
5+
local6.* /var/log/haproxy.log
6+
7+
3. Create the file /tmp/haproxy.conf and add the following lines to it:
8+
9+
global
10+
11+
daemon
12+
13+
nbproc 1
14+
15+
maxconn 100000
16+
17+
log 127.0.0.1 local6 debug
18+
19+
defaults
20+
21+
option http-server-close
22+
23+
mode http
24+
25+
timeout http-request 5s
26+
27+
timeout connect 5s
28+
29+
timeout server 10s
30+
31+
timeout client 10s
32+
33+
listen Hue 0.0.0.0:80
34+
35+
log global
36+
37+
mode http
38+
39+
stats enable
40+
41+
balance source
42+
43+
server hue1 hue-ha-test1-1.ent.cloudera.com:8888 cookie ServerA check inter 2000 fall 3
44+
server hue2 hue-ha-test1-2.ent.cloudera.com:8888 cookie ServerB check inter 2000 fall 3
45+
46+
4. Download and gunzip HAProxy from here: http://haproxy.1wt.eu/download/1.4/bin/haproxy-1.4.24-pcre-40kses-linux-i586.stripped.gz.
47+
48+
5. Run ./haproxy-1.4.24-pcre-40kses-linux-i586.stripped -f /tmp/haproxy.conf
49+
50+
6. Goto localhost:7000 and see that Hue is running. Show /var/log/haproxy.log.
51+
52+
7. Go to http://hue-ha-test1-1.ent.cloudera.com:7180/ (admin:admin) and stop the Hue instance that you're on (probably will have to stop each instance to figure that out).
53+
54+
8. Go to Hue (it should be down once). Refresh and show Hue is back up. Show /var/log/haproxy.log.
55+

0 commit comments

Comments
 (0)