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
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 $(NODEURL)/usr/sbin/
41 ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/lxcsu
42 ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/lxcsu
43 ssh -i $(NODE).key.rsa root@$(NODE) gcc -o /usr/sbin/vsh /usr/sbin/vsh.c
44 ssh -i $(NODE).key.rsa root@$(NODE) chown root:root /usr/sbin/vsh
45 ssh -i $(NODE).key.rsa root@$(NODE) chmod u+s /usr/sbin/vsh
50 TESTMASTER ?= testmaster.onelab.eu
53 KEYURL:=root@$(TESTMASTER):$(BUILD)/keys/key_admin.rsa
60 @echo "sync: fetching $@ - You must define TESTMASTER, BUILD and NODE on the command line"
61 @echo " e.g. make sync TESTMASTER=testmaster.onelab.eu BUILD=2010.01.22--1l-f8-32 NODE=vnode01.inria.fr"
62 @echo " note that for now all test builds use the same key, so any BUILD would do"
69 ### poor man's install
73 install -D -m 755 vsh /usr/sbin/vsh
74 install -D -m 755 lxcsu /usr/sbin/lxcsu
75 install -D -m 755 lxcsu-internal /usr/sbin/lxcsu-internal
76 chmod u+s /usr/sbin/lxcsu
77 chmod u+s /usr/sbin/vsh
78 cp build/lib*/setns.so /usr/sbin