Browse Source

Merge branch 'develop'

master
Teddy Cornaut 3 months ago
parent
commit
b7b269316a
2 changed files with 12 additions and 52 deletions
  1. 3
    0
      dicos/70_haproxy.xml
  2. 9
    52
      tmpl/haproxy_00-global.cfg

+ 3
- 0
dicos/70_haproxy.xml View File

@@ -22,6 +22,9 @@
22 22
         </family>
23 23
         <family name='HAProxy'>
24 24
             <variable name='haIpPublique' type='network' description="Adresse IP publique du serveur" mandatory='True'/>
25
+            <variable name='haNbProc' type='number' description="Nombre de processeurs du serveur -1" mandatory='True'>
26
+                <value>23</value>
27
+            </variable>
25 28
             <variable name='activer_haproxy_stats' type='oui/non' description="Activer les statistiques du HAProxy" mandatory='True'>
26 29
                 <value>non</value>
27 30
             </variable>

+ 9
- 52
tmpl/haproxy_00-global.cfg View File

@@ -8,7 +8,7 @@ global
8 8
     group        haproxy
9 9
     daemon
10 10
     maxconn      2000000
11
-    nbproc       23
11
+    nbproc       %%haNbProc
12 12
     cpu-map      auto:1/all 0-
13 13
 
14 14
     ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
@@ -59,59 +59,16 @@ listen stats
59 59
 #---------------------------------------------------------------------
60 60
 
61 61
 listen ssl
62
-    bind-process 2-23
62
+    bind-process 2-%%haNbProc
63 63
 
64
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 2
65
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 3
66
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 4
67
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 5
68
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 6
69
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 7
70
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 8
71
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 9
72
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 10
73
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 11
74
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 12
75
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 13
76
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 14
77
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 15
78
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 16
79
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 17
80
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 18
81
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 19
82
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 20
83
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 21
84
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 22
85
-    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 23
86
-
87
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 2
88
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 3
89
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 4
90
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 5
91
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 6
92
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 7
93
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 8
94
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 9
95
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 10
96
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 11
97
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 12
98
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 13
99
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 14
100
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 15
101
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 16
102
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 17
103
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 18
104
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 19
105
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 20
106
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 21
107
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 22
108
-    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process 23
64
+  %for %%proc in range(2, %%int(%%haNbProc)):
65
+    bind %%haIpPublique:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process %%proc
66
+  %end for
109 67
 
68
+  %for %%proc in range(2, %%int(%%haNbProc)):
69
+    bind %%adresse_ip_eth1:443   tfo ssl alpn h2,http/1.1 npn h2,http/1.1 crt %%server_pem process %%proc
70
+  %end for
71
+    
110 72
     option tcp-smart-connect
111 73
 
112 74
     server http 127.0.0.1:84 send-proxy-v2
113
-
114
-frontend http-in
115
-    bind %%haIpPublique:80
116
-    mode http
117
-    redirect scheme https code 301

Loading…
Cancel
Save