blob: a09f9927b7e3801d207cfd6614cfc6504a1a643b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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) 'python2 --version 2>&1 | grep -E "(2\.6|2\.7)"'\
| grep "\[SUCCESS\]"\ | awk '{print $$4}' > $(ALIVES)
deploy_libs: requests
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) 'python2 --version 2>&1 | grep -E "(2\.6|2\.7)"'
nuke:
pnuke $(OPTIONS) -h $(HOSTS) "python"
|