11 # for use with the test framework; push local stuff on a test node
12 # howto use: go on testmaster in the build you want to use and just run
14 # cut'n paste the result in a terminal in your working dir, e.g. (although all are not required)
15 # $ export BUILD=2013.07.02--lxc18
16 # $ export PLCHOSTLXC=gotan.pl.sophia.inria.fr
17 # $ export GUESTNAME=2013.07.02--lxc18-1-vplc01
18 # $ export GUESTHOSTNAME=vplc01.pl.sophia.inria.fr
19 # $ export KVMHOST=kvm64-6.pl.sophia.inria.fr
20 # $ export NODE=vnode01.pl.sophia.inria.fr
23 # this will attempt to compile vsh from vsh.c (and will push Makefile.vsh in /usr/sbin/)
24 # so you might have to yum install gcc
26 LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc'
27 RSYNC_EXCLUDES := --exclude .git --exclude .svn --exclude '*~' --exclude TAGS $(LOCAL_RSYNC_EXCLUDES)
28 RSYNC_COND_DRY_RUN := $(if $(findstring n,$(MAKEFLAGS)),--dry-run,)
29 RSYNC := rsync -e "ssh -i $(NODE).key.rsa" -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES)
32 NODEURL:=root@$(NODE):/
37 @echo "sync: You must define NODE on the command line"
38 @echo " e.g. make sync NODE=vnode01.inria.fr"
41 +$(RSYNC) ./lxcsu ./lxcsu-internal ./vsh.c ./Makefile.vsh $(NODEURL)/usr/sbin/
42 ssh -i $(NODE).key.rsa root@$(NODE) make -C /usr/sbin -f Makefile.vsh vsh
43 ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/lxcsu /usr/sbin/vsh
44 ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/lxcsu /usr/sbin/vsh
49 TESTMASTER ?= testmaster.onelab.eu
52 KEYURL:=root@$(TESTMASTER):$(BUILD)/keys/key_admin.rsa
59 @echo "sync: fetching $@ - You must define TESTMASTER, BUILD and NODE on the command line"
60 @echo " e.g. make sync TESTMASTER=testmaster.onelab.eu BUILD=2010.01.22--1l-f8-32 NODE=vnode01.inria.fr"
61 @echo " note that for now all test builds use the same key, so any BUILD would do"
68 ### poor man's install
72 install -D -m 755 vsh /usr/sbin/vsh
73 install -D -m 755 lxcsu /usr/sbin/lxcsu
74 install -D -m 755 lxcsu-internal /usr/sbin/lxcsu-internal
75 chmod u+s /usr/sbin/lxcsu
76 cp build/lib*/setns.so /usr/sbin