From b0a414c1051d92f964a49304d260e8a35f47a31d Mon Sep 17 00:00:00 2001 From: root Date: Thu, 15 Nov 2012 14:17:15 -0500 Subject: [PATCH] Add full DNS support for the cluster. Includes automatic generation of zone files and configures lvs servers for master and slave. --- .gitignore | 3 + GenaSYS.sh | 68 ++++++++++-- README.txt | 154 ++++++++++++++++++++++++---- templates/interfaces | 4 +- templates/lvs/bind/named.conf.local-master | 19 ++++ templates/lvs/bind/named.conf.local-slave | 19 ++++ templates/lvs/bind/zonefile-footer | 19 ++++ templates/lvs/bind/zonefile-footer-prefixed | 19 ++++ templates/lvs/bind/zonefile-header | 17 +++ templates/lvs/bind/zonefile-header-prefixed | 17 +++ templates/lvs/interfaces | 16 +-- 11 files changed, 318 insertions(+), 37 deletions(-) create mode 100644 templates/lvs/bind/named.conf.local-master create mode 100644 templates/lvs/bind/named.conf.local-slave create mode 100644 templates/lvs/bind/zonefile-footer create mode 100644 templates/lvs/bind/zonefile-footer-prefixed create mode 100644 templates/lvs/bind/zonefile-header create mode 100644 templates/lvs/bind/zonefile-header-prefixed diff --git a/.gitignore b/.gitignore index 2b00413..a987bac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .GenaSYS.sh +next.gapines.org_genasys.conf custom/ ssl_cert/ config/ +TODO +.GenaSYS.sh-old diff --git a/GenaSYS.sh b/GenaSYS.sh index 7b03286..ce660d4 100755 --- a/GenaSYS.sh +++ b/GenaSYS.sh @@ -26,7 +26,7 @@ SYNOPSIS_="$NAME_" REQUIRES_="standard GNU commands, apt, dpkg" VERSION_="0.96" - DATE_="2010-09-18; last update: 2012-11-10" + DATE_="2010-09-18; last update: 2012-11-14" AUTHOR_="Andy Witter " URL_="http://evergreen-ils.org" CATEGORY_="devel" @@ -62,6 +62,7 @@ OSRF_USERNAME="opensrf" DB_USERNAME="evergreen" #DRONECOUNT="2" TMPHOSTS="/tmp/tmphost.txt" +TMPZONEFILE="/tmp/tmpzonefile.txt" TMPOSRFNODES="/tmp/tmposrfnodes" TMPOPENSRF_XML="/tmp/tmpopensrf.xml" PSQL_VERSION="9.1" @@ -391,7 +392,7 @@ echo # else # REPORTS_NFS_HOSTNAME="${CHOSEN_REPORTS_NFS_HOSTNAME}" #fi -echo;echo -e $COL_BR_BLUE"Setting up reports output NFS share on"$COL_RESET $COL_BR_GREEN"${REPORTS_NFS_HOSTNAME}.${CLUSTERDOMAINNAME}"$COL_RESET +echo;echo -e $COL_BR_BLUE"Setting up reports output NFS share on"$COL_RESET $COL_BR_GREEN"${CHOSEN_REPORTS_NFS_HOSTNAME}.${CLUSTERDOMAINNAME}"$COL_RESET sleep 2 } @@ -744,6 +745,7 @@ if [ -z "$HOSTNAME_PREFIX" ] || [ "$USE_CONFIG_FILE" == "0" ] then Get_Hostname_Prefix fi +Write_Config_File USE_HOSTNAME_PREFIX Write_Config_File HOSTNAME_PREFIX if [ -z $USE_CA_CERT ] || [ "$USE_CONFIG_FILE" == "0" ] @@ -1042,16 +1044,20 @@ for LVS in $MACHINES_LVS_ONLY done -### Start hosts file configuration. +### Start hosts and DNS zone file configuration. if [ "$USE_HOSTNAME_PREFIX" = "y" ] || [ "$USE_HOSTNAME_PREFIX" = "Y" ] then cp $TEMPLATEDIR/hosts-footer-prefixed /tmp/hosts-footer + cp "$TEMPLATEDIR/lvs/bind/zonefile-footer-prefixed" /tmp/zonefile-footer sed -i "s^PREFIX^$HOSTNAME_PREFIX^g" /tmp/hosts-footer + sed -i "s^PREFIX^$HOSTNAME_PREFIX^g" /tmp/zonefile-footer else cp $TEMPLATEDIR/hosts-footer /tmp + cp "$TEMPLATEDIR/lvs/bind/zonefile-footer" /tmp fi sed -i "s^Priv_NET^${PRIVATENET}^g" /tmp/hosts-footer sed -i "s^ClusterDomainName^${CLUSTERDOMAINNAME}^g" /tmp/hosts-footer +sed -i "s^Priv_NET^${PRIVATENET}^g" /tmp/zonefile-footer ### Start reports output configuration. echo @@ -1076,6 +1082,7 @@ if [ ! -z "$REPORTS_NFS_HOSTNAME" ] ADD_REPORTS_SHARE="1" REPORTS_NFS_HOSTNAME_IP="${PRIVATENET}.161" sed -i "9a\\${PRIVATENET}.161\t${REPORTS_NFS_HOSTNAME}.${CLUSTERDOMAINNAME} ${REPORTS_NFS_HOSTNAME}" /tmp/hosts-footer + sed -i "9a\\${REPORTS_NFS_HOSTNAME}\tA\t${PRIVATENET}.161" /tmp/zonefile-footer fi fi @@ -1110,26 +1117,32 @@ CLUSTER_TLD="$(echo $CLUSTERDOMAINNAME |awk -F"." '{ print $NF }')" ######## Create Output Tree ######### ######## ------------------ ######### -### Prepare global hosts temp file. +### Prepare global hosts temp file and DNS zone file. [ -e "$TMPHOSTS" ] && rm -f "$TMPHOSTS" +[ -e "$TMPZONEFILE" ] && rm -f "$TMPZONEFILE" [ -e "$TMPOSRFNODES" ] && rm -f "$TMPOSRFNODES" if [ "$USE_HOSTNAME_PREFIX" = "y" ] || [ "$USE_HOSTNAME_PREFIX" = "Y" ] then - cat $TEMPLATEDIR/hosts-header-prefixed > "$TMPHOSTS" + cat "$TEMPLATEDIR/hosts-header-prefixed" > "$TMPHOSTS" + cat "$TEMPLATEDIR/lvs/bind/zonefile-header-prefixed" > "$TMPZONEFILE" sed -i "s^PREFIX^$HOSTNAME_PREFIX^g" "$TMPHOSTS" + sed -i "s^PREFIX^$HOSTNAME_PREFIX^g" "$TMPZONEFILE" else cat $TEMPLATEDIR/hosts-header > "$TMPHOSTS" + cat "$TEMPLATEDIR/lvs/bind/zonefile-header" > "$TMPZONEFILE" fi -### Add lvs servers entry to the global hosts file +### Add lvs servers entry to the global hosts file and DNS zone file. NUM=0 for LVS_SERVERS in $MACHINES_LVS_ONLY do ((NUM++)) #echo "$LVS01_PRIVATE_IP $LVS_SERVERS.${CLUSTERDOMAINNAME} $LVS_SERVERS " >> "$TMPHOSTS" eval echo "\$LVS0${NUM}_PRIVATE_IP $LVS_SERVERS.${CLUSTERDOMAINNAME} $LVS_SERVERS " >> "$TMPHOSTS" + eval echo "$LVS_SERVERS A \$LVS0${NUM}_PRIVATE_IP" >> "$TMPZONEFILE" done + ### set the name of the network config file. NETCFGFILE="$OUTDIR/${CLUSTERDOMAINNAME}_network_config.txt" @@ -1232,6 +1245,9 @@ for BRICK in $(seq $BRICKCOUNT) eval echo "\$BRICKHOSTNAME${BRICK}-head" > ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/hostname eval echo "\$BRICKHOSTNAME${BRICK}-head" >> $TMPOSRFNODES eval echo "\$BRICKHOSTNAME${BRICK}_HEAD_IP \$BRICKHOSTNAME${BRICK}-head.${CLUSTERDOMAINNAME} public.\$BRICKHOSTNAME${BRICK}-head.${CLUSTERDOMAINNAME} private.\$BRICKHOSTNAME${BRICK}-head.${CLUSTERDOMAINNAME} \$BRICKHOSTNAME${BRICK}-head" >> $TMPHOSTS + eval echo "\$BRICKHOSTNAME${BRICK}-head A \$BRICKHOSTNAME${BRICK}_HEAD_IP" >> $TMPZONEFILE + eval echo "public.\$BRICKHOSTNAME${BRICK}-head A \$BRICKHOSTNAME${BRICK}_HEAD_IP" >> $TMPZONEFILE + eval echo "private.\$BRICKHOSTNAME${BRICK}-head A \$BRICKHOSTNAME${BRICK}_HEAD_IP" >> $TMPZONEFILE eval echo "/openils/var/data/offline \$BRICKHOSTNAME${BRICK}_HEAD_IP\(rw,sync,no_subtree_check\)" >> /tmp/exports eval echo "/storage/reports-output \$BRICKHOSTNAME${BRICK}_HEAD_IP\(ro,sync,no_subtree_check\)" >> /tmp/exports_reporter printf ")\n" >> ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/openils/conf/.oils_brick.cfg @@ -1336,6 +1352,9 @@ for BRICK in $(seq $BRICKCOUNT) eval echo "\$BRICKHOSTNAME${BRICK}-head" > ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/etc/hostname eval echo "\$BRICKHOSTNAME${BRICK}-head" >> $TMPOSRFNODES eval echo "\$BRICKHOSTNAME${BRICK}_HEAD_IP \$BRICKHOSTNAME${BRICK}-head.${CLUSTERDOMAINNAME} public.\$BRICKHOSTNAME${BRICK}-head.${CLUSTERDOMAINNAME} private.\$BRICKHOSTNAME${BRICK}-head.${CLUSTERDOMAINNAME} \$BRICKHOSTNAME${BRICK}-head" >> $TMPHOSTS + eval echo "\$BRICKHOSTNAME${BRICK}-head A \$BRICKHOSTNAME${BRICK}_HEAD_IP" >> $TMPZONEFILE + eval echo "public.\$BRICKHOSTNAME${BRICK}-head A \$BRICKHOSTNAME${BRICK}_HEAD_IP" >> $TMPZONEFILE + eval echo "private.\$BRICKHOSTNAME${BRICK}-head A \$BRICKHOSTNAME${BRICK}_HEAD_IP" >> $TMPZONEFILE for DRONE in $(seq $DRONECOUNT) do typeset TMPBRICKDRONES="$(eval echo \$BRICKHOSTNAME${BRICK}-head)_drones.txt" @@ -1399,6 +1418,7 @@ for BRICK in $(seq $BRICKCOUNT) ### eval echo "\$BRICKHOSTNAME${BRICK}_DRONE${DRONE}" >> $TMPBRICKDRONES eval echo -e "\$BRICKHOSTNAME${BRICK}_DRONE${DRONE}_IP \$BRICKHOSTNAME${BRICK}_DRONE${DRONE}.${CLUSTERDOMAINNAME} \$BRICKHOSTNAME${BRICK}_DRONE${DRONE}" \ >> $TMPHOSTS + eval echo -e "\$BRICKHOSTNAME${BRICK}_DRONE${DRONE} A \$BRICKHOSTNAME${BRICK}_DRONE${DRONE}_IP" >> $TMPZONEFILE done #echo printf ")\n" >> ${OUTDIR}/$(eval echo \$BRICKHOSTNAME${BRICK})/$(eval echo \$BRICKHOSTNAME${BRICK})-head/openils/conf/.oils_brick.cfg @@ -1445,8 +1465,15 @@ if [ "$DRONELESS" == "1" ] echo "done!" fi +### Complete DNS zonefile configuration +cat /tmp/zonefile-footer >> "$TMPZONEFILE" +sed -i "s^domain.org^$CLUSTERDOMAINNAME^g" "$TMPZONEFILE" +sed -i "s^Priv_NET^$PRIVATENET^g" "$TMPZONEFILE" + + + ### Add reporter01 to reporter exports share -### it is not the one exporting reports output +### if it is not the one exporting reports output ### to the network. (heads) if [ "${REPORTS_NFS_HOSTNAME}" != "reporter01" ] @@ -1475,14 +1502,37 @@ for LVS in $MACHINES_LVS_ONLY cp -f $LVSCONFIGFILE $OUTDIR/$LVS/etc/ha.d done -### Setup hosts file for LVS +### Setup hosts file for LVS and DNS zonefiles on LVS servers. for LVS_SERVER in $MACHINES_LVS_ONLY do cp -f "$TMPHOSTS" "$OUTDIR/$LVS_SERVER/etc/hosts" && sed -i "s^thishost^$LVS_SERVER^g" "$OUTDIR/$LVS_SERVER/etc/hosts" [ -z $HOSTNAME_PREFIX ] || sed -i "s^PREFIX^$HOSTNAME_PREFIX^g" "$OUTDIR/$LVS_SERVER/etc/hosts" [ -z "$HOSTNAME_PREFIX" ] || sed -i "s^${HOSTNAME_PREFIX}-${HOSTNAME_PREFIX}^${HOSTNAME_PREFIX}^g" "$OUTDIR/$LVS_SERVER/etc/hosts" - + mkdir -p "$OUTDIR/$LVS_SERVER/etc/bind" + cp -f "$TMPZONEFILE" "$OUTDIR/$LVS_SERVER/etc/bind/${CLUSTERDOMAINNAME}-zone" +done + +### setup named.conf for bind DNS server on LVS servers +NUM=0 +for LVS_SERVERS in $MACHINES_LVS_ONLY + do + ((NUM++)) + if ! echo "$LVS_SERVERS" | grep "lvs01" + then + cp -f "$TEMPLATEDIR/lvs/bind/named.conf.local-slave" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + sed -i "s^_LVS01_PRIVATE_IP^$LVS01_PRIVATE_IP^g" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + else + cp -f "$TEMPLATEDIR/lvs/bind/named.conf.local-master" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + sed -i "s^_LVS02_PRIVATE_IP^$LVS02_PRIVATE_IP^g" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + fi + eval sed -i "s^_MY_IP^\$LVS0${NUM}_PRIVATE_IP^g" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + sed -i "s^Priv_NET^$PRIVATENET^g" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + sed -i "s^domain.com^$CLUSTERDOMAINNAME^g" "$OUTDIR/$LVS_SERVERS/etc/bind/named.conf.local" + done + +# eval echo "\$LVS0${NUM}_PRIVATE_IP + #cp -f "$TMPHOSTS" "$OUTDIR/lvs01/etc/hosts" && sed -i "s^thishost^lvs01^g" "$OUTDIR/lvs01/etc/hosts" #[ -z $HOSTNAME_PREFIX ] && sed -i "s^PREFIX^$HOSTNAME_PREFIX^g" "$OUTDIR/lvs01/etc/hosts" #cp -f "$TMPHOSTS" "$OUTDIR/lvs02/etc/hosts" && sed -i "s^thishost^lvs02^g" "$OUTDIR/lvs02/etc/hosts" diff --git a/README.txt b/README.txt index 5fe41f1..a12ef42 100644 --- a/README.txt +++ b/README.txt @@ -1,29 +1,143 @@ -Installation Notes: -=================== +== Installation Via GenaSYS -LVS failover with Heartbeat: -For heartbeat to work properly between -both LVS servers you should have a null-modem serial -cable connected to functioning serial ports /dev/ttyS1 -between both servers. +Copyright (C) Georgia Public Library Service -Library IP based redirction: +GenaSYS is an Evergreen cluster installation program developed by the Georgia Public Library Service and its contractors. + +=== Assumptions + +GenaSYS makes the following assumptions about the hardware setup Evergreen is being installed upon: + +Network: + +* 3 public IP addresses available +* a DNS-addressable domain name (e.g., "gapines.org") + +Hardware (actual or virtual): + +* 2 LVS machines +* 2 or more brick head machines (drone machines are optional) +* 1 utility server +* 2 SIP2 servers +* 2 memcached servers +* 3 database servers +* 1 reports server +* 1 logger server +* 1 backup server +* 1 monitoring server +* 1 administration server + +Software: + +* base installation of Debian squeeze on each server + +=== Usage + +==== Custom Files + +*Library IP based redirection:* If you are going be using Library based redirection then -copy a preconfigured lib_ips.txt file to the custom folder -before running GenaSYS.sh. +copy a preconfigured lib_ips.txt +file to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing. + +Note: this is the file that allows in-library OPAC stations to default to their location as opposed to all of PINES. -Zip Codes for libraries: +*Zip Codes for libraries:* If you are using mutliple zip codes for libraries copy -a preconfigured zips.txt file to the custom folder -before running GenaSYS.sh. +a preconfigured zips.txt +file to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing. -Action Trigger Filters: +Note: this file allows the staff client to automatically populate the city, county, and state fields once the ZIP code is entered in the Evergreen User Editor. + +*Action Trigger Filters:* If you are using customized action trigger filters then copy -the custom action_trigger_filters.json file to the custom folder -before running GenaSYS.sh. +the custom action_trigger_filters.json +file to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing. + +Note: this file is required for any custom action/trigger event setups that are configured. -Custom Maintenance Page: +*Custom Maintenance Page:* If you are using a customized maintenance page -then copy the custom index.html or index.php -file and any image files .jpg or .png to the custom folder -before running GenaSYS.sh. +then copy the custom index.html or index.php +file and any image files .jpg or .png +to the /home/gpls/GenaSYS-2.1.1/custom folder +before continuing. + +Note: the maintenance page appears when you detach all bricks from the cluster. + +==== Global Configuration + +This is where the DNS name for your cluster is entered. + +==== SSL Certificate Configuration + +An SSL Certificate is required for Evergreen to function correctly. +If you have purchased a certificate from a CA then please copy +the certificate files (server.crt, server.key and ca.crt if applicable) +to /home/gpls/GenaSYS-2.1.1/ssl_cert. +If you do not have a purchased certificate from a CA, GenaSYS will generate +a self-signed certificate automatically. + +==== Evergreen Brick Configuration + +Where you define the number and configuration of [[Application Bricks]]. GenaSYS automatically sets up brick clustering and management scripts. + +==== Evergreen Reporter Configuration + +This step defines on which server the NFS share for reports outputs resides. The reports process itself is located on reporter01. + +==== Evergreen OpenSRF Configuration + +This step creates the Linux "opensrf" user, which is used by the system to run all OpenSRF processes, including Apache. + +==== Evergreen Database Configuration + +This step creates the password for the PostgreSQL "evergreen" user. + +==== Evergreen Admin User Configuration + +This step creates the Evergreen administrative user, which is able to log into the staff client with these credentials and administer the system from the GUI. + +==== Private Network Configuration + +Default is 10.0.1.0/24, but can be anything within the private network IP range. + +==== LVS Director Configuration + +===== Cluster IP Address + +The public IP address for the cluster will be used for LVS Director and Heartbeat. This address is the "virtual" address and will be *shared* between two LVS machines in the cluster. Enter the public IP address for the cluster, its netmask and its gateway address. + +===== LVS Physical Ethernet Interface Configuration + +The LVS servers must have a physical public addresses assigned to each server independent of the shared address entered above. Enter the public IP addresses for lvs01 and lvs02 + +==== GenaSYS Configuration Summary + +You will then be shown a summary of the configuration options that you've chosen as they are entered into the genasys.conf file. If any values need correcting, you can start over by selecting (R)etry. + +==== GenaSYS Cluster Creation + +Messages will appear on the screen as the files are processed. + + +==== Human-Readable Summary and Installation Instructions + +After the files are processed and packaged, you will be shown a summary of the full cluster configuration, including installation instructions. This information will be stored in a file named [cluster name]_network_config.txt. As it contains the entered passwords in clear text, you will want to secure this file.\ + +Copy the setup tar.gz files one at a time to the respective nodes in the cluster, extract and run the installation and reboot each one before starting on the next one. Install in the order listed below. + +. lvs +. logger +. db +. brick01-head +. other-bricks +. reporter +. utility +. sip + + + diff --git a/templates/interfaces b/templates/interfaces index 9382b7c..48a4319 100644 --- a/templates/interfaces +++ b/templates/interfaces @@ -6,9 +6,11 @@ auto lo iface lo inet loopback # The primary network interface -allow-hotplug eth0 +auto eth0 iface eth0 inet static address Priv_IP netmask 255.255.255.0 gateway Priv_NET.1 # dns-* options are implemented by the resolvconf package, if installed + dns-servers Cluster_Private_IP LVS01_Private_IP LVS02_Private_IP + dns-search CLUSTER_DOMAINNAME diff --git a/templates/lvs/bind/named.conf.local-master b/templates/lvs/bind/named.conf.local-master new file mode 100644 index 0000000..d18fdc6 --- /dev/null +++ b/templates/lvs/bind/named.conf.local-master @@ -0,0 +1,19 @@ +// +// Do any local configuration here +// + +// Consider adding the 1918 zones here, if they are not used in your +// organization +//include "/etc/bind/zones.rfc1918"; + +zone "domain.com" { + type master; + file "/etc/bind/domain.com-zone"; + // allow-update { key "rndc-key"; Priv_NET.0/24; }; + allow-transfer { + 127.0.0.1; + _MY_IP; + _LVS02_PRIVATE_IP; + }; + notify yes; + }; diff --git a/templates/lvs/bind/named.conf.local-slave b/templates/lvs/bind/named.conf.local-slave new file mode 100644 index 0000000..52fb643 --- /dev/null +++ b/templates/lvs/bind/named.conf.local-slave @@ -0,0 +1,19 @@ +// +// Do any local configuration here +// + +// Consider adding the 1918 zones here, if they are not used in your +// organization +//include "/etc/bind/zones.rfc1918"; + +zone "domain.com" { + type slave; + masters { _LVS01_PRIVATE_IP; }; + file "/etc/bind/domain.com-zone"; + // allow-update { key "rndc-key"; Priv_NET.0/24; }; + allow-transfer { + 127.0.0.1; + _MY_IP; + }; + notify yes; + }; diff --git a/templates/lvs/bind/zonefile-footer b/templates/lvs/bind/zonefile-footer new file mode 100644 index 0000000..59a6d49 --- /dev/null +++ b/templates/lvs/bind/zonefile-footer @@ -0,0 +1,19 @@ +db01 A Priv_NET.101 +db02 A Priv_NET.102 +db03 A Priv_NET.103 +utility01 A Priv_NET.111 +public.utility01 A Priv_NET.111 +private.utility01 A Priv_NET.111 +logger01 A Priv_NET.121 +sip01 A Priv_NET.131 +public.sip01 A Priv_NET.131 +private.sip01 A Priv_NET.131 +sip02 A Priv_NET.132 +public.sip02 A Priv_NET.132 +private.sip02 A Priv_NET.132 +reporter01 A Priv_NET.141 +memcache01 A Priv_NET.151 +memcache02 A Priv_NET.152 +backup01 A Priv_NET.171 +monitor01 A Priv_NET.201 +admin01 A Priv_NET.211 diff --git a/templates/lvs/bind/zonefile-footer-prefixed b/templates/lvs/bind/zonefile-footer-prefixed new file mode 100644 index 0000000..57236b8 --- /dev/null +++ b/templates/lvs/bind/zonefile-footer-prefixed @@ -0,0 +1,19 @@ +PREFIX-db01 A Priv_NET.101 +PREFIX-db02 A Priv_NET.102 +PREFIX-db03 A Priv_NET.103 +PREFIX-utility01 A Priv_NET.111 +PREFIX-public.utility01 A Priv_NET.111 +PREFIX-private.utility01 A Priv_NET.111 +PREFIX-logger01 A Priv_NET.121 +PREFIX-sip01 A Priv_NET.131 +PREFIX-public.sip01 A Priv_NET.131 +PREFIX-private.sip01 A Priv_NET.131 +PREFIX-sip02 A Priv_NET.132 +PREFIX-public.sip02 A Priv_NET.132 +PREFIX-private.sip02 A Priv_NET.132 +PREFIX-reporter01 A Priv_NET.141 +PREFIX-memcache01 A Priv_NET.151 +PREFIX-memcache02 A Priv_NET.152 +PREFIX-backup01 A Priv_NET.171 +PREFIX-monitor01 A Priv_NET.201 +PREFIX-admin01 A Priv_NET.211 diff --git a/templates/lvs/bind/zonefile-header b/templates/lvs/bind/zonefile-header new file mode 100644 index 0000000..26a6c2f --- /dev/null +++ b/templates/lvs/bind/zonefile-header @@ -0,0 +1,17 @@ +$ORIGIN . +$TTL 38400 ; 10 hours 40 minutes +domain.org IN SOA host.domain.org. root.domain.org. ( + 1172935440 ; serial + 10800 ; refresh (3 hours) + 3600 ; retry (1 hour) + 604800 ; expire (1 week) + 38400 ; minimum (10 hours 40 minutes) + ) + NS lvs01.domain.org. + NS lvs02.domain.org. + A Priv_NET.1 + MX 5 lvs01.domain.org. + MX 7 lvs02.domain.org. +$ORIGIN domain.org. + + diff --git a/templates/lvs/bind/zonefile-header-prefixed b/templates/lvs/bind/zonefile-header-prefixed new file mode 100644 index 0000000..648661a --- /dev/null +++ b/templates/lvs/bind/zonefile-header-prefixed @@ -0,0 +1,17 @@ +$ORIGIN . +$TTL 38400 ; 10 hours 40 minutes +domain.org IN SOA PREFIX-lvshost.domain.org. root.domain.org. ( + 1172935440 ; serial + 10800 ; refresh (3 hours) + 3600 ; retry (1 hour) + 604800 ; expire (1 week) + 38400 ; minimum (10 hours 40 minutes) + ) + NS PREFIX-lvs01.domain.org. + NS PREFIX-lvs02.domain.org. + A Priv_NET.1 + MX 5 PREFIX-lvs01.domain.org. + MX 7 PREFIX-lvs02.domain.org. +$ORIGIN domain.org. + + diff --git a/templates/lvs/interfaces b/templates/lvs/interfaces index b3544aa..2607ed6 100644 --- a/templates/lvs/interfaces +++ b/templates/lvs/interfaces @@ -6,30 +6,32 @@ auto lo iface lo inet loopback # The primary network interface -allow-hotplug eth0 +auto eth1 iface eth0 inet static name Public Address address Pub_IP netmask Pub_NETMASK gateway Pub_GATEWAY # dns-* options are implemented by the resolvconf package, if installed + dns-servers Cluster_Private_IP LVS01_Private_IP LVS02_Private_IP + dns-search CLUSTER_DOMAINNAME -#auto eth0:0 -iface eth0:0 inet static +auto eth1:0 +iface eth1:0 inet static name LVS Public Shared Address address Cluster_Public_IP netmask Pub_NETMASK -auto eth1 -iface eth1 inet static +auto eth0 +iface eth0 inet static name Private Address address Priv_Physical_Address netmask 255.255.255.0 -#auto eth1:0 -iface eth1:0 inet static +auto eth0:0 +iface eth0:0 inet static name LVS Private Shared Address address Priv_NET.1 netmask 255.255.255.0 -- 2.11.0