HA Deployment

General eFa discussion
Post Reply
smyers119
Posts: 79
Joined: 29 Nov 2019 11:36

HA Deployment

Post by smyers119 » 23 Apr 2020 13:41

I am in the planning stage of a High Availability Deployment. Just wanted to start a thread to get input on it. I am going for a ( master / slave ) ( active / inactive ) type of deployment.

KeepAlived - for Virtual IP and determining master /slave

MySQL replication (Active / Active) - should cover mailwatch settings and bayes database

Rsync - should cover the mail and the mail queues.

Am i missing anything?

User avatar
shawniverson
Posts: 3104
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: HA Deployment

Post by shawniverson » 23 Apr 2020 15:01

Have fun, here you go.Some of my dev notes.

Some notes for development
eFa cluster setup notes

/var/www/html/mailscanner/conf.php

define('RPC_ALLOWED_CLIENTS', '<othernodeips>');

define('RPC_PORT', 443);

define('RPC_SSL', true);
Firewalling notes

firewall-cmd –permanent –add-service=mysql

firewall-cmd –add-port={3306/tcp,4567/tcp,4568/tcp,4444/tcp} –permanent

firewall-cmd –reload
Slave notes

grant all privileges on mailscanner.* to 'mailwatch'@'10.3.1.22' identified by 'eFaPr0j3ct' with grant option;

grant all privileges on sa_bayes.* to 'sa_user'@'10.3.1.22' identified by 'eFaPr0j3ct' with grant option;

grant all privileges on sqlgrey.* to 'sqlgrey'@'10.3.1.22' identified by 'eFaPr0j3ct' with grant option;

grant all privileges on efa.* to 'efa'@'10.3.1.22' identified by 'eFaPr0j3ct' with grant option;

flush privileges;

On slave

/etc/sqlgrey/sqlgrey.conf db_host = 10.3.1.21

/var/www/html/mailscanner/conf.php define('DB_HOST', '10.3.1.21');

/etc/MailScanner/spamassassin.conf

bayes_sql_dsn DBI:mysql:sa_bayes:10.3.1.21

user_awl_dsn DBI:mysql:sa_bayes:10.3.1.21

/usr/share/MailScanner/perl/custom/CustomAction.pm

my($db_host) = '10.3.1.21';

/usr/share/MailScanner/perl/custom/MailWatch.pm

my ($db_host) = '10.3.1.21';

/usr/share/MailScanner/perl/custom/SQLBlackWhiteList.pm

my ($db_host) = '10.3.1.21';

/var/www/html/mailscanner/conf.php

define('RPC_ALLOWED_CLIENTS', '10.3.1.21');

define('RPC_PORT', 443);

define('RPC_SSL', true);

systemctl stop mariadb

systemctl disable mariadb

service mailscanner restart

service sqlgrey restart
Galera Multi-Master Notes

Install MariaDB 10x prior to eFa install

/etc/yum.repos.d/mariadb.repo

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/10.1/centos7-amd64

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

yum -y update MariaDB-server MariaDB-client MariaDB-compat galera socat jemalloc

yum -y install eFa

run init scripts

Note: selinux not tuned for galera (todo), must turn off for now

Create galera configuration on frontend1

[galera]

wsrep_on=ON

wsrep_provider=/usr/lib64/galera/libgalera_smm.so

wsrep_cluster_address='gcomm:10.3.1.21,10.3.1.22' wsrep_cluster_name='galera' wsrep_node_address='10.3.1.21' wsrep_node_name='frontend1' wsrep_sst_method=rsync binlog_format=row default_storage_engine=InnoDB innodb_autoinc_lock_mode=2 bind-address=0.0.0.0 systemctl stop mariadb galera_new_cluster Create galera configuration on node2 [galera] wsrep_on=ON wsrep_provider=/usr/lib64/galera/libgalera_smm.so wsrep_cluster_address='gcomm:10.3.1.21,10.3.1.22'

wsrep_cluster_name='galera'

wsrep_node_address='10.3.1.22'

wsrep_node_name='frontend2'

wsrep_sst_method=rsync

binlog_format=row

default_storage_engine=InnoDB

innodb_autoinc_lock_mode=2

bind-address=0.0.0.0

systemctl restart mariadb
Version eFa 4.0.2 now available!

smyers119
Posts: 79
Joined: 29 Nov 2019 11:36

Re: HA Deployment

Post by smyers119 » 23 Apr 2020 15:28

Wow that will save a lot of time, thank you very much.

Post Reply