Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
cloudappliance/highavailabilitysetup [2018_08_31 06:47] – [SME HA Setup 2 x 2] dancloudappliance/highavailabilitysetup [2019_11_22 15:15] dan
Line 1: Line 1:
 ===== SME File Fabric HA Setup "2 x 2" ===== ===== SME File Fabric HA Setup "2 x 2" =====
 +== last edited on Nov. 22, 2019 ==
 ==== Disclaimer ==== ==== Disclaimer ====
  
Line 29: Line 30:
  
 == Initial State == == Initial State ==
-This guide assumes you set up the four appliance following the instructions in the Appliance Installation guide [[cloudappliance/applinstallv1705|here]]   +This guide assumes you set up the four appliances following the instructions in the Appliance Installation guideFor easy failover of the application in case of a database failover, you must assign a virtual IP address for the database servers. This will mean that you can change the primary DB server without changing the configuration on the application servers. There are many ways in Linux to configure automatic failover of the VIP, but this guide will configure the DB servers requiring manual failover. This is often preferred in our scenario of master - slave replication.
-For easy failover of the application in case of DB failover, you must assign a virtual IP address for the database servers. This will mean that you can change the primary DB server without changing the configuration on the application servers. There are countless ways in linux to configure automatic failover of the VIP, but this guide will configure the DB servers requiring manual failover. This is often preferred in our scenario of master - slave replication.+
  
 === Preparation === === Preparation ===
Line 44: Line 44:
  
 == Linux Login == == Linux Login ==
 +
 For Linux command line operations, you must run the commands shown in this document as the root user unless otherwise specified. However, for security reasons you cannot connect with ssh to the machine directly. Instead, you should ssh to the box using smeconfiguser and then su to root:  For Linux command line operations, you must run the commands shown in this document as the root user unless otherwise specified. However, for security reasons you cannot connect with ssh to the machine directly. Instead, you should ssh to the box using smeconfiguser and then su to root: 
-<code> + 
-# ssh smeconfiguser@smeweb01 +    # ssh smeconfiguser@smeweb01 
-</code>+
  
 Enter the smeconfiguser password at the prompt. Once logged in, elevate your privileges to root. Enter the smeconfiguser password at the prompt. Once logged in, elevate your privileges to root.
Line 73: Line 74:
 # systemctl stop httpd # systemctl stop httpd
 # systemctl stop cloudftp # systemctl stop cloudftp
 +# systemctl stop crond
 # systemctl stop vsftpd # systemctl stop vsftpd
 </code> </code>
Line 78: Line 80:
  
  
-==== Part II ====+==== Part II - Database Servers ==== 
 === 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 99:
  
 == 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:
 <code> <code>
 # crontab -e -u smestorage # crontab -e -u smestorage
Line 402: Line 406:
 <code>exit </code> <code>exit </code>
  
-==== Part III ====+==== Part III - Application Servers ==== 
 === Configure the application servers === === Configure the application servers ===
 +
 In this section, you change the application server's configuration to the database server by editing the PHP configuration directly from command line. By default, the database host is localhost.  In this section, you change the application server's configuration to the database server by editing the PHP configuration directly from command line. By default, the database host is localhost. 
 **These steps are repeated on both smeweb01 and smeweb02.** **These steps are repeated on both smeweb01 and smeweb02.**
Line 452: Line 458:
  
 == crontab == == crontab ==
-You must also disable crontab on the smeweb02 servercrontab should only run from one application server.+All of smestorage's cron jobs should run on one of the application  servers; only one of smestorage's cron jobs, logroller, should run on the other  application server.
 **As root on smeweb02 only:** **As root on smeweb02 only:**
 <code> <code>
Line 458: Line 464:
 </code> </code>
  
-Place a # in front of the seven jobs listed in the crontab schedule. For a screenshot, refer to the DB section above.+Place a # in front of six of the seven jobs listed in the crontab schedule; **do not place a # in front of the logroller job** For a screenshot, refer to the DB section above.
  
 Restart both servers, so on both smeweb01 and smeweb02, execute a reboot. Restart both servers, so on both smeweb01 and smeweb02, execute a reboot.