summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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 000000000..cab9f8079
--- /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