Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haproxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
haproxy
Commits
3290fcc4
Commit
3290fcc4
authored
Apr 20, 2019
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Galera related config should happen elsewhere
parent
c16a96ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
72 deletions
+1
-72
Makefile
Makefile
+1
-22
haproxy
haproxy
+0
-49
haproxy.groups
haproxy.groups
+0
-1
No files found.
Makefile
View file @
3290fcc4
all
:
haproxy-cfg
haproxy-config
all
:
haproxy-cfg
tar
xf haproxy-1.8.9.tar.gz
tar
xf haproxy-1.8.9.tar.gz
$(MAKE)
-C
haproxy-1.8.9
TARGET
=
linux2628
USE_PCRE
=
1
USE_PCRE_JIT
=
1
USE_OPENSSL
=
1
USE_ZLIB
=
1
USE_TFO
=
1
USE_SYSTEMD
=
1
$(MAKE)
-C
haproxy-1.8.9
TARGET
=
linux2628
USE_PCRE
=
1
USE_PCRE_JIT
=
1
USE_OPENSSL
=
1
USE_ZLIB
=
1
USE_TFO
=
1
USE_SYSTEMD
=
1
$(MAKE)
-C
haproxy-1.8.9
install
PREFIX
=
/usr
$(MAKE)
-C
haproxy-1.8.9
install
PREFIX
=
/usr
...
@@ -9,8 +9,6 @@ all: haproxy-cfg haproxy-config
...
@@ -9,8 +9,6 @@ all: haproxy-cfg haproxy-config
mkdir
-p
/etc/haproxy
mkdir
-p
/etc/haproxy
@
echo
"
$$
HAPROXY_CFG"
>
/etc/haproxy/haproxy.cfg
@
echo
"
$$
HAPROXY_CFG"
>
/etc/haproxy/haproxy.cfg
@
echo
"
$$
HAPROXY_CFG"
>
/etc/haproxy/haproxy.cfg.template
@
echo
"
$$
HAPROXY_CFG"
>
/etc/haproxy/haproxy.cfg.template
@
echo
"
$$
HAPROXY_CONFIG"
>
/etc/config/haproxy
install
-v
-Dm755
haproxy /usr/share/easycwmp/functions
install
-v
-Dm755
haproxy_discovery.sh /usr/bin
install
-v
-Dm755
haproxy_discovery.sh /usr/bin
install
-v
-Dm755
haproxy_stats.sh /usr/bin
install
-v
-Dm755
haproxy_stats.sh /usr/bin
sed
-e
'/^UserParameter=device\.product.*/a UserParameter=haproxy.stats[*],/usr/bin/haproxy_stats.sh $$1 $$2 $$3 $$4'
-i
/etc/zabbix_agentd.conf
sed
-e
'/^UserParameter=device\.product.*/a UserParameter=haproxy.stats[*],/usr/bin/haproxy_stats.sh $$1 $$2 $$3 $$4'
-i
/etc/zabbix_agentd.conf
...
@@ -22,24 +20,5 @@ define HAPROXY_CFG
...
@@ -22,24 +20,5 @@ define HAPROXY_CFG
global
global
log
/dev/log
local0
info
log
/dev/log
local0
info
stats
socket
/run/haproxy/info.sock
mode
666
expose-fd
listeners
level
user
stats
socket
/run/haproxy/info.sock
mode
666
expose-fd
listeners
level
user
listen
MariaDB
bind *
:
3306
mode tcp
log global
timeout
connect 10s
timeout
client 10800s
timeout
server 10800s
balance
source
option httpchk
default-server port 9000 inter 2s downinter 5s rise 3 fall 2 slowstart 60s maxconn 150 maxqueue 1 weight 100
endef
endef
export
HAPROXY_CFG
export
HAPROXY_CFG
haproxy-config
:
define
HAPROXY_CONFIG
config
wsrep
'galera'
option
cluster_address
''
endef
export
HAPROXY_CONFIG
haproxy
deleted
100755 → 0
View file @
c16a96ba
#!/bin/sh
#common_execute_method_param "$parameter" "$permission" "$get_cmd" "$set_cmd" "xsd:$type" "$forcedinform"
# $forcedinform should be set to 1 if the parameter is included in the inform message otherwise empty
# Default of $type = string
#############################
# Entry point functuons #
#############################
prefix_list
=
"
$prefix_list
$DMROOT
.HAProxy."
entry_execute_method_list
=
"
$entry_execute_method_list
entry_execute_method_root_HAProxy"
entry_execute_method_list_forcedinform
=
"
$entry_execute_method_list_forcedinform
entry_execute_method_root_HAProxy"
entry_execute_method_root_HAProxy
()
{
case
"
$1
"
in
""
|
"
$DMROOT
."
|
"
$DMROOT
.HAProxy."
*
)
common_execute_method_obj
"
$DMROOT
.HAProxy."
"0"
common_execute_method_param
"
$DMROOT
.HAProxy.GaleraClusterAddress"
"1"
"HAProxy_get_cluster_address"
"HAProxy_set_cluster_address"
return
0
;
;;
esac
return
$E_INVALID_PARAMETER_NAME
;
}
#######################################
# Data model parameters functions #
#######################################
HAProxy_get_cluster_address
()
{
echo
`
$UCI_GET
haproxy.galera.cluster_address
`
}
HAProxy_set_cluster_address
()
{
local
address
=
`
$UCI_GET
haproxy.galera.cluster_address
`
if
[
"
$address
"
!=
"
$1
"
]
;
then
$UCI_SET
haproxy.galera.cluster_address
=
"
$1
"
$UCI_COMMIT
cp
-f
/etc/haproxy/haproxy.cfg.template /etc/haproxy/haproxy.cfg
if
[
!
-z
"
$1
"
]
;
then
IFS
=
', '
read
-r
-a
array
<<<
"
$1
"
for
pos
in
"
${
!array[@]
}
"
do
let
"index=
$pos
+1"
echo
-e
"
\t
server
$index
${
array
[pos]
}
:3306 check"
>>
/etc/haproxy/haproxy.cfg
done
fi
systemctl reload haproxy
fi
}
haproxy.groups
View file @
3290fcc4
bin
bin
/lib/systemd/system/.*
/lib/systemd/system/.*
/usr/lib/tmpfiles.d/.*
/usr/lib/tmpfiles.d/.*
/usr/share/easycwmp/functions/.*
/usr/bin/.*
/usr/bin/.*
/usr/sbin/.*
/usr/sbin/.*
etc
etc
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment