4 SITEDIR=/etc/planetlab/configs
6 RPM=$(shell ls -rt myplc*rpm | tail -1)
7 APIDIR=/usr/share/plc_api
9 PLC1=lurch.cs.princeton.edu
10 PLC2=planetlab-devbox.inria.fr
15 PUSH=pclean pplc1 pplc2 papi1 papi2
19 papi: pclean papi1 papi2
20 pplc: pclean pplc1 pplc2
23 -find . '(' -name '*.pyc' -o -name '*~' ')' | xargs rm
25 rsync -a -v -C ./ root@$(PLC1):new_plc_api/
27 rsync -a -v -C ./PLC/ root@$(PLC1):$(CHROOT)$(APIDIR)/PLC/
29 rsync -a -v -C ./ root@$(PLC2):new_plc_api/
31 rsync -a -v -C ./PLC/ root@$(PLC2):$(CHROOT)$(APIDIR)/PLC/
34 DB=install-schema stop-clients clean-db restart
35 API=install-api restart
40 chroot $(CHROOT) pg_dump -U pgsqluser planetlab4 > planetlab4.dump
45 @echo 'installing schema'
46 @cp planetlab4.sql $(CHROOT)$(APIDIR)/planetlab4.sql
49 find . -name '*.py' | xargs tar cf - | ( cd $(CHROOT)$(APIDIR) ; tar xf -)
50 -find $(CHROOT)$(APIDIR) -name '*pyc' | xargs rm
55 @echo 'pkilling Shell.py'
58 @chroot $(CHROOT) /etc/plc.d/httpd stop
62 @chroot $(CHROOT) psql -U postgres --port $(PORT) template1 -c 'drop database planetlab4'
65 @echo 'Restarting PLC'
66 @chroot $(CHROOT) service plc restart
69 UPGRADE=down up reconfig restart
74 @echo latest rpm is $(RPM)
77 cp $(SITEDIR)/$(SITE) .
86 (echo w; echo q) | chroot $(CHROOT) plc-config-tty
89 TEST=run checkpoint diff
91 ./TestPeers.py > TestPeers.out 2>&1
94 diff TestPeers.ref TestPeers.out
97 @echo adopting latest run as reference
98 cp TestPeers.out TestPeers.ref
108 @echo upgrade: $(UPGRADE)
110 @echo OTHERS: $(HELP)