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