From 19346fa9068878af516cdb670bea4f791337507b Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Sun, 29 Sep 2013 05:12:56 -0400 Subject: Initial commit --- Makefile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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" -- cgit v1.2.3-70-g09d2