User Tools

Site Tools


toolsandtechnologies:errigal-file-server

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
toolsandtechnologies:errigal-file-server [2018/03/13 11:44] adsilvatoolsandtechnologies:errigal-file-server [2021/06/25 10:09] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +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)
 +
 +<code>
 +mkdir ~/.errigal-file-server
 +mkdir ~/.errigal-file-server/logs
 +chmod -R 0777 ~/.errigal-file-server
 +</code>
 +
 +copy the latest binary from Jenkins: 
 +<code>
 +~/.errigal-file-server/efs_linux
 +</code>
 +
 +Copy the process control scripts from the Git Repo and it should look as follows:
 +<code>
 +~/.errigal-file-server/startup.sh
 +~/.errigal-file-server/shutdown.sh
 +~/.errigal-file-server/cron_check_efs_process.sh
 +</code>
 +
 +Give them executable permission:
 +<code>
 +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
 +</code>
 +
 +Add the config file:  ~/.errigal-file-server/errigal-file-server.yaml
 +<code>
 +#No Trailing slash in Paths!
 +port: 9090
 +local_server: "/export/home/scotty/appfiles"
 +remote_servers:
 +     - "http://apps2.com:9090"
 +</code>
 +
 +Add the following line in the cron Job (crontab -e) for the non-root user that you used earlier(example: scotty)
 +<code>
 +*/1 * * * * /home/scotty/.errigal-file-server/cron_check_efs_process.sh
 +</code>
 +
 +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")