|
1 | 1 |
|
2 |
| -# Haproxy with lua on centos:latest |
| 2 | +**THIS REPO IS MOVED TO GITLAB** |
3 | 3 |
|
4 |
| -Thanks to https://hub.docker.com/_/haproxy/ for the base docker file |
| 4 | +https://gitlab.com/aleks001/haproxy |
5 | 5 |
|
6 |
| -The size of the image is ~360 MB |
7 |
| - |
8 |
| -# Docker |
9 |
| - |
10 |
| -to build run this. |
11 |
| - |
12 |
| -``` |
13 |
| -docker build -t my-haproxy . |
14 |
| -``` |
15 |
| - |
16 |
| -for a shell run this. |
17 |
| - |
18 |
| -``` |
19 |
| -docker run --rm -it --name my-running-haproxy -e HTTP_BIND_PORT=8080 -e MONITOR_BIND_PORT=8081 my-haproxy /bin/bash |
20 |
| -``` |
21 |
| - |
22 |
| -In the container then see thats in haproxy ;-) |
23 |
| - |
24 |
| -``` |
25 |
| -haproxy -vv |
26 |
| -
|
27 |
| -HA-Proxy version 1.6.3 2015/12/25 |
28 |
| -Copyright 2000-2015 Willy Tarreau <[email protected]> |
29 |
| -
|
30 |
| -Build options : |
31 |
| - TARGET = linux2628 |
32 |
| - CPU = generic |
33 |
| - CC = gcc |
34 |
| - CFLAGS = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement |
35 |
| - OPTIONS = USE_LINUX_SPLICE=1 USE_ZLIB=1 USE_OPENSSL=1 USE_LUA=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_TFO=1 |
36 |
| -
|
37 |
| -Default settings : |
38 |
| - maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200 |
39 |
| -
|
40 |
| -Encrypted password support via crypt(3): yes |
41 |
| -Built with zlib version : 1.2.7 |
42 |
| -Compression algorithms supported : identity("identity"), deflate("deflate"), raw-deflate("deflate"), gzip("gzip") |
43 |
| -Built with OpenSSL version : OpenSSL 1.0.1e-fips 11 Feb 2013 |
44 |
| -Running on OpenSSL version : OpenSSL 1.0.1e-fips 11 Feb 2013 |
45 |
| -OpenSSL library supports TLS extensions : yes |
46 |
| -OpenSSL library supports SNI : yes |
47 |
| -OpenSSL library supports prefer-server-ciphers : yes |
48 |
| -Built with PCRE version : 8.32 2012-11-30 |
49 |
| -PCRE library supports JIT : yes |
50 |
| -Built with Lua version : Lua 5.3.2 |
51 |
| -Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_FREEBIND |
52 |
| -
|
53 |
| -Available polling systems : |
54 |
| - epoll : pref=300, test result OK |
55 |
| - poll : pref=200, test result OK |
56 |
| - select : pref=150, test result OK |
57 |
| -Total: 3 (3 usable), will use epoll. |
58 |
| -``` |
59 |
| - |
60 |
| -that's cool ;-) |
61 |
| - |
62 |
| -# OpenShift |
63 |
| - |
64 |
| -oc new-project haproxy-test |
65 |
| -oc create -f haproxy-osev3.yaml |
66 |
| -oc expose svc haproxy-test |
67 |
| -oc get pods |
68 |
| - |
69 |
| -To get the haproxy logs you must select the socklog container |
70 |
| -oc logs -f -c ng-socklog `<YOUR_POD>` |
71 |
| - |
72 |
| -a log enty looks like this. |
73 |
| - |
74 |
| -``` |
75 |
| -[al@localhost haproxy]$ oc logs -f -c hx-socklog haproxy-test-5-6yiyp |
76 |
| -listening on 0.0.0.0:8514, starting. |
77 |
| -10.1.4.1: local0.notice: Feb 28 10:08:54 haproxy[1]: Proxy http-in started. |
78 |
| -10.1.4.1: local0.notice: Feb 28 10:08:54 haproxy[1]: Proxy google started. |
79 |
| -10.1.4.1: local0.info: Feb 28 10:11:40 haproxy[1]: Connect from 10.1.2.1:43700 to 10.1.4.77:8080 (http-in/HTTP) |
80 |
| -``` |
81 |
| - |
82 |
| -# TODOs for a real setup |
83 |
| -- clone this repo |
84 |
| -- copy your config and adopt it to the Openshift setup |
85 |
| -- I'm sure there are lot more TODOs ;-) |
| 6 | +**DONT USE IT** |
0 commit comments