This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goto Watcher repository | |
$ cd ~/Watcher | |
$ sudo python watcher.py start | |
This will create ~/.watcher directory and has watcher.log in it, | |
when started. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##.........................................................## | |
# Clean watcher log # | |
#..........................................................## | |
sudo -s <<EOF | |
cat /dev/null>/home/ubuntu/.watcher/watcher.log | |
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ crontab -e | |
Add the following lines at the end and save. | |
# EVERY SATURDAY 8:00AM clean watcher log | |
0 8 * * 6 sudo sh /home/ubuntu/s3sync/clean_log.sh | |
# EVERYDAY at 10:00AM check failed uploads of previous day | |
0 10 * * * sudo sh /home/ubuntu/s3sync/re-upload.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goto s3sync directory. | |
$ cd s3sync | |
$ sudo vim re-upload.sh | |
#!/bin/bash | |
##.........................................................## | |
## script to detect failed uploads of other date directories | |
## and re-try ## | |
##.........................................................## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goto s3sync directory | |
$ cd ~/s3sync | |
$ sudo vim monitor.sh | |
#!/bin/bash | |
##...........................................................## | |
## script to upload to S3BUCKET, once the change is detected ## | |
##...........................................................## | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd Watcher/ | |
Start the script, | |
$ sudo python watcher.py start | |
This will create a .watcher dirctory at /home/ubuntu | |
Now, | |
$ sudo python watcher.py stop | |
Goto the .watcher directory created and | |
set the destination to be watched for and action to be undertaken | |
in jobs.yml ie. watch: and command: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goto https://github.com/greggoryhz/Watcher | |
Copy https://github.com/greggoryhz/Watcher.git to your clipboard | |
Install git if you have not | |
Clone the Watcher | |
$ git clone https://github.com/greggoryhz/Watcher.git | |
$ cd Watcher/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install Ruby from the repository | |
$ sudo apt-get install ruby libopenssl-ruby | |
Confirm with the version | |
$ ruby -v | |
Download and unzip s3sync | |
$ wget http://s3.amazonaws.com/ServEdge_pub/s3sync/s3sync.tar.gz | |
$ tar -xvzf s3sync.tar.gz | |
Install the certificates. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now, Launch Firefox (3.0v+) | |
Download the FoxyProxy extension by clicking this link:https://addons.mozilla.org/en-US/firefox/addon/2464. | |
Steps to configure and access the UI | |
Select Tools > FoxyProxy > Options | |
Click the “Add New Proxy” button. | |
Select “Manual Proxy Configuration” | |
Enter “localhost” for the “Host or IP Address” field. | |
Enter “6666″ for the “Port” field. | |
Click on the “General” tab at the top of the dialog box. | |
Enter “EC2″ for the “Proxy Name” field. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Cluster name goes here. | |
whirr.cluster-name=yarncluster | |
# Change the number of machines in the cluster here | |
whirr.instance-templates=1 hadoop-namenode+yarn-resourcemanager+mapreduce-historyserver,2 hadoop-datanode+yarn-nodemanager | |
# Install JAVA | |
whirr.java.install-function=install_openjdk | |
whirr.java.install-function=install_oab_java |