summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-07-09 23:34:22 +0200
committertv <tv@shackspace.de>2015-07-10 00:02:06 +0200
commitcf7f07c75ff0f41dd97246e882ae0d30eec42efb (patch)
tree4612b4c8b8968eeb6913e0f2d0c356c97057ebd6 /Makefile
parent09e435644334e7afcb974351d53df16ecd74bb95 (diff)
make deploy: init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..cab9f807
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+all: deploy
+
+tv-cluster := cd mkdir nomic rmdir wu
+deploy-cd:; ./deploy cd
+deploy-mkdir:; ./deploy mkdir
+deploy-nomic:; ./deploy nomic root@nomic-local
+deploy-rmdir:; ./deploy rmdir
+deploy-wu:; ./deploy wu root@localhost
+
+ifndef cluster
+cluster := $(LOGNAME)
+endif
+hosts := $($(cluster)-cluster)
+ifeq ($(hosts),)
+$(error bad cluster: $(cluster))
+else
+.PHONY: deploy $(addprefix deploy-,$(hosts))
+deploy:
+ exec parallel \
+ -j 0 \
+ --no-notice \
+ --rpl '{u} s/^.* deploy-(.*)/\1/' \
+ --tagstring '{u}' \
+ --line-buffer \
+ $(MAKE) deploy-{} ::: $(hosts)
+endif