5 %define url $URL: svn+ssh://svn.planet-lab.org/svn/monitor/trunk/monitor.spec $
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
16 Source0: %{name}-%{version}.tar.bz2
18 Group: Applications/System
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
22 Packager: PlanetLab Central <support@planet-lab.org>
23 Distribution: PlanetLab %{plrelease}
24 URL: %(echo %{url} | cut -d ' ' -f 2)
26 Summary: Monitor account initialization for the root image.
27 Group: Applications/System
30 Monitor is a collection of secondary scripts for configuring the node polling
31 system, syncing the PLC db with the monitoring database, notifying users,
32 interacting with PCU hardware, applying penalties to sites that violate
36 Summary: Monitor hooks for a PLC node
37 Group: Applications/System
42 The client scripts handle account creation inside of a node. This will
43 include configuration setup for the monitoring agent running on the node. It
44 will also include any cron or init scripts needed to perform this kind of
48 Summary: Monitor hooks for the PLC server.
49 Group: Applications/System
55 The server side include all python modules and scripts needed to fully
56 operation, track, and interact with any third-party monitoring software, such
63 # NOTE: the build uses g++ cmdamt/
64 # NOTE: TMPDIR is needed here b/c the tmpfs of the build vserver is too small.
66 export TMPDIR=$PWD/tmp
71 rm -rf $RPM_BUILD_ROOT
72 #################### CLIENT
73 install -D -m 755 monitor.init $RPM_BUILD_ROOT/%{_initrddir}/monitor
74 install -D -m 755 monitor.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/monitor
76 #################### SERVER
77 install -d $RPM_BUILD_ROOT/usr/share/%{name}
78 install -d $RPM_BUILD_ROOT/data/var/lib/%{name}
79 install -d $RPM_BUILD_ROOT/data/var/lib/%{name}/archive-pdb
80 install -d $RPM_BUILD_ROOT/var/lib/%{name}
81 install -d $RPM_BUILD_ROOT/var/lib/%{name}/archive-pdb
82 install -d $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/
84 echo " * Installing core scripts"
85 rsync -a --exclude www --exclude archive-pdb --exclude .svn --exclude CVS \
86 ./ $RPM_BUILD_ROOT/usr/share/%{name}/
88 echo " * Installing web pages"
89 rsync -a www/ $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/
91 echo " * Installing cron job for automated polling"
92 install -D -m 644 %{name}.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/%{name}.cron
93 echo " * TODO: Setting up Monitor account in local MyPLC"
96 install -d $RPM_BUILD_ROOT/%{python_sitearch}/monitor
97 install -d -D -m 755 monitor $RPM_BUILD_ROOT/%{python_sitearch}/monitor
98 # TODO: need a much better way to do this.
99 rsync -a monitor/ $RPM_BUILD_ROOT/%{python_sitearch}/monitor/
100 #for file in __init__.py database.py config.py ; do
101 # install -D -m 644 monitor/$file $RPM_BUILD_ROOT/%{python_sitearch}/monitor/$file
103 install -D -m 755 threadpool.py $RPM_BUILD_ROOT/%{python_sitearch}/threadpool.py
105 touch $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php
106 chmod 777 $RPM_BUILD_ROOT/var/www/cgi-bin/monitor/monitorconfig.php
108 install -D -m 755 monitor-default.conf $RPM_BUILD_ROOT/etc/monitor.conf
109 cp $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig-default.py $RPM_BUILD_ROOT/usr/share/%{name}/monitorconfig.py
112 rm -rf $RPM_BUILD_ROOT
115 %defattr(-,root,root)
116 %config /usr/share/%{name}/monitorconfig.py
117 %config /etc/monitor.conf
120 /var/www/cgi-bin/monitor
121 %{_sysconfdir}/cron.d/%{name}.cron
122 %{python_sitearch}/threadpool.py
123 %{python_sitearch}/threadpool.pyc
124 %{python_sitearch}/threadpool.pyo
125 %{python_sitearch}/monitor
128 %defattr(-,root,root)
129 %{_initrddir}/monitor
130 %{_sysconfdir}/cron.d/monitor
133 # TODO: this will be nice when we have a web-based service running., such as
134 # an API server or so on.
135 # TODO: create real monitorconfig.py from monitorconfig-default.py
136 # TODO: create monitorconfig.php using phpconfig.py
137 # TODO: create symlink in /var/lib/monitor-server for chroot environments
138 # TODO: update the content of automate_pl03.sh
139 # TODO: Use the installed version of bootcd to create custom boot images. ( or, use the api now).
141 #chkconfig --add monitor-server
142 #chkconfig monitor-server on
145 chkconfig --add monitor
149 * Wed Sep 24 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-8
150 - These are all changes in the latest Monitor code. I will branch this version
151 - next, before making additional large changes.
153 * Mon Sep 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - Monitor-1.0-7
154 - Checkpointing current version for 4.2-rc21 - many many changes
156 * Mon Aug 11 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-6
157 - This is a major tag of every thing. probably needs a very different release
160 * Fri Jul 18 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-5
161 - Incremental improvements
163 * Mon May 19 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-4
164 - tagging everything for OneLab tech-transfer.
167 * Fri May 09 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-3
170 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-2
173 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - Monitor-1.0-1
174 - This should be ready for 4.2rc2
177 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - monitor-1.0-0
180 %define module_current_branch 1.0