Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
cloudappliance/highavailabilitysetup [2019_10_29 00:36] – steven | cloudappliance:highavailabilitysetup [2023_06_22 05:41] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== SME File Fabric HA Setup "2 x 2" ===== | + | ===== SME File Fabric HA Setup "2 x 2" |
+ | |||
+ | == last edited on October 17, 2022 == | ||
==== Disclaimer ==== | ==== Disclaimer ==== | ||
The information in this document is provided on an as-is basis. You use it at your own risk. We accept no responsibility for errors or omissions, nor do we have any obligation to provide support for implementing or maintaining the configuration described here. Furthermore, | The information in this document is provided on an as-is basis. You use it at your own risk. We accept no responsibility for errors or omissions, nor do we have any obligation to provide support for implementing or maintaining the configuration described here. Furthermore, | ||
- | SME designs, implements and supports HA File Fabric solutions for customers on a paid professional services basis. | + | SME designs, implements and supports HA (High Availability) |
==== Introduction ==== | ==== Introduction ==== | ||
Line 76: | Line 78: | ||
</ | </ | ||
+ | <WRAP center round info 100%> | ||
+ | Please note this information above was updated with the 2106 release of the File Fabric. Please see this [[: | ||
+ | </ | ||
+ | ==== Part II - Database Servers ==== | ||
- | ==== Part II ==== | ||
=== Configuring the Database Servers === | === Configuring the Database Servers === | ||
+ | |||
You must perform these steps to create a specialized database server from the standard SME appliance distribution. In this guide we also run memcached as a part of the DB server. | You must perform these steps to create a specialized database server from the standard SME appliance distribution. In this guide we also run memcached as a part of the DB server. | ||
Line 95: | Line 101: | ||
== crontab == | == crontab == | ||
- | You must also disable some jobs in crontab, these should only run on one application server. Again, as root on smesql01 and smesql02: | + | You must also disable some jobs in crontab. Again, as root on smesql01 and smesql02: |
< | < | ||
# crontab -e -u smestorage | # crontab -e -u smestorage | ||
</ | </ | ||
- | Place a "#" | + | Place a "#" |
+ | |||
+ | ``` | ||
+ | MAILTO='' | ||
+ | #Ansible: | ||
+ | #* * * * * / | ||
+ | #Ansible: #3 | ||
+ | #5 4 * * * / | ||
+ | #Ansible: #2 | ||
+ | #* * * * * / | ||
+ | #Ansible: #5 | ||
+ | #10 2 1 * * / | ||
+ | #Ansible: #4 | ||
+ | #5 * * * * / | ||
+ | #Ansible: #7 | ||
+ | 30 1 * * * / | ||
+ | #Ansible: #6 | ||
+ | #10 * * * * / | ||
+ | * * * * * / | ||
+ | ``` | ||
+ | |||
+ | <WRAP center round info 100%> | ||
+ | Please note this information above was updated with the 2106 release of the File Fabric. Please see this [[:cloudappliance/ | ||
+ | </ | ||
- | {{:: | + | <WRAP center round important 100%> |
+ | There must always be exactly one cron node per File Fabric cluster. If the node that was acting as the cron node ceases to be available as part of the cluster, another node must be made the cron node. | ||
+ | </ | ||
=== iptables for dbservers === | === iptables for dbservers === | ||
Line 138: | Line 169: | ||
By default, the appliance memcached service listens only for connections from localhost, in order to share a memcache between the two application servers, we must change that. For redundancy we will do this on both smesql01 and smesql02. | By default, the appliance memcached service listens only for connections from localhost, in order to share a memcache between the two application servers, we must change that. For redundancy we will do this on both smesql01 and smesql02. | ||
- | To allow other machines to connect, edit /etc/sysconfig/memcached. | + | < |
- | < | + | cd /var/www/ |
+ | sed -i 's/127.0.0.1/0.0.0.0/g' .env | ||
+ | docker-compose down | ||
+ | docker-compose up -d | ||
+ | </ | ||
- | Change the line | + | === Redis configuration === |
- | OPTIONS="-l 127.0.0.1" | + | By default, the appliance Redis service listens only for connections from localhost, in order to share a Redis between the two application servers, we must change that. For redundancy we will do this on both smesql01 and smesql02. |
- | to | + | < |
- | + | cd / | |
- | OPTIONS=" | + | sed -i ' |
- | + | docker-compose down | |
- | Making the file look like this | + | docker-compose up -d |
- | + | </ | |
- | {{:: | + | |
- | + | ||
- | then restart the memcached service | + | |
- | < | + | |
=== MySQL configuration for HA === | === MySQL configuration for HA === | ||
Line 284: | Line 315: | ||
Using database replication allows you to quickly continue service if a database goes down. | Using database replication allows you to quickly continue service if a database goes down. | ||
+ | <WRAP center round tip 100%> | ||
+ | See [[cloudappliance: | ||
+ | </ | ||
In MySQL replication, | In MySQL replication, | ||
Line 402: | Line 436: | ||
< | < | ||
- | ==== Part III ==== | + | ==== Part III - Application Servers |
+ | |||
+ | <WRAP center round important 100%> | ||
+ | If you will be using a load balancer to distribute traffic to your web servers, configure the load balancer to provide session stickiness. | ||
+ | </ | ||
=== Configure the application servers === | === Configure the application servers === | ||
+ | |||
In this section, you change the application server' | In this section, you change the application server' | ||
**These steps are repeated on both smeweb01 and smeweb02.** | **These steps are repeated on both smeweb01 and smeweb02.** | ||
Line 425: | Line 465: | ||
In addition add a newline to define a remote memcached instance | In addition add a newline to define a remote memcached instance | ||
< | < | ||
+ | |||
+ | In addition ensure the following variable is set for Redis: | ||
+ | < | ||
Further we need to update the $dbuser and $password to match the < | Further we need to update the $dbuser and $password to match the < | ||
Line 447: | Line 490: | ||
== memcached == | == memcached == | ||
< | < | ||
- | # systemctl disable | + | cd / |
- | # systemctl stop memcached | + | docker-compose down |
</ | </ | ||
== crontab == | == crontab == | ||
- | You must also disable crontab | + | The majority of smestorage' |
**As root on smeweb02 only:** | **As root on smeweb02 only:** | ||
< | < | ||
Line 458: | Line 501: | ||
</ | </ | ||
- | Place a # in front of the seven jobs listed in the crontab schedule. For a screenshot, refer to the DB section above. | + | Your crontab should mirror the following: |
+ | |||
+ | ``` | ||
+ | MAILTO='' | ||
+ | #Ansible: | ||
+ | #* * * * * / | ||
+ | #Ansible: #3 | ||
+ | #5 4 * * * / | ||
+ | #Ansible: #2 | ||
+ | #* * * * * / | ||
+ | #Ansible: #5 | ||
+ | #10 2 1 * * / | ||
+ | #Ansible: #4 | ||
+ | #5 * * * * / | ||
+ | #Ansible: #7 | ||
+ | 30 1 * * * / | ||
+ | #Ansible: #6 | ||
+ | #10 * * * * / | ||
+ | * * * * * / | ||
+ | ``` | ||
+ | |||
+ | <WRAP center round info 100%> | ||
+ | Please note this information above was updated with the 2106 release | ||
+ | </ | ||
Restart both servers, so on both smeweb01 and smeweb02, execute a reboot. | Restart both servers, so on both smeweb01 and smeweb02, execute a reboot. |