X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=blobdiff_plain;f=Makefile;h=cb724a1dba2a799d45b64216ab66803b184a5e6f;hp=efd49d03ce9bfcbcca04a5e58000fe5e344348a5;hb=cf713cae0012e3758a1a8ed003b0cb7f1527837a;hpb=19cc798519e3e6b484eeee4ab2db83a4d87a3038 diff --git a/Makefile b/Makefile index efd49d0..cb724a1 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,6 @@ -# -# $Id$ -# - ########## tags: - find . -type f | egrep -v '.svn/|~$$' | xargs etags + find . -type f | egrep -v '\.git/|~$$' | xargs etags .PHONY: tags @@ -12,18 +8,23 @@ tags: # 2 forms are supported # (*) if your plc root context has direct ssh access: # make sync PLC=private.one-lab.org -# (*) otherwise, entering through the root context -# make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr +# (*) otherwise, for test deployments, use on your testmaster +# $ run export +# and cut'n paste the export lines before you run make sync -ifdef GUEST -ifdef PLCHOST -SSHURL:=root@$(PLCHOST):/vservers/$(GUEST) -SSHCOMMAND:=ssh root@$(PLCHOST) vserver $(GUEST) -endif -endif ifdef PLC SSHURL:=root@$(PLC):/ SSHCOMMAND:=ssh root@$(PLC) +else +ifdef PLCHOSTLXC +SSHURL:=root@$(PLCHOSTLXC):/var/lib/lxc/$(GUESTNAME)/rootfs +SSHCOMMAND:=ssh root@$(PLCHOSTLXC) ssh $(GUESTHOSTNAME) +else +ifdef PLCHOSTVS +SSHURL:=root@$(PLCHOSTVS):/vservers/$(GUESTNAME) +SSHCOMMAND:=ssh root@$(PLCHOSTVS) vserver $(GUESTNAME) exec +endif +endif endif LOCAL_RSYNC_EXCLUDES := --exclude '*.pyc' @@ -33,16 +34,17 @@ RSYNC := rsync -a -v $(RSYNC_COND_DRY_RUN) $(RSYNC_EXCLUDES) sync: ifeq (,$(SSHURL)) - @echo "sync: You must define, either PLC, or PLCHOST & GUEST, on the command line" - @echo " e.g. make sync PLC=private.one-lab.org" - @echo " or make sync PLCHOST=testbox1.inria.fr GUEST=vplc03.inria.fr" + @echo "sync: I need more info from the command line, e.g." + @echo " make sync PLC=boot.planetlab.eu" + @echo " make sync PLCHOSTVS=.. GUESTNAME=.." + @echo " make sync PLCHOSTLXC=.. GUESTNAME=.. GUESTHOSTNAME=.." @exit 1 else +$(RSYNC) plc.init $(SSHURL)/etc/init.d/plc +$(RSYNC) bin/ $(SSHURL)/usr/bin/ +$(RSYNC) plc.d/ $(SSHURL)/etc/plc.d/ +$(RSYNC) db-config.d/ $(SSHURL)/etc/planetlab/db-config.d/ - +$(RSYNC) plc_config.py $(SSHURL)/usr/lib/python2.5/site-packages/plc_config.py + +$(RSYNC) plc_config.py $(SSHURL)/usr/lib/python2.\*/site-packages/plc_config.py +$(RSYNC) default_config.xml $(SSHURL)/etc/planetlab/default_config.xml @echo XXXXXXXX you might need to run ssh root@$(PLC) service plc start endif