SHELL=/bin/bash HOSTS=servers.txt USER=ubuntu OPTIONS=-x -"F ./ssh_config" FOPTIONS=$(OPTIONS) -h <(cut -f1 $(HOSTS)) .PHONY: deploy servers servers_simple: ec2-describe-instances --region us-west-2 | grep running | cut -f4,17,18 > servers.txt servers: ec2-describe-instances --region us-west-2 | grep running | cut -f4,17,18 > servers.txt paste <(cut -f2 servers.txt) <(cut -f28,29 survey8a.txt) > credentials.txt rsync credentials.txt horel.org:kdd/ servers2: ec2-describe-instances --region us-west-2 | grep running | cut -f4,17,18 > servers.txt paste <(cut -f2 servers.txt) fb_accounts2.txt > credentials.txt rsync credentials.txt horel.org:kdd/ uptime: pssh $(FOPTIONS) 'uptime' running: pssh -i $(FOPTIONS) 'pgrep -f "celery worker"' deploy: cd client; tar -czf facebook.tar.gz requirements.txt tasks.py cd client; rsync facebook.tar.gz Makefile horel.org:public_html/facebook pssh -i $(FOPTIONS) 'rm -rf tasks.py tasks.pyc kdd/; curl http://thibaut.horel.org/facebook/Makefile > Makefile; make boostrap' run: pssh -i $(FOPTIONS) 'make run' stop: pssh -i $(FOPTIONS) "make stop; killall chromedriver; killall chromium-browser; killall Xvfb; rm -f tasks.pyc" restart: pssh $(FOPTIONS) "make restart" test: pssh -i $(FOPTIONS) 'rm -f tasks.pyc; grep "replace" tasks.py' deploy_server: rsync run.py run2.py server.py credentials.txt horel.org:kdd/