Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cloudappliance/hawebreplication [2019_09_06 15:58] – smeadmin | cloudappliance:hawebreplication [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== SME File Fabric HA Web Replication ===== | ||
- | |||
- | ==== 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, | ||
- | |||
- | SME designs, implements and supports HA File Fabric solutions for customers on a paid professional services basis. For more information please contact sales@storagemadeeasy.com | ||
- | |||
- | ==== Introduction ===== | ||
- | |||
- | As part of the setup and configuration of the multiple web frontend servers, automatic replication of branding and configuration changes was implemented. | ||
- | |||
- | This is implemented as a cron job that runs every 5 minutes. | ||
- | |||
- | Note: When making changes to branding or config options as appladmin use only one webserver and wait for the changes to be replicated before attempting to make changes on a different webserver. | ||
- | |||
- | ==== Master Database Server Setup ==== | ||
- | The Master Database server will hold the repository of branding and configuration. | ||
- | |||
- | Log into smesql01 (from HA Setup example or primary db server) | ||
- | |||
- | As user smeconfiguser: | ||
- | |||
- | < | ||
- | mkdir smewebconfigs/ | ||
- | mkdir smewebconfigs/ | ||
- | </ | ||
- | |||
- | ==== Webserver Setup ==== | ||
- | On each of the webservers the following should be repeated to create a cron job. This task will replicate changes to/from the folder created in the previous step on smesql01. | ||
- | |||
- | As the root user on each webserver: | ||
- | |||
- | Create a ssh key and copy to smesql01 | ||
- | |||
- | < | ||
- | ssh-keygen -f ~/ | ||
- | |||
- | ssh-copy-id smeconfiguser@< | ||
- | </ | ||
- | * Substitute the ip address or FQDN of smesql01 below. | ||
- | |||
- | Update rsync and create directory for replication script: | ||
- | |||
- | < | ||
- | wget http:// | ||
- | |||
- | rpm -Uvh rsync-3.1.2-7.fc27.x86_64.rpm | ||
- | |||
- | mkdir replication | ||
- | </ | ||
- | |||
- | Create the file replication/ | ||
- | < | ||
- | vi replication/ | ||
- | </ | ||
- | |||
- | Paste the following into the vi session by pressing " | ||
- | |||
- | < | ||
- | #!/bin/bash | ||
- | sleep $(( ( RANDOM % 20 ) + 1 )) | ||
- | |||
- | storage="< | ||
- | /bin/rsync -rtu -e " | ||
- | |||
- | /bin/rsync -rtu -e " | ||
- | |||
- | /bin/rsync -rtu -e " | ||
- | |||
- | /bin/rsync -rtogu --chown=smestorage: | ||
- | |||
- | /bin/rsync -rtogu --chown=smestorage: | ||
- | |||
- | /bin/rsync -rtogu --chown=smestorage: | ||
- | </ | ||
- | |||
- | Finally the permissions need to be modified to allow root to run the script, and crontab must be setup to run the script automatically. | ||
- | |||
- | < | ||
- | chmod 700 / | ||
- | |||
- | crontab -e | ||
- | </ | ||
- | |||
- | Once crontab is open press " | ||
- | |||
- | < | ||
- | */5 * * * * / | ||
- | </ | ||
- | |||
- | ==== Conclusion ==== | ||
- | Once implemented the rebanding and configuration changes will be replicated to all webservers. | ||