5 %define url $URL: svn+ssh://svn.planet-lab.org/svn/Monitor/trunk/Monitor-server.spec $
7 %define name monitor-server
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
13 Summary: Monitor backend scripts for server
17 Source0: %{name}-%{version}.tar.bz2
19 Group: Applications/System
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
29 Requires: openssh-clients
30 Requires: PLCWWW >= 4.2
31 Requires: BootCD >= 4.2
32 Requires: MySQL-python
35 Scripts for polling PLC, the node, and PCU status. Also a collection of
36 command-line utilities for querying the status database.
42 # TODO: note that we should build the cmdamt/ with g++
43 echo "There is no build stage. Simply copy files."
47 rm -rf $RPM_BUILD_ROOT
48 mkdir -p $RPM_BUILD_ROOT/usr/share/%{name}
49 mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}
50 mkdir -p $RPM_BUILD_ROOT/var/lib/%{name}/archive-pdb
51 mkdir -p $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/
53 echo " * Installing core scripts"
54 rsync -a --exclude www --exclude archive-pdb --exclude .svn --exclude CVS \
55 ./ $RPM_BUILD_ROOT/usr/share/%{name}/
57 echo " * Installing web pages"
58 rsync -a www/ $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/
60 echo " * Installing cron job for automated polling"
61 install -D -m 755 %{name}.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}.cron
62 echo " * TODO: Setting up Monitor account in local MyPLC"
65 cp $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig-default.py $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig.py
68 rm -rf $RPM_BUILD_ROOT
72 %config /usr/share/%{name}/monitorconfig.py
75 /var/www/cgi-bin/monitor
76 %{_sysconfdir}/cron.d/%{name}.cron
79 echo "Post processing"
80 # TODO: this will be nice when we have a web-based service running., such as
81 # an API server or so on.
82 # TODO: create real monitorconfig.py from monitorconfig-default.py
83 # TODO: create monitorconfig.php using phpconfig.py
84 # TODO: create symlink in /var/lib/monitor-server for chroot environments
85 # TODO: update the content of automate_pl03.sh
86 # TODO: Use the installed version of bootcd to create custom boot images. ( or, use the api now).
88 #chkconfig --add monitor-server
89 #chkconfig monitor-server on
92 * Wed Jul 30 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-server-1.0-5
93 - initial creation of server-side package