Errigal-File-Server
**Author**: Avi
\\ **Date**: 9th March 2018
**Repo**: https://bitbucket.org/errigal/errigal-file-server
\\ **Requirement Doc**: https://docs.google.com/document/d/1zNNmaJY4G0Edse3JrqlwCQsQwf_tgLnjEWQhDcUmtpU/edit
Errigal-File-Server(EFS) is simple REST based file server that allows file operations and replication over multiple servers.
It basically allows operations on files such as GET, POST, DELETE and replicate these operations over multiple servers.
Deployment from scratch:
* Create the following Directory structure for a non-root user(example: scotty)
mkdir ~/.errigal-file-server
mkdir ~/.errigal-file-server/logs
chmod -R 0777 ~/.errigal-file-server
copy the latest binary from Jenkins:
~/.errigal-file-server/efs_linux
Copy the process control scripts from the Git Repo and it should look as follows:
~/.errigal-file-server/startup.sh
~/.errigal-file-server/shutdown.sh
~/.errigal-file-server/cron_check_efs_process.sh
Give them executable permission:
chmod +x ~/.errigal-file-server/efs_linux
chmod +x ~/.errigal-file-server/startup.sh
chmod +x ~/.errigal-file-server/shutdown.sh
chmod +x ~/.errigal-file-server/cron_check_efs_process.sh
Add the config file: ~/.errigal-file-server/errigal-file-server.yaml
#No Trailing slash in Paths!
port: 9090
local_server: "/export/home/scotty/appfiles"
remote_servers:
- "http://apps2.com:9090"
Add the following line in the cron Job (crontab -e) for the non-root user that you used earlier(example: scotty)
*/1 * * * * /home/scotty/.errigal-file-server/cron_check_efs_process.sh
EFS should start within the next minute and the cron job will also ensure that EFS stays up and running.
Similar procedure is followed on other App handler (Apps2). The only difference being, the config file will have the "remote_servers" array pointing to Apps1 ("http://apps1.com:9090")