diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e58b9b0 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +HOSTS=nodes.txt +ALIVES=alive.txt +USER=irisaple_pacemaker2 +SSH_CONFIG=ssh_config +OPTIONS=-x "-F $(SSH_CONFIG)" +FOPTIONS=$(OPTIONS) -h $(ALIVES) + +.PHONY: alive deploy clean pink nuke + +$(ALIVES) alive: + pssh $(OPTIONS) -h $(HOSTS) "uname" -i | grep "\[SUCCESS\]"\ + | awk '{print $$4}' > $(ALIVES) + +deploy_libs: requests simplejson + +deploy_client: lastfm.py process.py + +deploy_client deploy_libs: $(ALIVES) + psshscp $(FOPTIONS) -r $(filter-out $(ALIVES), $+) /home/$(USER) + touch $@ + +deploy: deploy_client deploy_libs + +clean: + pssh $(OPTIONS) -h $(HOSTS) "rm -f *.txt; rm -f *.out" + +distclean: + rm -f alive.txt deploy_client deploy_libs + +ping: $(ALIVES) + pssh $(FOPTIONS) "uname" + +nuke: + pnuke $(OPTIONS) -h $(HOSTS) "python" |
