forked from zevenet/zlb
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New features: [system] seamless upgrade from Community Edition to Enterprise Improvements: [system] automatize grub-pc configuration update Bugfixes: [farms] fix debian buster apt sources Signed-off-by: nevola <[email protected]>
- Loading branch information
Showing
12 changed files
with
527 additions
and
372 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: zevenet | ||
Version: 5.21.0 | ||
Maintainer: RELIANOID <[email protected]> | ||
Architecture: amd64 | ||
Section: admin | ||
Priority: optional | ||
Description: RELIANOID Load Balancer Community Edition | ||
RELIANOID, formerly ZEVENET, is a Multilayered Aplication Delivery Controller (ADC) and high performance load balancer with an easy configuration, usability and user-friendly web GUI for layer 3, 4 and 7 networking management. | ||
Depends: nftables (>= 0.9.1), linux-headers-amd64 (>= 4.19+105), linux-image-amd64 (>= 4.19+105), rrdtool, libnet-netmask-perl, libproc-daemon-perl, libnetwork-ipv4addr-perl, librrds-perl, libio-interface-perl, libdata-validate-ip-perl, libpcap0.8, ntpdate, libfile-grep-perl, iputils-arping, openssl, unzip, libev4, libjson-perl, libjson-xs-perl, libcgi-session-perl, libauthen-simple-perl, libauthen-simple-passwd-perl, conntrack, liburi-perl, libtimedate-perl, libconfig-tiny-perl, snmpd, libnet-ssleay-perl, libnetaddr-ip-perl, libswitch-perl, libcgi-simple-perl, libunix-syslog-perl, monitoring-plugins, monitoring-plugins-common, net-tools, cherokee, pound, libregexp-ipv6-perl, nftlb, curl, zproxy (>= 0.9.0-5.13.0), libcrypt-openssl-x509-perl, certbot, liblwp-protocol-http-socketunixalt-perl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
#!/bin/bash | ||
############################################################################### | ||
# | ||
# ZEVENET Software License | ||
# This file is part of the ZEVENET Load Balancer software package. | ||
# | ||
# Copyright (C) 2014-today ZEVENET SL, Sevilla (Spain) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
############################################################################### | ||
|
||
GLOBALCF="/usr/local/zevenet/config/global.conf" | ||
GLOBALCFT="/usr/local/zevenet/share/global.conf.template" | ||
|
||
[ ! "$1" == "configure" ] && echo "Installation aborted $1 $2" && exit 1 | ||
[ "$1" == "configure" ] && echo "Completing the ZEVENET installation..." | ||
|
||
# upgrading global.conf | ||
/usr/local/zevenet/bin/checkglobalconf | ||
|
||
# load LB variables | ||
source /usr/local/zevenet/bin/load_global_conf | ||
load_global_conf | ||
|
||
# Enable root access through SSH | ||
SSHDCONFIG="/etc/ssh/sshd_config" | ||
if [[ `grep -c "^PermitRootLogin.*yes" $SSHDCONFIG` == '0' ]]; then | ||
sed -i -e 's/^PermitRootLogin.*/PermitRootLogin yes/' $SSHDCONFIG | ||
/etc/init.d/ssh reload 2> /dev/null | ||
fi | ||
|
||
# Disable services | ||
|
||
# SNMP service | ||
if [[ -f /etc/snmp/snmpd.conf && `grep -c '#zenlb' /etc/snmp/snmpd.conf` == '0' ]]; then | ||
/etc/init.d/snmpd stop | ||
update-rc.d snmpd disable | ||
cp /usr/local/zevenet/share/snmpd.conf.template /etc/snmp/snmpd.conf | ||
fi | ||
|
||
# Disable SNMP debugging messages in log | ||
if [[ `grep -c 'LSd' /etc/default/snmpd` == '1' ]]; then | ||
sed -i -e 's/LSd/LS6d/' /etc/default/snmpd | ||
fi | ||
|
||
# Start ssh server after zevenet service | ||
sed -i 's/^\# Required-Start:.*/# Required-Start:\t\$remote_fs \$syslog zevenet/g' /etc/init.d/ssh | ||
sed -i 's/^\# Required-Stop:.*/# Required-Stop:\t\$remote_fs \$syslog zevenet/g' /etc/init.d/ssh | ||
|
||
|
||
## Create configuration files | ||
|
||
# Move zlb-stop & zlb-start | ||
if [ ! -f $zlb_start_script ]; then | ||
cp $zlb_start_tpl $zlb_start_script | ||
fi | ||
if [ ! -f $zlb_stop_script ]; then | ||
cp $zlb_stop_tpl $zlb_stop_script | ||
fi | ||
|
||
# create Web server | ||
if [ ! -f "$http_server_cert" ]; then | ||
cp -rf $http_server_cert_tpl $http_server_cert | ||
fi | ||
if [ ! -f "$http_server_key" ]; then | ||
cp -rf $http_server_key_tpl $http_server_key | ||
fi | ||
|
||
# Install check_uplink | ||
ZBIN_PATH="/usr/local/zevenet/bin" | ||
LIBEXEC_PATH="/usr/lib/nagios/plugins" | ||
if [ ! -L ${LIBEXEC_PATH}/check_uplink ]; then | ||
ln -s ${ZBIN_PATH}/check_uplink ${LIBEXEC_PATH}/check_uplink | ||
fi | ||
|
||
# Apply all migrating scripts to ZEVENET | ||
MIG_DIR="/usr/local/zevenet/migrating/" | ||
for SCRIPT in `ls $MIG_DIR`; do ${MIG_DIR}$SCRIPT; done | ||
|
||
# Restarting ZEVENET service | ||
echo "ZEVENET will be unavailable while the service is restarting." | ||
/etc/init.d/zevenet stop | ||
/etc/init.d/zevenet start | ||
|
||
# Add ZEVENET Load Balancer service to boot process | ||
update-rc.d zevenet defaults | ||
|
||
# Setup motd.tail | ||
cp /etc/motd.tail /etc/motd | ||
if [ "`grep Debian /etc/issue`" != "" -o "`grep -i Zevenet /etc/issue`" != "" ]; then | ||
sed -i "s/.*Debian.*/RELIANOID Community Edition \\\n \\\l/g" /etc/issue | ||
fi | ||
|
||
# Set the cron service | ||
cp /usr/local/zevenet/share/zevenet.cron /etc/cron.d/zevenet | ||
/etc/init.d/cron reload | ||
|
||
# Change prompt color | ||
sed -i "s/1;30m/0;37m/g" /etc/bash.bashrc 2> /dev/null | ||
|
||
# Configure apt repository | ||
perl -E " require Zevenet::System::Packages; &setSystemPackagesRepo();" | ||
sed -i 's/ oldstable/ buster/g' /etc/apt/sources.list | ||
|
||
## Run checkupdates to update message | ||
$checkupdates_bin > /dev/null | ||
|
||
echo "RELIANOID ADC installation completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/workdir/ | ||
/build-context/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.