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